/* Minimal single-card checkout inspired by provided mock */
/* Updated: 2026-01-02 - Clean hover states */
:root {
    --checkout-navy: #0C1A3A;
    --checkout-yellow: #FEC321;
    --checkout-yellow-dark: #dda107;
    --checkout-yellow-hover: #ffd54f;
    --checkout-muted: #7d7b72;
    --checkout-muted-light: #a3a19a;
    --checkout-border: rgba(12, 26, 58, 0.12);
    --checkout-bg: #f6f2ea;
    --checkout-card: #ffffff;
    --checkout-shadow: 0 45px 80px rgba(12, 26, 58, 0.12);
    --checkout-shadow-hover: 0 50px 100px rgba(12, 26, 58, 0.16);
    --checkout-success: #31c17c;
    --checkout-error: #ef4444;
    --checkout-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

.checkout-stage {
    background: transparent;
    padding: 80px 0 140px;
}

.checkout-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.checkout-card {
    background: #fff;
    border-radius: 36px;
    padding: 56px;
    box-shadow: var(--checkout-shadow);
    border: 1px solid rgba(12, 26, 58, 0.05);
    transition: box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--checkout-yellow) 0%, var(--checkout-yellow-hover) 100%);
}

.checkout-form-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    border: 0;
    margin-top: 18px;
}

.checkout-topbar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.checkout-back-link {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    border: 1px solid var(--checkout-border);
    background: #fff;
    color: var(--checkout-muted);
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--checkout-transition);
    text-decoration: none;
    flex-shrink: 0;
    opacity: 0.7;
}

.checkout-back-link:hover {
    box-shadow: none !important;
    transform: none !important;
    border-color: var(--checkout-navy) !important;
    background: var(--checkout-navy) !important;
    color: var(--checkout-yellow) !important;
    opacity: 1;
}

.checkout-back-link:active {
    transform: translateY(0);
    box-shadow: 0 8px 15px rgba(12, 26, 58, 0.15);
}

.checkout-top-copy h1 {
    margin: 0;
    font-size: 2.4rem;
    color: var(--checkout-navy);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.checkout-top-copy p {
    margin: 6px 0 0;
    color: var(--checkout-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

#msform {
    width: 100%;
}

#msform fieldset {
    border: 0;
    padding: 0;
    margin: 0;
}

.form-section {
    position: relative;
    transition: all 0.4s ease;
}

.form-section.hidden-step {
    display: none !important;
}

.form-actions.hidden-step {
    display: none !important;
}

.form-section + .form-section {
    margin-top: 52px;
    padding-top: 52px;
    border-top: 1px solid rgba(12, 26, 58, 0.08);
}

.section-heading {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.section-index {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(254, 195, 33, 0.25) 0%, rgba(254, 195, 33, 0.15) 100%);
    border: 1px solid rgba(254, 195, 33, 0.6);
    color: var(--checkout-navy);
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--checkout-transition);
}

.section-label {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--checkout-navy);
}

.section-helper {
    margin: 6px 0 0;
    color: var(--checkout-muted);
    font-size: 0.95rem;
}

.inputs-grid {
    display: grid;
    gap: 20px;
}

.inputs-grid.two-column {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.inputs-grid .wide {
    grid-column: span 2;
}

.form-control label {
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--checkout-muted);
    margin-bottom: 8px;
    display: block;
    font-weight: 500;
}

.form-control input,
.form-control select {
    width: 100%;
    height: 58px;
    border-radius: 18px;
    border: 2px solid rgba(12, 26, 58, 0.12);
    padding: 0 18px;
    font-size: 1rem;
    color: var(--checkout-navy);
    background: #fff;
    transition: var(--checkout-transition);
    font-family: inherit;
}

.form-control input::placeholder {
    color: var(--checkout-muted-light);
    opacity: 1;
}

.form-control select {
    appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230C1A3A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px;
    cursor: pointer;
    padding-right: 45px;
    font-weight: 500;
}

.form-control select:hover {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230C1A3A' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-control select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23FEC321' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.form-control select option {
    background: #fff;
    color: var(--checkout-navy);
    padding: 12px 18px;
    font-weight: 500;
}

.form-control input:hover,
.form-control select:hover {
    border-color: var(--checkout-navy) !important;
    box-shadow: none !important;
    background: rgba(12, 26, 58, 0.02) !important;
}

.scheme_original .form-control input:focus,
.scheme_original .form-control select:focus,
.form-control input:focus,
.form-control select:focus {
    border-color: #fec321 !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 4px rgba(254, 195, 33, 0.15);
    outline: none;
}

.phone-input {
    display: flex;
    align-items: center;
    border: 2px solid rgba(12, 26, 58, 0.12);
    border-radius: 18px;
    padding: 0 18px;
    gap: 10px;
    background: #fff;
    height: 58px;
    transition: var(--checkout-transition);
}

.phone-input:hover {
    border-color: var(--checkout-navy) !important;
    background: rgba(12, 26, 58, 0.02) !important;
}

.phone-input:focus-within {
    border-color: #fec321 !important;
    border-width: 3px !important;
    box-shadow: 0 0 0 4px rgba(254, 195, 33, 0.15);
    padding: 0 17px;
}

.phone-input select {
    border: 0;
    height: 100%;
    padding: 0;
    width: auto;
    background: transparent;
    font-size: 1rem;
    color: var(--checkout-navy);
    font-family: inherit;
}

.phone-input input {
    border: 0;
    flex: 1;
    height: 100%;
    padding: 0;
    font-size: 1rem;
    color: var(--checkout-navy);
    background: transparent;
}

.phone-input input::placeholder {
    color: var(--checkout-muted-light);
    opacity: 1;
}

.phone-input select:focus,
.phone-input input:focus {
    outline: none;
    box-shadow: none;
}

.phone-status {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #31c17c;
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.phone-status.valid {
    display: inline-flex;
}

/* Delivery Type Toggle */
.delivery-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.delivery-option {
    border: 2px solid rgba(12, 26, 58, 0.12);
    border-radius: 999px;
    padding: 12px 28px;
    background: #fff;
    color: var(--checkout-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--checkout-transition);
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.delivery-option:hover:not(.active) {
    border-color: var(--checkout-navy) !important;
    background: var(--checkout-navy) !important;
    color: var(--checkout-yellow) !important;
    transform: none !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.delivery-option.active {
    color: var(--checkout-yellow) !important;
    border-color: var(--checkout-navy) !important;
    background: var(--checkout-navy) !important;
    box-shadow: 0 0 0 1px #fec321, 0 0 0 5px rgba(254, 195, 33, 0.15) !important;
    transform: translateY(-4px) !important;
    font-weight: 700 !important;
}

/* Conditional Fields */
.field-group.hidden {
    display: none !important;
}

.pickup-location-field {
    display: none;
}

.pickup-location-field.show {
    display: block;
}

/* Field Groups for Better Organization */
.field-group {
    margin-bottom: 20px;
}

.field-group-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--checkout-navy);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(12, 26, 58, 0.08);
}

/* Grid Layouts for Split Fields */
.inputs-grid.split-50 {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.inputs-grid.split-80-20 {
    grid-template-columns: 1.86fr 1fr;
    gap: 16px;
}

.inputs-grid.full-width {
    grid-template-columns: 1fr;
}

.pill-toggle {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.pill-option {
    border: 2px solid rgba(12, 26, 58, 0.12);
    border-radius: 999px;
    padding: 14px 32px;
    background: #fff;
    color: var(--checkout-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--checkout-transition);
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payment-icon {
    font-size: 1.3rem;
    transition: var(--checkout-transition);
}

.pill-option:hover:not(.active) {
    border-color: var(--checkout-navy) !important;
    background: var(--checkout-navy) !important;
    color: var(--checkout-yellow) !important;
    transform: none !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.pill-option.active {
    color: var(--checkout-yellow) !important;
    border-color: var(--checkout-navy) !important;
    background: var(--checkout-navy) !important;
    box-shadow: 0 0 0 1px #fec321, 0 0 0 5px rgba(254, 195, 33, 0.15) !important;
    transform: translateY(-4px) !important;
    font-weight: 700 !important;
}

.pill-option:active {
    transform: translateY(0);
}

.payment-note {
    color: var(--checkout-muted);
    font-size: 0.95rem;
    margin-top: 8px;
}

.next-step-button {
    border: 0;
    border-radius: 22px;
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--checkout-navy);
    color: var(--checkout-yellow);
    cursor: pointer;
    transition: var(--checkout-transition);
    font-family: inherit;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 32px;
    box-shadow: 0 4px 12px rgba(12, 26, 58, 0.2);
}

.next-step-button:hover {
    background: var(--checkout-navy) !important;
    color: var(--checkout-yellow) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(12, 26, 58, 0.3) !important;
}

.next-step-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(12, 26, 58, 0.2) !important;
}

.next-step-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(12, 26, 58, 0.1) !important;
}

.next-step-button .arrow-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.next-step-button:hover .arrow-icon {
    animation: bounce-arrow 0.6s ease-in-out infinite;
}

@keyframes bounce-arrow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(4px);
    }
}

.step-button-container {
    margin-top: 32px;
    display: flex;
    justify-content: flex-start;
}

.form-actions {
    margin-top: 48px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.primary-button {
    border: 0;
    border-radius: 22px;
    padding: 20px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--checkout-yellow) 0%, var(--checkout-yellow-hover) 100%);
    color: var(--checkout-navy);
    cursor: pointer;
    box-shadow: 0 35px 45px rgba(254, 195, 33, 0.3);
    transition: var(--checkout-transition);
    font-family: inherit;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.primary-button:hover::before {
    width: 300px;
    height: 300px;
}

.primary-button:hover {
    background: var(--checkout-navy) !important;
    color: var(--checkout-yellow) !important;
    transform: none !important;
    box-shadow: 0 8px 24px rgba(12, 26, 58, 0.3) !important;
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 25px 35px rgba(254, 195, 33, 0.3);
}

.primary-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.secure-note {
    color: var(--checkout-muted);
    font-size: 0.92rem;
}

.secure-note .lock {
    margin-right: 4px;
}

.hidden-summary,
#toggle-summary.visually-hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Preserve cart styles for hidden summary to avoid JS errors */
.checkout-details-inner {
    border-radius: 24px;
    border: 1px solid var(--checkout-border);
    padding: 24px;
    background: #fff;
}

.checkout-lists {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-lists .card {
    display: flex;
    gap: 14px;
    border-radius: 16px;
    border: 1px solid rgba(12, 26, 58, 0.08);
    padding: 12px 16px;
    background: rgba(12, 26, 58, 0.03);
}

.card-image {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-shipping,
.checkout-total {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--checkout-navy);
}

@media (max-width: 768px) {
    .checkout-stage {
        padding: 40px 0 80px;
    }
    
    .checkout-page {
        padding: 0 16px;
    }
    
    .checkout-card {
        padding: 32px 24px;
        border-radius: 24px;
    }

    .checkout-topbar {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }
    
    .checkout-back-link {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }
    
    .checkout-top-copy h1 {
        font-size: 1.8rem;
    }
    
    .checkout-top-copy p {
        font-size: 0.95rem;
    }
    
    .section-heading {
        gap: 14px;
        margin-bottom: 20px;
    }
    
    .section-index {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .section-label {
        font-size: 1.15rem;
    }

    .inputs-grid.two-column {
        grid-template-columns: 1fr;
    }
    
    .inputs-grid .wide {
        grid-column: span 1;
    }
    
    .form-section + .form-section {
        margin-top: 40px;
        padding-top: 40px;
    }
    
    .pill-toggle {
        gap: 12px;
    }
    
    .pill-option {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .primary-button {
        padding: 18px 36px;
        font-size: 1rem;
    }
    
    .form-actions {
        margin-top: 36px;
    }
}

@media (max-width: 480px) {
    .checkout-card {
        padding: 24px 20px;
        border-radius: 20px;
    }
    
    .checkout-topbar {
        gap: 12px;
    }
    
    .checkout-top-copy h1 {
        font-size: 1.5rem;
    }
    
    .pill-toggle {
        gap: 10px;
    }
    
    .pill-option {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
