/**
 * Checkout Page Styles
 *
 * @package BukhariShop
 * @since 1.0.0
 */

/* ============================================
   Checkout Page Layout
   ============================================ */

.bukhari-checkout-page {
    padding: 40px 0;
    min-height: 60vh;
}

/* ============================================
   Loading & Empty States
   ============================================ */

.bukhari-checkout-loading,
.bukhari-checkout-empty {
    text-align: center;
    padding: 80px 20px;
}

.bukhari-checkout-empty {
    padding: 100px 20px;
}

.bukhari-checkout-empty .bukhari-empty-icon {
    font-size: 5rem;
    color: var(--bukhari-pink);
    opacity: 0.3;
    margin-bottom: 20px;
}

.bukhari-checkout-empty h2 {
    color: var(--bukhari-gold);
    font-size: 2rem;
    margin-bottom: 10px;
}

.bukhari-checkout-empty p {
    color: var(--bukhari-gold);
    opacity: 0.7;
    margin-bottom: 30px;
}

/* ============================================
   Checkout Layout
   ============================================ */

.bukhari-checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.bukhari-checkout-main {
    background: rgba(74, 14, 46, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 30px;
}

.bukhari-checkout-sidebar {
    position: sticky;
    top: 100px;
}

/* ============================================
   Checkout Sections
   ============================================ */

.bukhari-checkout-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.bukhari-checkout-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.bukhari-section-title {
    color: var(--bukhari-gold);
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bukhari-section-title i {
    color: var(--bukhari-pink);
}

/* ============================================
   Form Elements
   ============================================ */

.bukhari-form-row {
    margin-bottom: 20px;
}

.bukhari-form-row:last-child {
    margin-bottom: 0;
}

.bukhari-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.bukhari-form-group {
    display: flex;
    flex-direction: column;
}

.bukhari-form-group label {
    color: var(--bukhari-gold);
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.bukhari-form-group label .required {
    color: var(--bukhari-pink);
    margin-left: 3px;
}

.bukhari-input,
.bukhari-textarea,
.bukhari-select {
    background: rgba(45, 10, 31, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--bukhari-gold);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.bukhari-input:focus,
.bukhari-textarea:focus,
.bukhari-select:focus {
    outline: none;
    border-color: var(--bukhari-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.bukhari-input::placeholder,
.bukhari-textarea::placeholder {
    color: rgba(212, 175, 55, 0.5);
}

.bukhari-textarea {
    resize: vertical;
    min-height: 80px;
}

.bukhari-help-text {
    color: var(--bukhari-gold);
    font-size: 0.85rem;
    margin-top: 5px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bukhari-help-text i {
    color: #25D366;
}

.bukhari-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.bukhari-error.show {
    display: block;
}

/* ============================================
   Payment Methods
   ============================================ */

.bukhari-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bukhari-payment-option {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(45, 10, 31, 0.5);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.bukhari-payment-option:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(45, 10, 31, 0.7);
}

.bukhari-payment-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--bukhari-gold);
}

.bukhari-payment-option input[type="radio"]:checked ~ .bukhari-payment-content {
    color: var(--bukhari-gold);
}

.bukhari-payment-option:has(input:checked) {
    border-color: var(--bukhari-gold);
    background: rgba(212, 175, 55, 0.1);
}

.bukhari-payment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: rgba(212, 175, 55, 0.7);
    transition: color 0.3s;
}

.bukhari-payment-content i {
    font-size: 1.5rem;
    color: var(--bukhari-pink);
    margin-bottom: 5px;
}

.bukhari-payment-content strong {
    font-size: 1.05rem;
    color: var(--bukhari-gold);
}

.bukhari-payment-content small {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ============================================
   Payment Instructions
   ============================================ */

.bukhari-payment-instructions {
    margin-top: 20px;
}

.bukhari-alert {
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 12px;
}

.bukhari-alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.bukhari-alert i {
    color: #3b82f6;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bukhari-alert strong {
    color: var(--bukhari-gold);
    display: block;
    margin-bottom: 8px;
}

.bukhari-alert p {
    color: var(--bukhari-gold);
    opacity: 0.8;
    margin: 5px 0;
    font-size: 0.9rem;
}

/* ============================================
   Order Summary Sidebar
   ============================================ */

.bukhari-order-summary {
    background: rgba(74, 14, 46, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 25px;
}

.bukhari-summary-title {
    color: var(--bukhari-gold);
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bukhari-summary-title i {
    color: var(--bukhari-pink);
}

/* ============================================
   Summary Items
   ============================================ */

.bukhari-summary-items {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.bukhari-summary-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: rgba(45, 10, 31, 0.4);
    border-radius: 8px;
    margin-bottom: 10px;
}

.bukhari-summary-item:last-child {
    margin-bottom: 0;
}

.bukhari-summary-item-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.bukhari-summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bukhari-summary-item-details {
    flex: 1;
}

.bukhari-summary-item-name {
    color: var(--bukhari-gold);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.bukhari-summary-item-meta {
    color: var(--bukhari-gold);
    font-size: 0.8rem;
    opacity: 0.6;
    margin-bottom: 6px;
}

.bukhari-summary-item-price {
    color: var(--bukhari-pink);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   Summary Pricing
   ============================================ */

.bukhari-summary-pricing {
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.bukhari-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--bukhari-gold);
    font-size: 1rem;
}

.bukhari-summary-total {
    border-top: 2px solid rgba(212, 175, 55, 0.3);
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.1rem;
    font-weight: 700;
}

.bukhari-summary-row span:last-child {
    color: var(--bukhari-pink);
    font-weight: 600;
}

.bukhari-summary-total span:last-child {
    font-size: 1.6rem;
}

/* ============================================
   Buttons
   ============================================ */

.bukhari-btn-large {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bukhari-btn-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bukhari-edit-cart {
    display: block;
    text-align: center;
    color: var(--bukhari-gold);
    text-decoration: none;
    margin-top: 15px;
    font-size: 0.95rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.bukhari-edit-cart:hover {
    opacity: 1;
    text-decoration: underline;
}

.bukhari-edit-cart i {
    margin-right: 6px;
}

/* ============================================
   Loading Button State
   ============================================ */

.bukhari-btn.loading {
    position: relative;
    pointer-events: none;
}

.bukhari-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(45, 10, 31, 0.3);
    border-top-color: #2d0a1f;
    border-radius: 50%;
    animation: bukhari-spin 0.8s linear infinite;
}

/* ============================================
   Mobile Responsive
   ============================================ */

@media (max-width: 768px) {
    .bukhari-checkout-page {
        padding: 20px 0;
    }

    .bukhari-checkout-layout {
        grid-template-columns: 1fr;
    }

    .bukhari-checkout-sidebar {
        position: static;
        order: -1; /* Show summary first on mobile */
    }

    .bukhari-checkout-main {
        padding: 20px;
    }

    .bukhari-form-row-2col {
        grid-template-columns: 1fr;
    }

    .bukhari-payment-option {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .bukhari-payment-option input[type="radio"] {
        align-self: flex-start;
    }

    .bukhari-summary-items {
        max-height: 200px;
    }
}

/* ============================================
   Scrollbar Styling (for summary items)
   ============================================ */

.bukhari-summary-items::-webkit-scrollbar {
    width: 6px;
}

.bukhari-summary-items::-webkit-scrollbar-track {
    background: rgba(45, 10, 31, 0.4);
    border-radius: 10px;
}

.bukhari-summary-items::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

.bukhari-summary-items::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}