/* Checkout Panel Component
 * Adapted from account-panel for checkout flow
 * Provides card-style sections with icons and meta descriptions
 */

/* ==========================================================================
   Core Panel
   ========================================================================== */

.checkout-panel {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 16px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
    padding: 20px;
    margin-bottom: 24px;
}

/* ==========================================================================
   Panel Header (CSS Grid Layout)
   ========================================================================== */

.checkout-panel__header {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    align-items: start;
    border-bottom: 1px solid rgba(47, 27, 37, 0.12);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

/* Circular gradient icon */
.checkout-panel__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #f6d5dd, #f4e3eb);
    color: var(--ameyze-primary, #7f4d5a);
    font-size: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
}

/* Title */
.checkout-panel__title {
    margin: 0;
    font-weight: 600;
    color: #000000;
    font-size: 1.25rem;
    line-height: 1.3;
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}

/* Meta description */
.checkout-panel__meta {
    margin: 0;
    color: #4a4a4a;
    font-size: 0.95rem;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
}

/* Body content area */
.checkout-panel__body {
    display: block;
}

/* ==========================================================================
   Compact Variant (for review cards)
   ========================================================================== */

.checkout-panel--compact {
    padding: 16px;
    margin-bottom: 16px;
}

.checkout-panel--compact .checkout-panel__header {
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.checkout-panel--compact .checkout-panel__icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.checkout-panel--compact .checkout-panel__title {
    font-size: 1rem;
}

/* Small icon variant */
.checkout-panel__icon--sm {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Inline Header Variant (single row, no meta)
   ========================================================================== */

.checkout-panel__header--inline {
    grid-template-rows: auto;
    align-items: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
}

.checkout-panel__header--inline .checkout-panel__icon {
    grid-row: 1;
}

.checkout-panel__header--inline .checkout-panel__title {
    grid-row: 1;
    align-self: center;
}

/* ==========================================================================
   Compact Header Variant
   ========================================================================== */

.checkout-panel__header--compact {
    padding-bottom: 10px;
    margin-bottom: 12px;
}

/* ==========================================================================
   Highlight Variant (for account benefits)
   ========================================================================== */

.checkout-panel--highlight {
    background: linear-gradient(135deg, #fffbfc 0%, #fff5f7 100%);
    border: 2px solid rgba(216, 169, 180, 0.3);
}

.checkout-panel--highlight:hover {
    border-color: rgba(216, 169, 180, 0.45);
}

/* Highlight icon (green for benefits/gifts) */
.checkout-panel__icon--highlight {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

/* ==========================================================================
   Benefits List (for account benefits panel)
   ========================================================================== */

.checkout-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.checkout-benefits-list__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--ameyze-text-dark, #212529);
    font-size: 0.95rem;
}

.checkout-benefits-list__item i {
    color: #28a745;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Signup Button
   ========================================================================== */

.btn-signup {
    background: linear-gradient(135deg, var(--ameyze-primary, #7f4d5a), #964d5a);
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: #ffffff;
    transition: all 0.3s ease;
}

.btn-signup:hover {
    background: linear-gradient(135deg, #964d5a, var(--ameyze-primary, #7f4d5a));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(127, 77, 90, 0.3);
    color: #ffffff;
}

.btn-signup:active {
    transform: translateY(0);
}

/* ==========================================================================
   Responsive - Tablet
   ========================================================================== */

@media (min-width: 576px) {
    .checkout-panel__header {
        gap: 2px 12px;
        align-items: center;
    }
}

@media (min-width: 768px) {
    .checkout-panel {
        padding: 28px;
    }
}

/* ==========================================================================
   Responsive - Mobile
   ========================================================================== */

@media (max-width: 575px) {
    .checkout-panel {
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        box-shadow: none;
        border-top: 1px solid rgba(15, 23, 42, 0.07);
    }

    .checkout-panel:first-child {
        border-top: none;
    }

    .checkout-panel__header {
        grid-template-columns: 36px 1fr;
        gap: 2px 8px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .checkout-panel__icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .checkout-panel__title {
        font-size: 1rem;
        line-height: 1.2;
    }

    .checkout-panel__meta {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    /* Compact variant mobile adjustments */
    .checkout-panel--compact {
        padding: 0.65rem;
        margin-bottom: 0.5rem;
    }

    .checkout-panel--compact .checkout-panel__icon,
    .checkout-panel__icon--sm {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .checkout-panel--compact .checkout-panel__title {
        font-size: 0.9rem;
    }

    /* Benefits list mobile */
    .checkout-benefits-list__item {
        padding: 0.35rem 0;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .checkout-benefits-list__item i {
        font-size: 1rem;
    }

    /* Signup button mobile */
    .btn-signup {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   Order Review Grid (Step 3)
   ========================================================================== */

.order-review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (max-width: 767px) {
    .order-review-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
