/* ============================================
   Checkout Page - Professional Design
   ============================================ */

:root {
    --checkout-primary: #1e3a8a;
    --checkout-success: #10b981;
    --checkout-border: #e5e7eb;
    --checkout-bg: #f9fafb;
    --checkout-card-bg: #ffffff;
}

/* Layout */
.checkout-page {
    background: var(--checkout-bg);
    min-height: 100vh;
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, sans-serif;
}

.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 500px;
    gap: 30px;
    align-items: start;
}

/* Cards */
.card {
    background: var(--checkout-card-bg);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Order Summary */
.order-summary-section {
    position: sticky;
    top: 20px;
}

.booking-details {
    margin-bottom: 24px;
}

.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--checkout-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--checkout-border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6b7280;
    font-size: 14px;
}

.detail-value {
    color: #111827;
    font-weight: 600;
    font-size: 15px;
}

/* Price Breakdown */
.price-breakdown {
    border-top: 2px solid var(--checkout-border);
    padding-top: 20px;
    margin-top: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
}

.price-row span:first-child {
    color: #6b7280;
}

.price-row span:last-child {
    color: #111827;
    font-weight: 500;
}

.price-row.total {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--checkout-border);
    font-size: 20px;
    font-weight: 700;
}

.price-row.total span:last-child {
    color: var(--checkout-primary);
}

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 12px;
}

.badge {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: white;
    border-radius: 8px;
    font-size: 13px;
    color: #1e3a8a;
    font-weight: 500;
}

.badge .icon {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}

/* Payment Section */
/* Styles defined inline in card class */

.customer-info {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-row label {
    color: #6b7280;
    font-size: 14px;
}

.info-row span {
    color: #111827;
    font-weight: 600;
    font-size: 14px;
}

.divider {
    height: 1px;
    background: var(--checkout-border);
    margin: 24px 0;
}

/* Moyasar Form */
.mysr-form {
    min-height: 400px;
    margin: 24px 0;
}

/* Override Moyasar default styles for better integration */
.mysr-form .mysr-form {
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.mysr-form input,
.mysr-form select {
    height: 48px !important;
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    font-size: 15px !important;
    padding: 0 16px !important;
    font-family: 'Tajawal', sans-serif !important;
}

.mysr-form input:focus,
.mysr-form select:focus {
    border-color: var(--checkout-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
    outline: none !important;
}

.mysr-form label {
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
    font-size: 14px !important;
}

.mysr-form button[type="submit"] {
    background: var(--checkout-primary) !important;
    color: white !important;
    height: 56px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    margin-top: 24px !important;
}

.mysr-form button[type="submit"]:hover {
    background: #1e40af !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3) !important;
}

.mysr-form button[type="submit"]:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Payment Methods Info */
.payment-methods-info {
    margin-top: 24px;
    padding: 20px;
    background: #f0f9ff;
    border-radius: 12px;
}

.supported-cards {
    margin: 0;
    font-size: 14px;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.card-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.card-icons img {
    height: 32px;
    width: auto;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

/* Terms */
.terms {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--checkout-border);
}

.small-text {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

.small-text a {
    color: var(--checkout-primary);
    text-decoration: none;
    font-weight: 600;
}

.small-text a:hover {
    text-decoration: underline;
}

/* Navbar */
.navbar {
    background: white;
    border-bottom: 1px solid var(--checkout-border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--checkout-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-links a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--checkout-primary);
}

/* Security Badge */
.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    color: #065f46;
}

.security-badge::before {
    content: "🔒";
    font-size: 16px;
}

/* Responsive */
@media (max-width: 968px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .order-summary-section {
        position: static;
        order: 2;
    }

    .payment-section {
        order: 1;
    }
}

@media (max-width: 640px) {
    .checkout-container {
        padding: 20px 16px;
    }

    .card {
        padding: 20px;
    }

    .section-title {
        font-size: 18px;
    }

    .trust-badges {
        flex-direction: column;
    }

    .badge {
        padding: 16px;
    }
}