﻿/*
 * cart-checkout.css — wwwroot/css/cart-checkout.css
 * Cart and Checkout pages — purple theme matching esim-plans.css
 * All classes prefixed cc- to avoid conflicts
 */

/* ── PAGE WRAPPER ────────────────────────────────────────────────── */
.cc-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ── PAGE HEADER ─────────────────────────────────────────────────── */
.cc-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}

.cc-page-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.cc-page-sub {
    font-size: 13px;
    color: #8a8aaa;
    margin: 4px 0 0;
}

.cc-continue-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1.5px solid #e8e4f0;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #4a4a6a;
    text-decoration: none;
    transition: all .18s ease;
}

    .cc-continue-btn:hover {
        border-color: #6B3FA0;
        color: #6B3FA0;
    }

/* ── STEP INDICATOR ──────────────────────────────────────────────── */
.cc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.cc-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e8e4f0;
    color: #8a8aaa;
    font-size: 13px;
    font-weight: 700;
    display: grid;
    place-items: center;
    transition: all .2s ease;
}

.cc-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #8a8aaa;
    transition: all .2s ease;
}

.cc-step.active .cc-step-num {
    background: #6B3FA0;
    color: #fff;
    box-shadow: 0 3px 10px rgba(107,63,160,.3);
}

.cc-step.active .cc-step-label {
    color: #1a1a2e;
}

.cc-step.done .cc-step-num {
    background: #6B3FA0;
    color: #fff;
}

.cc-step.done .cc-step-label {
    color: #6B3FA0;
}

.cc-step-arrow {
    font-size: 20px;
    color: #d5c6f0;
    font-weight: 300;
}

/* ── PAGE TWO-COLUMN ─────────────────────────────────────────────── */
.cc-page {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    align-items: start;
}

.cc-left {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cc-right {
    position: sticky;
    top: 20px;
}

/* ── CARD ────────────────────────────────────────────────────────── */
.cc-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e8e4f0;
    padding: 28px;
    box-shadow: 0 2px 14px rgba(107,63,160,.06);
}

.cc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #e8e4f0;
    margin-bottom: 20px;
}

.cc-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.cc-form-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 24px;
}

.cc-clear-btn {
    font-size: 13px;
    font-weight: 600;
    color: #ef4444;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

    .cc-clear-btn:hover {
        color: #dc2626;
    }

/* ── CART ITEM ───────────────────────────────────────────────────── */
.cc-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 32px 20px 0;
    border-bottom: 1px solid #f0ecf8;
    position: relative;
}

    .cc-item:last-child {
        border-bottom: none;
    }

.cc-item-flag {
    width: 52px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    border: 1.5px solid #e8e4f0;
    flex-shrink: 0;
}

    .cc-item-flag img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cc-item-body {
    flex: 1;
}

.cc-item-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.cc-item-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #8a8aaa;
    margin-bottom: 8px;
}

    .cc-item-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

.cc-instant-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.cc-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    min-width: 120px;
}

.cc-item-total-label {
    font-size: 11px;
    color: #8a8aaa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.cc-item-price {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
}

.cc-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cc-qty-label {
    font-size: 12px;
    color: #8a8aaa;
}

.cc-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1.5px solid #e8e4f0;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: all .15s ease;
}

    .cc-qty-btn:hover {
        border-color: #6B3FA0;
        color: #6B3FA0;
    }

.cc-qty-val {
    font-size: 14px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.cc-remove-btn {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-size: 15px;
    color: #d1c4e9;
    text-decoration: none;
    transition: color .15s;
    width: 24px;
    text-align: center;
}

    .cc-remove-btn:hover {
        color: #ef4444;
    }

/* ── EMPTY STATE ─────────────────────────────────────────────────── */
.cc-empty {
    text-align: center;
    padding: 48px 20px;
    color: #8a8aaa;
}

.cc-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.cc-empty p {
    font-size: 15px;
    margin-bottom: 20px;
}

.cc-shop-btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 10px;
    background: #6B3FA0;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all .18s ease;
}

    .cc-shop-btn:hover {
        background: #7d50b5;
    }

/* ── SUMMARY CARD ────────────────────────────────────────────────── */
.cc-summary-card {
    padding: 24px;
}

.cc-voucher-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.cc-input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #e8e4f0;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    color: #1a1a2e;
    outline: none;
    transition: border-color .15s;
}

    .cc-input:focus {
        border-color: #6B3FA0;
    }

.cc-input-full {
    width: 100%;
}

.cc-select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8aaa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.cc-apply-btn {
    padding: 10px 18px;
    border-radius: 8px;
    background: #6B3FA0;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
}

    .cc-apply-btn:hover {
        background: #7d50b5;
    }

.cc-voucher-msg {
    font-size: 12px;
    margin-bottom: 8px;
}

.cc-voucher-ok {
    color: #16a34a;
}

.cc-voucher-err {
    color: #ef4444;
}

.cc-voucher-hints {
    font-size: 12px;
    color: #8a8aaa;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cc-hint-code {
    padding: 2px 10px;
    border-radius: 20px;
    background: #f0f0ff;
    color: #6B3FA0;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    transition: all .15s;
}

    .cc-hint-code:hover {
        background: #6B3FA0;
        color: #fff;
    }

.cc-summary-lines {
    border-top: 1px solid #e8e4f0;
    padding-top: 14px;
    margin-top: 14px;
}

.cc-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #4a4a6a;
    margin-bottom: 8px;
}

.cc-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    padding-top: 12px;
    border-top: 1px solid #e8e4f0;
    margin-top: 4px;
}

.cc-summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cc-summary-flag {
    width: 32px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #e8e4f0;
}

.cc-summary-item-info {
    flex: 1;
}

.cc-summary-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.cc-summary-item-meta {
    font-size: 11px;
    color: #8a8aaa;
}

.cc-summary-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
}

.cc-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: #6B3FA0;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: all .18s ease;
    margin-top: 16px;
}

    .cc-checkout-btn:hover:not(:disabled) {
        background: #7d50b5;
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(107,63,160,.3);
    }

    .cc-checkout-btn:disabled {
        background: #cbd5e1;
        color: #94a3b8;
        cursor: not-allowed;
    }

.cc-secure-note {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 14px;
    justify-content: center;
}

/* ── CHECKOUT FORM ───────────────────────────────────────────────── */
.cc-field {
    margin-bottom: 18px;
}

.cc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.cc-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.cc-req {
    color: #ef4444;
}

.cc-hint {
    font-size: 12px;
    color: #8a8aaa;
    margin-top: 4px;
}

.cc-field-err {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

.cc-field-ok {
    font-size: 12px;
    color: #16a34a;
    margin-top: 4px;
}

.cc-create-account-box {
    background: #fdf6ff;
    border: 1.5px solid #e8d5f5;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 18px;
}

.cc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #1a1a2e;
    cursor: pointer;
}

    .cc-checkbox-label input[type=checkbox] {
        margin-top: 2px;
        accent-color: #6B3FA0;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

.cc-terms {
    margin-bottom: 20px;
}

.cc-link {
    color: #6B3FA0;
    text-decoration: none;
    font-weight: 600;
}

    .cc-link:hover {
        text-decoration: underline;
    }

/* ── CONTACT SUMMARY (payment step) ─────────────────────────────── */
.cc-contact-summary {
    background: #f8f6fc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.cc-contact-summary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 4px;
}

    .cc-contact-summary-row:last-child {
        margin-bottom: 0;
    }

.cc-contact-summary-label {
    color: #8a8aaa;
    min-width: 44px;
}

.cc-edit-btn {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: #6B3FA0;
    background: none;
    border: none;
    cursor: pointer;
}

    .cc-edit-btn:hover {
        text-decoration: underline;
    }

/* ── PAYMENT OPTIONS ─────────────────────────────────────────────── */
.cc-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.cc-payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.5px solid #e8e4f0;
    cursor: pointer;
    transition: all .18s ease;
}

    .cc-payment-option:hover {
        border-color: #6B3FA0;
    }

    .cc-payment-option.active {
        border-color: #6B3FA0;
        background: #f5f0fb;
    }

.cc-payment-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d5c6f0;
    flex-shrink: 0;
    position: relative;
    transition: all .15s;
}

.cc-payment-option.active .cc-payment-radio {
    border-color: #6B3FA0;
}

    .cc-payment-option.active .cc-payment-radio::after {
        content: '';
        position: absolute;
        inset: 3px;
        border-radius: 50%;
        background: #6B3FA0;
    }

.cc-payment-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.cc-payment-sub {
    font-size: 12px;
    color: #8a8aaa;
    margin-top: 2px;
}

/* ── STRIPE INPUT ────────────────────────────────────────────────── */
.cc-stripe-panel {
    margin-bottom: 16px;
}

.cc-stripe-input {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1.5px solid #e8e4f0;
    background: #fff;
    transition: border-color .15s;
    min-height: 44px;
}

    .cc-stripe-input:focus-within {
        border-color: #6B3FA0;
    }

/* ── MONEY BACK ──────────────────────────────────────────────────── */
.cc-money-back {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f5f0fb;
    border: 1px solid #e8d5f5;
    font-size: 13px;
    color: #1a1a2e;
    margin-top: 16px;
}

    .cc-money-back small {
        color: #8a8aaa;
    }

/* ── REGISTER POPUP ──────────────────────────────────────────────── */
.cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.cc-popup {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 20px 60px rgba(107,63,160,.2);
    animation: cc-popup-in .2s ease;
}

@keyframes cc-popup-in {
    from {
        opacity: 0;
        transform: scale(.95) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.cc-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    color: #8a8aaa;
    cursor: pointer;
    line-height: 1;
}

    .cc-popup-close:hover {
        color: #1a1a2e;
    }

.cc-popup-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.cc-popup-sub {
    font-size: 13px;
    color: #8a8aaa;
    margin: 0 0 24px;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width:900px) {
    .cc-page {
        grid-template-columns: 1fr;
    }

    .cc-right {
        position: static;
    }
}

@media (max-width:600px) {
    .cc-wrap {
        padding: 20px 16px;
    }

    .cc-page-title {
        font-size: 20px;
    }

    .cc-field-row {
        grid-template-columns: 1fr;
    }

    .cc-steps {
        gap: 4px;
    }

    .cc-step-label {
        display: none;
    }

    .cc-item {
        flex-wrap: wrap;
    }

    .cc-item-right {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* ── EMAIL CHECK ROW ─────────────────────────────────────────────── */
.cc-email-row {
    position: relative;
}

.cc-email-checking {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.cc-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #e8d5f5;
    border-top-color: #6B3FA0;
    animation: cc-spin .7s linear infinite;
}

@keyframes cc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── INLINE AUTH PANEL ───────────────────────────────────────────── */
.cc-inline-auth {
    background: #f5f0fb;
    border: 1.5px solid #d5c6f0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 18px;
    animation: cc-slide-down .2s ease;
}

@keyframes cc-slide-down {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cc-inline-auth-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.cc-inline-auth-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cc-inline-auth-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.cc-inline-auth-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.cc-auth-tabs {
    display: flex;
    gap: 0;
    background: #ede8f6;
    border-radius: 8px;
    padding: 3px;
    margin-bottom: 16px;
    width: fit-content;
}

.cc-auth-tab {
    font-size: 13px;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #8a8aaa;
    transition: all .15s ease;
}

    .cc-auth-tab.active {
        background: #6B3FA0;
        color: #fff;
        box-shadow: 0 2px 8px rgba(107,63,160,.25);
    }

.cc-auth-panel {
}

.cc-auth-confirm-btn {
    width: 100%;
    padding: 12px;
    border-radius: 9px;
    background: #6B3FA0;
    color: #fff;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    margin-top: 4px;
}

    .cc-auth-confirm-btn:hover {
        background: #7d50b5;
    }

.cc-auth-confirm-ghost {
    background: transparent;
    color: #6B3FA0;
    border: 1.5px solid #6B3FA0;
}

    .cc-auth-confirm-ghost:hover {
        background: #6B3FA0;
        color: #fff;
    }

.cc-forgot-row {
    text-align: right;
    margin-bottom: 4px;
}

.cc-forgot {
    font-size: 12px;
}

/* ── POPUP TABS ──────────────────────────────────────────────────── */
.cc-popup-tabs {
    display: flex;
    border-bottom: 2px solid #e8e4f0;
    margin-bottom: 20px;
}

.cc-popup-tab {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: #8a8aaa;
    cursor: pointer;
    position: relative;
    transition: all .15s;
}

    .cc-popup-tab.active {
        color: #6B3FA0;
    }

        .cc-popup-tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: #6B3FA0;
            border-radius: 2px 2px 0 0;
        }

.cc-ppanel {
}
