/* ============================================================
   KHÁNH BEAUTY – Checkout Page
   checkout.css | prefix: khanhbeauty_checkout_
   ============================================================ */

.khanhbeauty_checkout_page {
    padding: 40px 16px;
    background: var(--kb-bg-lt, #f8fafc);
    min-height: 80vh;
    font-family: var(--kb-font, "Plus Jakarta Sans", sans-serif);
}

.khanhbeauty_checkout_header {
    margin-bottom: 28px;
    text-align: center;
}

.khanhbeauty_checkout_title {
    font-size: 32px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.khanhbeauty_checkout_subtitle {
    font-size: 15px;
    color: var(--kb-text-2, #64748b);
    margin: 0;
}

.khanhbeauty_checkout_error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.khanhbeauty_checkout_layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 28px;
    align-items: start;
}

.khanhbeauty_checkout_layout > * {
    min-width: 0;
}

.khanhbeauty_checkout_block {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--kb-border, #e2e8f0);
    box-shadow: var(--kb-shadow-sm, 0 4px 16px rgba(15, 23, 42, 0.03));
}

.khanhbeauty_checkout_sidebar {
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid var(--kb-border, #e2e8f0);
    box-shadow: var(--kb-shadow-sm, 0 4px 16px rgba(15, 23, 42, 0.03));
    position: sticky;
    top: 90px;
}

.khanhbeauty_checkout_section_title {
    font-size: 18px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 10px;
}
.khanhbeauty_checkout_section_title.border-top {
    border-bottom: none;
    border-top: 1px solid var(--kb-border-lt, #f1f5f9);
    padding-top: 20px;
    padding-bottom: 0;
    margin-bottom: 18px;
}

.khanhbeauty_checkout_form_row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.khanhbeauty_checkout_form_group {
    margin-bottom: 16px;
}

.khanhbeauty_checkout_label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.khanhbeauty_checkout_label .required {
    color: #ef4444;
}

.khanhbeauty_checkout_input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.khanhbeauty_checkout_input:focus {
    border-color: var(--kb-pink, #ec4899);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

textarea.khanhbeauty_checkout_input {
    resize: vertical;
}

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

.khanhbeauty_checkout_payment_method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #ffffff;
    border: 1.5px solid var(--kb-border, #e2e8f0);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.khanhbeauty_checkout_payment_method:has(input:checked) {
    background: var(--kb-pink-light, #fdf2f8);
    border-color: var(--kb-pink, #ec4899);
}

.khanhbeauty_checkout_payment_radio {
    width: 18px;
    height: 18px;
    accent-color: var(--kb-pink, #ec4899);
}

.khanhbeauty_checkout_payment_name {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--kb-black, #0f172a);
}

.khanhbeauty_checkout_payment_desc {
    font-size: 12.5px;
    color: var(--kb-text-2, #64748b);
    display: block;
    margin-top: 2px;
}

.khanhbeauty_checkout_sidebar_header {
    font-size: 18px;
    font-weight: 800;
    color: var(--kb-black, #0f172a);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.khanhbeauty_checkout_sidebar_count {
    font-size: 13px;
    font-weight: 700;
    color: var(--kb-pink, #ec4899);
    background: var(--kb-pink-light, #fdf2f8);
    padding: 4px 10px;
    border-radius: 99px;
}

.khanhbeauty_checkout_cart_items {
    max-height: 320px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    padding-right: 4px;
}
.khanhbeauty_checkout_cart_items::-webkit-scrollbar {
    width: 4px;
}
.khanhbeauty_checkout_cart_items::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.khanhbeauty_checkout_cart_item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--kb-border-lt, #f1f5f9);
}
.khanhbeauty_checkout_cart_item_img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid var(--kb-border, #e2e8f0);
}
.khanhbeauty_checkout_cart_item_info {
    flex: 1;
    min-width: 0;
}
.khanhbeauty_checkout_cart_item_name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--kb-black, #0f172a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}
.khanhbeauty_checkout_cart_item_price {
    font-size: 12.5px;
    color: var(--kb-text-2, #64748b);
}
.khanhbeauty_checkout_cart_item_total {
    font-size: 14px;
    font-weight: 800;
    color: var(--kb-pink, #ec4899);
}

.khanhbeauty_checkout_summary {
    padding-top: 16px;
    border-top: 1px solid var(--kb-border-lt, #f1f5f9);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.khanhbeauty_checkout_summary_row {
    display: flex;
    justify-content: space-between;
    font-size: 14.5px;
    color: var(--kb-text-2, #64748b);
}
.khanhbeauty_checkout_summary_val {
    color: var(--kb-black, #0f172a);
    font-weight: 700;
}
.khanhbeauty_checkout_summary_free {
    color: #10b981;
    font-weight: 700;
}
.khanhbeauty_checkout_summary_total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 900;
    color: var(--kb-pink-dark, #be185d);
    padding-top: 16px;
    margin-top: 4px;
    border-top: 1.5px dashed #fbcfe8;
}

.khanhbeauty_checkout_submit_btn {
    width: 100%;
    margin-top: 24px;
    padding: 16px;
    background: linear-gradient(
        135deg,
        var(--kb-pink, #ec4899),
        var(--kb-pink-dark, #be185d)
    );
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(236, 72, 153, 0.3);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.khanhbeauty_checkout_submit_btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(236, 72, 153, 0.4);
}
.khanhbeauty_checkout_submit_btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.khanhbeauty_checkout_security_note {
    font-size: 12.5px;
    color: var(--kb-text-3, #94a3b8);
    text-align: center;
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .khanhbeauty_checkout_layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .khanhbeauty_checkout_sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .khanhbeauty_checkout_page {
        padding: 24px 12px;
    }
    .khanhbeauty_checkout_form_row {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .khanhbeauty_checkout_block,
    .khanhbeauty_checkout_sidebar {
        padding: 20px 16px;
    }
    .khanhbeauty_checkout_title {
        font-size: 24px;
    }
    .khanhbeauty_checkout_payment_method {
        padding: 12px;
        align-items: flex-start;
    }
    .khanhbeauty_checkout_payment_radio {
        margin-top: 2px;
    }
    .khanhbeauty_checkout_submit_btn {
        padding: 14px;
        font-size: 15px;
    }
}
