/**
 * Moving Cost Calculator - Native Mobile App CSS
 * Wizard Flow Experience v2.0
 */

/* ===========================
   CSS VARIABLES
   =========================== */

:root {
    /* Primary Colors */
    --mcc-primary: #007AFF;
    --mcc-primary-dark: #0056b3;
    --mcc-primary-light: rgba(0, 122, 255, 0.1);
    
    /* Status Colors */
    --mcc-success: #34C759;
    --mcc-success-light: rgba(52, 199, 89, 0.1);
    --mcc-warning: #FF9500;
    --mcc-warning-light: rgba(255, 149, 0, 0.1);
    --mcc-danger: #FF3B30;
    --mcc-purple: #AF52DE;
    --mcc-purple-light: rgba(175, 82, 222, 0.1);
    
    /* Neutral Colors */
    --mcc-bg: #F2F2F7;
    --mcc-card: #FFFFFF;
    --mcc-text: #000000;
    --mcc-text-secondary: #3C3C43;
    --mcc-text-tertiary: #8E8E93;
    --mcc-border: rgba(60, 60, 67, 0.12);
    --mcc-border-solid: #E5E5EA;
    
    /* Spacing */
    --mcc-space-xs: 4px;
    --mcc-space-sm: 8px;
    --mcc-space-md: 16px;
    --mcc-space-lg: 24px;
    --mcc-space-xl: 32px;
    
    /* Border Radius */
    --mcc-radius-sm: 8px;
    --mcc-radius-md: 12px;
    --mcc-radius-lg: 16px;
    --mcc-radius-xl: 24px;
    --mcc-radius-full: 9999px;
    
    /* Typography */
    --mcc-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    
    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

/* ===========================
   GLOBAL STYLES
   =========================== */

.mcc-app {
    font-family: var(--mcc-font);
    font-size: 17px;
    line-height: 1.47;
    color: var(--mcc-text);
    background: var(--mcc-bg);
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
}

.mcc-app * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ===========================
   SCREENS
   =========================== */

.mcc-screen {
    display: none;
    min-height: 100vh;
    min-height: 100dvh;
}

.mcc-screen.active {
    display: flex;
    flex-direction: column;
}

/* ===========================
   WELCOME SCREEN
   =========================== */

.mcc-welcome-screen {
    background: linear-gradient(180deg, var(--mcc-card) 0%, var(--mcc-bg) 100%);
    justify-content: center;
    align-items: center;
    padding: var(--mcc-space-xl);
    padding-top: calc(var(--safe-top) + var(--mcc-space-xl));
    padding-bottom: calc(var(--safe-bottom) + var(--mcc-space-xl));
}

.mcc-welcome-content {
    text-align: center;
    max-width: 340px;
    width: 100%;
    animation: mccFadeInUp 0.8s ease-out;
}

@keyframes mccFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mcc-welcome-icon {
    width: 100px;
    height: 100px;
    background: var(--mcc-primary-light);
    border-radius: var(--mcc-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--mcc-space-lg);
    animation: mccFadeInUp 0.8s ease-out 0.1s both;
}

.mcc-welcome-icon span {
    font-size: 48px;
}

.mcc-welcome-logo {
    margin: 0 auto var(--mcc-space-lg);
    animation: mccFadeInUp 0.8s ease-out 0.1s both;
}

.mcc-welcome-logo img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

.mcc-welcome-company {
    font-size: 13px;
    font-weight: 600;
    color: var(--mcc-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--mcc-space-sm);
    animation: mccFadeInUp 0.8s ease-out 0.2s both;
}

.mcc-welcome-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--mcc-text);
    margin-bottom: var(--mcc-space-md);
    line-height: 1.2;
    animation: mccFadeInUp 0.8s ease-out 0.3s both;
}

.mcc-welcome-subtitle {
    font-size: 17px;
    color: var(--mcc-text-secondary);
    margin-bottom: var(--mcc-space-xl);
    line-height: 1.5;
    animation: mccFadeInUp 0.8s ease-out 0.4s both;
}

.mcc-welcome-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--mcc-space-sm);
    width: 100%;
    padding: 16px 32px;
    background: var(--mcc-primary);
    color: #fff;
    border: none;
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: mccFadeInUp 0.8s ease-out 0.5s both;
    -webkit-tap-highlight-color: transparent;
}

.mcc-welcome-btn:hover {
    background: var(--mcc-primary-dark);
    transform: scale(1.02);
}

.mcc-welcome-btn:active {
    transform: scale(0.98);
}

.mcc-welcome-btn svg {
    transition: transform 0.2s ease;
}

.mcc-welcome-btn:hover svg {
    transform: translateX(4px);
}

.mcc-welcome-footer {
    margin-top: var(--mcc-space-xl);
    animation: mccFadeInUp 0.8s ease-out 0.6s both;
}

.mcc-step-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--mcc-bg);
    border-radius: var(--mcc-radius-full);
    font-size: 13px;
    color: var(--mcc-text-tertiary);
}

/* ===========================
   WIZARD SCREEN
   =========================== */

.mcc-wizard-screen {
    background: var(--mcc-bg);
}

.mcc-wizard-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Progress Bar */
.mcc-wizard-progress {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--mcc-card);
    padding: var(--mcc-space-md);
    padding-top: calc(var(--safe-top) + var(--mcc-space-md));
    border-bottom: 1px solid var(--mcc-border);
}

.mcc-progress-bar {
    height: 4px;
    background: var(--mcc-border-solid);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-progress-fill {
    height: 100%;
    background: var(--mcc-primary);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.mcc-progress-text {
    text-align: center;
    font-size: 13px;
    color: var(--mcc-text-tertiary);
}

/* Wizard Steps */
.mcc-wizard-step {
    display: none;
    flex: 1;
    flex-direction: column;
    padding: var(--mcc-space-lg) var(--mcc-space-md);
    animation: mccSlideIn 0.4s ease;
}

.mcc-wizard-step.active {
    display: flex;
}

@keyframes mccSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Step Header */
.mcc-step-header {
    text-align: center;
    margin-bottom: var(--mcc-space-lg);
}

.mcc-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: var(--mcc-primary-light);
    border-radius: var(--mcc-radius-lg);
    font-size: 32px;
    margin-bottom: var(--mcc-space-md);
}

.mcc-step-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--mcc-text);
    margin-bottom: var(--mcc-space-sm);
}

.mcc-step-description {
    font-size: 15px;
    color: var(--mcc-text-tertiary);
}

/* Step Content */
.mcc-step-content {
    flex: 1;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

/* Input Groups */
.mcc-input-group {
    margin-bottom: var(--mcc-space-md);
}

.mcc-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--mcc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-input-group input[type="text"],
.mcc-input-group input[type="number"],
.mcc-input-group select,
.mcc-input-group textarea {
    width: 100%;
    padding: 16px;
    background: var(--mcc-card);
    border: 1px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 17px;
    color: var(--mcc-text);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mcc-input-group input:focus,
.mcc-input-group select:focus,
.mcc-input-group textarea:focus {
    outline: none;
    border-color: var(--mcc-primary);
    box-shadow: 0 0 0 4px var(--mcc-primary-light);
}

.mcc-input-group input::placeholder,
.mcc-input-group textarea::placeholder {
    color: var(--mcc-text-tertiary);
}

.mcc-input-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.mcc-input-row {
    display: flex;
    gap: var(--mcc-space-md);
}

.mcc-input-half {
    flex: 1;
}

/* Distance Badge */
.mcc-distance-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mcc-space-md);
    background: var(--mcc-primary);
    color: #fff;
    padding: var(--mcc-space-md);
    border-radius: var(--mcc-radius-md);
    margin-top: var(--mcc-space-md);
}

.mcc-distance-item {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
}

.mcc-distance-icon {
    font-size: 20px;
}

.mcc-distance-value {
    font-weight: 600;
}

.mcc-distance-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.3);
}

/* Option Cards */
.mcc-option-cards {
    display: flex;
    flex-direction: column;
    gap: var(--mcc-space-md);
}

.mcc-option-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mcc-option-card input {
    display: none;
}

.mcc-option-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--mcc-space-lg);
    background: var(--mcc-card);
    border: 2px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-lg);
    transition: all 0.2s ease;
    position: relative;
}

.mcc-option-card input:checked + .mcc-option-card-inner {
    border-color: var(--mcc-primary);
    background: var(--mcc-primary-light);
}

.mcc-option-card:active .mcc-option-card-inner {
    transform: scale(0.98);
}

.mcc-option-icon {
    font-size: 40px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-option-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--mcc-text);
    margin-bottom: var(--mcc-space-xs);
}

.mcc-option-desc {
    font-size: 13px;
    color: var(--mcc-text-tertiary);
}

.mcc-option-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--mcc-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.mcc-option-card input:checked + .mcc-option-card-inner .mcc-option-check {
    opacity: 1;
    transform: scale(1);
}

/* Capacity Display */
.mcc-capacity-display {
    background: var(--mcc-card);
    border-radius: var(--mcc-radius-md);
    padding: var(--mcc-space-md);
    margin-top: var(--mcc-space-md);
}

.mcc-capacity-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-capacity-text span:first-child {
    color: var(--mcc-text-tertiary);
}

.mcc-capacity-bar {
    height: 8px;
    background: var(--mcc-border-solid);
    border-radius: 4px;
    overflow: hidden;
}

.mcc-capacity-fill {
    height: 100%;
    background: var(--mcc-primary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mcc-capacity-fill.warning {
    background: var(--mcc-warning);
}

.mcc-capacity-fill.danger {
    background: var(--mcc-danger);
}

/* Carrier Split Input */
.mcc-carrier-split-input {
    background: var(--mcc-warning-light);
    border-radius: var(--mcc-radius-md);
    padding: var(--mcc-space-md);
    margin-top: var(--mcc-space-lg);
}

.mcc-split-header {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    font-weight: 600;
    margin-bottom: var(--mcc-space-md);
}

.mcc-split-icon {
    font-size: 20px;
}

.mcc-split-inputs {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-md);
}

.mcc-split-input-group {
    flex: 1;
    text-align: center;
}

.mcc-split-input-group label {
    display: block;
    font-size: 12px;
    color: var(--mcc-text-tertiary);
    margin-bottom: var(--mcc-space-sm);
}

.mcc-percent-input {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--mcc-card);
    border-radius: var(--mcc-radius-sm);
    padding: 8px 12px;
}

.mcc-percent-input input {
    width: 50px;
    border: none;
    background: transparent;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: var(--mcc-text);
}

.mcc-percent-input input:focus {
    outline: none;
}

.mcc-percent-input span {
    font-size: 16px;
    font-weight: 600;
    color: var(--mcc-text-tertiary);
}

.mcc-split-arrow {
    font-size: 24px;
    color: var(--mcc-text-tertiary);
}

.mcc-percent-display {
    background: var(--mcc-card);
    border-radius: var(--mcc-radius-sm);
    padding: 8px 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--mcc-success);
}

/* Extras Grid */
.mcc-extras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--mcc-space-sm);
}

.mcc-extra-chip {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mcc-extra-chip input {
    display: none;
}

.mcc-chip-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mcc-space-sm);
    padding: 14px var(--mcc-space-md);
    background: var(--mcc-card);
    border: 2px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mcc-extra-chip input:checked + .mcc-chip-inner {
    border-color: var(--mcc-primary);
    background: var(--mcc-primary-light);
    color: var(--mcc-primary);
}

.mcc-extra-chip:active .mcc-chip-inner {
    transform: scale(0.96);
}

/* Toggle Row */
.mcc-storage-toggle,
.mcc-margin-toggle-section {
    margin-top: var(--mcc-space-lg);
}

.mcc-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mcc-space-md);
    background: var(--mcc-card);
    border-radius: var(--mcc-radius-md);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mcc-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    font-size: 17px;
    font-weight: 500;
}

.mcc-toggle-icon {
    font-size: 20px;
}

.mcc-toggle-input {
    display: none;
}

.mcc-toggle-switch {
    width: 51px;
    height: 31px;
    background: var(--mcc-border-solid);
    border-radius: 31px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.mcc-toggle-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.mcc-toggle-input:checked + .mcc-toggle-switch {
    background: var(--mcc-success);
}

.mcc-toggle-input:checked + .mcc-toggle-switch::before {
    transform: translateX(20px);
}

.mcc-storage-options {
    margin-top: var(--mcc-space-md);
    padding-left: var(--mcc-space-md);
}

.mcc-storage-options select {
    width: 100%;
    padding: 12px;
    background: var(--mcc-card);
    border: 1px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-sm);
    font-size: 15px;
}

/* Margin Slider */
.mcc-margin-slider-section {
    margin-top: var(--mcc-space-md);
    padding: var(--mcc-space-md);
    background: var(--mcc-bg);
    border-radius: var(--mcc-radius-md);
}

.mcc-margin-value-display {
    text-align: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--mcc-primary);
    margin-bottom: var(--mcc-space-md);
}

#mcc-margin-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--mcc-border-solid);
    outline: none;
    -webkit-appearance: none;
}

#mcc-margin-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mcc-card);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--mcc-primary);
}

#mcc-margin-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--mcc-card);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px var(--mcc-primary);
}

.mcc-margin-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--mcc-text-tertiary);
    margin-top: var(--mcc-space-sm);
}

/* Notes Section */
.mcc-notes-section {
    margin-top: var(--mcc-space-lg);
}

.mcc-notes-section label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--mcc-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-notes-section textarea {
    width: 100%;
    padding: 16px;
    background: var(--mcc-card);
    border: 1px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 17px;
    color: var(--mcc-text);
    resize: none;
    min-height: 120px;
}

.mcc-notes-section textarea:focus {
    outline: none;
    border-color: var(--mcc-primary);
    box-shadow: 0 0 0 4px var(--mcc-primary-light);
}

/* ===========================
   WIZARD NAVIGATION
   =========================== */

.mcc-wizard-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--mcc-space-md);
    padding-bottom: calc(var(--safe-bottom) + var(--mcc-space-md));
    background: var(--mcc-card);
    border-top: 1px solid var(--mcc-border);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.mcc-nav-btn {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    padding: 12px 20px;
    border: none;
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mcc-nav-prev {
    background: transparent;
    color: var(--mcc-primary);
}

.mcc-nav-prev:hover {
    background: var(--mcc-primary-light);
}

.mcc-nav-reset {
    background: var(--mcc-bg);
    color: var(--mcc-text-tertiary);
    padding: 12px;
}

.mcc-nav-reset:hover {
    background: var(--mcc-border-solid);
}

.mcc-nav-next,
.mcc-nav-submit {
    background: var(--mcc-primary);
    color: #fff;
    padding: 12px 24px;
}

.mcc-nav-next:hover,
.mcc-nav-submit:hover {
    background: var(--mcc-primary-dark);
}

.mcc-nav-btn:active {
    transform: scale(0.96);
}

.mcc-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: mccSpin 0.8s linear infinite;
}

@keyframes mccSpin {
    to { transform: rotate(360deg); }
}

/* ===========================
   RESULTS SCREEN
   =========================== */

.mcc-results-screen {
    background: var(--mcc-bg);
}

.mcc-results-header {
    display: flex;
    align-items: center;
    padding: var(--mcc-space-md);
    padding-top: calc(var(--safe-top) + var(--mcc-space-md));
    background: var(--mcc-card);
    border-bottom: 1px solid var(--mcc-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.mcc-back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--mcc-primary);
    cursor: pointer;
    border-radius: var(--mcc-radius-sm);
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mcc-back-btn:hover {
    background: var(--mcc-primary-light);
}

.mcc-results-title {
    flex: 1;
    text-align: center;
    font-size: 17px;
    font-weight: 600;
}

.mcc-results-spacer {
    width: 44px;
}

.mcc-results-content {
    padding: var(--mcc-space-md);
    padding-bottom: calc(var(--safe-bottom) + var(--mcc-space-xl));
}

/* Result Cards */
.mcc-result-card {
    background: var(--mcc-card);
    border-radius: var(--mcc-radius-lg);
    margin-bottom: var(--mcc-space-md);
    overflow: hidden;
}

.mcc-card-header {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    padding: var(--mcc-space-md);
    background: var(--mcc-bg);
    border-bottom: 1px solid var(--mcc-border);
}

.mcc-card-icon {
    font-size: 18px;
}

.mcc-card-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mcc-text-secondary);
}

.mcc-card-body {
    padding: var(--mcc-space-md);
}

/* Summary Items */
.mcc-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--mcc-border);
}

.mcc-summary-item:last-child {
    border-bottom: none;
}

.mcc-summary-label {
    font-size: 15px;
    color: var(--mcc-text-tertiary);
}

.mcc-summary-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--mcc-text);
    text-align: right;
    max-width: 60%;
}

/* Rate Card */
.mcc-rate-card {
    background: linear-gradient(135deg, var(--mcc-purple) 0%, #9333ea 100%);
    color: #fff;
}

.mcc-rate-header {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    padding: var(--mcc-space-md);
    background: rgba(0, 0, 0, 0.1);
}

.mcc-rate-icon {
    font-size: 18px;
}

.mcc-rate-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mcc-rate-main {
    text-align: center;
    padding: var(--mcc-space-lg);
}

.mcc-rate-value {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.mcc-rate-label {
    font-size: 14px;
    opacity: 0.9;
    margin-top: var(--mcc-space-xs);
}

.mcc-rate-details {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--mcc-space-md);
}

.mcc-rate-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.mcc-rate-row span:first-child {
    opacity: 0.8;
}

.mcc-rate-row span:last-child {
    font-weight: 600;
}

.mcc-rate-total {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: var(--mcc-space-sm);
    margin-top: var(--mcc-space-sm);
}

/* Breakdown Card */
.mcc-breakdown-list {
    padding: 0;
}

.mcc-breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--mcc-space-md);
    border-bottom: 1px solid var(--mcc-border);
}

.mcc-breakdown-item:last-child {
    border-bottom: none;
}

.mcc-breakdown-info {
    flex: 1;
}

.mcc-breakdown-name {
    display: block;
    font-size: 17px;
    color: var(--mcc-text);
}

.mcc-breakdown-detail {
    display: block;
    font-size: 13px;
    color: var(--mcc-text-tertiary);
    margin-top: 2px;
}

.mcc-breakdown-amount {
    font-size: 17px;
    font-weight: 600;
    color: var(--mcc-text);
}

.mcc-breakdown-subtotal {
    display: flex;
    justify-content: space-between;
    padding: var(--mcc-space-md);
    background: var(--mcc-bg);
    font-weight: 600;
}

.mcc-overhead-item {
    background: var(--mcc-warning-light);
}

/* Total Card */
.mcc-total-card {
    background: linear-gradient(135deg, #1c1c1e 0%, #2c2c2e 100%);
    padding: var(--mcc-space-lg);
}

.mcc-total-main {
    text-align: center;
}

.mcc-total-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-total-value {
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

/* Margin Card */
.mcc-margin-card {
    background: var(--mcc-card);
}

.mcc-margin-info {
    display: flex;
    justify-content: space-between;
    padding: var(--mcc-space-md);
    border-bottom: 1px solid var(--mcc-border);
    font-size: 15px;
}

.mcc-margin-amount {
    font-weight: 600;
    color: var(--mcc-success);
}

.mcc-quote-main {
    background: linear-gradient(135deg, var(--mcc-primary) 0%, var(--mcc-primary-dark) 100%);
    padding: var(--mcc-space-lg);
    text-align: center;
}

.mcc-quote-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-quote-value {
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.mcc-profit-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--mcc-space-md);
    padding: var(--mcc-space-md);
    background: var(--mcc-success-light);
}

.mcc-profit-label {
    font-size: 15px;
    color: var(--mcc-success);
}

.mcc-profit-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--mcc-success);
}

/* Split Card */
.mcc-split-card {
    background: var(--mcc-card);
}

.mcc-split-header {
    background: linear-gradient(135deg, var(--mcc-warning) 0%, #cc7700 100%);
}

.mcc-split-header .mcc-card-icon,
.mcc-split-header .mcc-card-title {
    color: #fff;
}

.mcc-split-total {
    display: flex;
    justify-content: space-between;
    padding: var(--mcc-space-md);
    background: var(--mcc-warning-light);
    font-size: 15px;
}

.mcc-split-total span:last-child {
    font-size: 20px;
    font-weight: 700;
    color: var(--mcc-warning);
}

.mcc-split-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mcc-space-md);
    padding: var(--mcc-space-md);
}

.mcc-split-box {
    text-align: center;
    padding: var(--mcc-space-md);
    border-radius: var(--mcc-radius-md);
}

.mcc-your-split {
    background: var(--mcc-success-light);
}

.mcc-carrier-split {
    background: var(--mcc-warning-light);
}

.mcc-split-label {
    font-size: 11px;
    color: var(--mcc-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--mcc-space-sm);
}

.mcc-split-percent {
    font-size: 32px;
    font-weight: 700;
    color: var(--mcc-text);
    line-height: 1;
}

.mcc-split-amount {
    font-size: 20px;
    font-weight: 700;
    margin-top: var(--mcc-space-sm);
}

.mcc-your-split .mcc-split-amount {
    color: var(--mcc-success);
}

.mcc-carrier-split .mcc-split-amount {
    color: var(--mcc-warning);
}

.mcc-split-note {
    padding: var(--mcc-space-md);
    background: var(--mcc-bg);
    font-size: 13px;
    color: var(--mcc-text-tertiary);
    text-align: center;
}

/* Notes Card */
.mcc-notes-card .mcc-card-body p {
    font-size: 15px;
    color: var(--mcc-text-secondary);
    line-height: 1.6;
}

/* Result Actions */
.mcc-result-actions {
    display: flex;
    gap: var(--mcc-space-sm);
    margin-top: var(--mcc-space-lg);
}

.mcc-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--mcc-space-sm);
    padding: 14px var(--mcc-space-md);
    background: var(--mcc-card);
    border: 1px solid var(--mcc-border-solid);
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 15px;
    font-weight: 600;
    color: var(--mcc-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mcc-action-btn:hover {
    background: var(--mcc-primary-light);
}

.mcc-action-btn:active {
    transform: scale(0.96);
}

/* ===========================
   ERROR SCREEN
   =========================== */

.mcc-error-screen {
    justify-content: center;
    align-items: center;
    padding: var(--mcc-space-xl);
}

.mcc-error-content {
    text-align: center;
    max-width: 300px;
}

.mcc-error-icon {
    font-size: 64px;
    margin-bottom: var(--mcc-space-md);
}

.mcc-error-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--mcc-danger);
    margin-bottom: var(--mcc-space-sm);
}

.mcc-error-message {
    font-size: 17px;
    color: var(--mcc-text-secondary);
    margin-bottom: var(--mcc-space-lg);
}

.mcc-error-btn {
    width: 100%;
    padding: 16px 32px;
    background: var(--mcc-primary);
    color: #fff;
    border: none;
    border-radius: var(--mcc-radius-md);
    font-family: var(--mcc-font);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

/* API Notice */
.mcc-api-notice {
    display: flex;
    align-items: center;
    gap: var(--mcc-space-sm);
    padding: var(--mcc-space-md);
    background: var(--mcc-warning-light);
    border-radius: var(--mcc-radius-md);
    margin: var(--mcc-space-md);
    font-size: 13px;
    color: var(--mcc-warning);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (min-width: 768px) {
    .mcc-app {
        max-width: 480px;
        margin: 0 auto;
        min-height: auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    }
    
    .mcc-welcome-screen,
    .mcc-results-screen,
    .mcc-error-screen {
        min-height: 800px;
    }
    
    .mcc-wizard-screen {
        min-height: 700px;
    }
}

@media (max-width: 380px) {
    .mcc-welcome-title {
        font-size: 28px;
    }
    
    .mcc-step-title {
        font-size: 24px;
    }
    
    .mcc-total-value,
    .mcc-quote-value,
    .mcc-rate-value {
        font-size: 44px;
    }
    
    .mcc-margin-value-display {
        font-size: 40px;
    }
}

/* ===========================
   DARK MODE
   =========================== */

@media (prefers-color-scheme: dark) {
    :root {
        --mcc-bg: #000000;
        --mcc-card: #1c1c1e;
        --mcc-text: #ffffff;
        --mcc-text-secondary: #ebebf5;
        --mcc-text-tertiary: rgba(235, 235, 245, 0.6);
        --mcc-border: rgba(84, 84, 88, 0.65);
        --mcc-border-solid: #38383a;
    }
    
    .mcc-welcome-screen {
        background: linear-gradient(180deg, var(--mcc-card) 0%, var(--mcc-bg) 100%);
    }
    
    .mcc-input-group select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ebebf5' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    }
}

/* ===========================
   LOADING OVERLAY
   =========================== */

.mcc-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mccFadeIn 0.3s ease;
}

@keyframes mccFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.mcc-loading-content {
    text-align: center;
    color: #fff;
    padding: var(--mcc-space-xl);
    animation: mccLoadingBounce 0.5s ease;
}

@keyframes mccLoadingBounce {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.mcc-loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--mcc-primary);
    animation: mccSpinLarge 1s linear infinite;
    margin: 0 auto var(--mcc-space-lg);
}

@keyframes mccSpinLarge {
    to { transform: rotate(360deg); }
}

.mcc-loading-text {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: var(--mcc-space-sm);
    animation: mccPulse 1.5s ease-in-out infinite;
}

@keyframes mccPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.mcc-loading-subtext {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.mcc-loading-subtext::after {
    content: '';
    animation: mccDots 1.5s infinite;
}

@keyframes mccDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    html, body {
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .mcc-app {
        background: #fff !important;
        min-height: auto !important;
        max-width: 100% !important;
        box-shadow: none !important;
        overflow: visible !important;
    }
    
    .mcc-screen {
        min-height: auto !important;
        overflow: visible !important;
    }
    
    .mcc-results-screen {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Hide non-printable elements */
    .mcc-results-header,
    .mcc-result-actions,
    .mcc-back-btn,
    .mcc-welcome-screen,
    .mcc-wizard-screen,
    .mcc-error-screen,
    .mcc-loading-overlay {
        display: none !important;
    }
    
    .mcc-results-content {
        padding: 10px !important;
        padding-bottom: 10px !important;
    }
    
    /* Compact cards for print */
    .mcc-result-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
    }
    
    .mcc-card-header {
        padding: 8px 12px !important;
        background: #f5f5f5 !important;
    }
    
    .mcc-card-body {
        padding: 8px 12px !important;
    }
    
    /* Compact summary items */
    .mcc-summary-item {
        padding: 6px 0 !important;
    }
    
    .mcc-summary-label,
    .mcc-summary-value {
        font-size: 12px !important;
    }
    
    /* Compact breakdown items */
    .mcc-breakdown-item {
        padding: 8px 12px !important;
    }
    
    .mcc-breakdown-name {
        font-size: 13px !important;
    }
    
    .mcc-breakdown-detail {
        font-size: 11px !important;
    }
    
    .mcc-breakdown-amount {
        font-size: 13px !important;
    }
    
    .mcc-breakdown-subtotal {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }
    
    /* Compact total cards */
    .mcc-total-card {
        padding: 12px !important;
        background: #1c1c1e !important;
    }
    
    .mcc-total-value {
        font-size: 36px !important;
    }
    
    .mcc-quote-main {
        padding: 12px !important;
        background: var(--mcc-primary) !important;
    }
    
    .mcc-quote-value {
        font-size: 36px !important;
    }
    
    /* Compact rate card */
    .mcc-rate-card {
        background: #AF52DE !important;
    }
    
    .mcc-rate-main {
        padding: 12px !important;
    }
    
    .mcc-rate-value {
        font-size: 36px !important;
    }
    
    .mcc-rate-details {
        padding: 8px 12px !important;
    }
    
    .mcc-rate-row {
        padding: 4px 0 !important;
        font-size: 11px !important;
    }
    
    /* Compact margin card */
    .mcc-margin-info {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .mcc-profit-badge {
        padding: 8px 12px !important;
    }
    
    .mcc-profit-value {
        font-size: 18px !important;
    }
    
    /* Compact split card */
    .mcc-split-total {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    .mcc-split-total span:last-child {
        font-size: 14px !important;
    }
    
    .mcc-split-boxes {
        padding: 8px !important;
        gap: 8px !important;
    }
    
    .mcc-split-box {
        padding: 8px !important;
    }
    
    .mcc-split-percent {
        font-size: 20px !important;
    }
    
    .mcc-split-amount {
        font-size: 14px !important;
    }
    
    .mcc-split-note {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }
    
    /* Notes card compact */
    .mcc-notes-card .mcc-card-body p {
        font-size: 11px !important;
    }
    
    /* Force page fit */
    @page {
        size: A4;
        margin: 10mm;
    }
}