/*
Theme Name: Bayinah Child
Theme URI: https://wordpress.org/themes/bayinah
Template: astra
Author: tarabot
Author URI: https://taraboot.com/
Description: Child theme for Astra.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bayinah-child
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images
*/

body {
    background-color: #f7fafc;
    color: #333;
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
}

/* --- Pricing Packages Shortcode --- */

.nafaz-pricing-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 60px 20px;
    flex-wrap: wrap;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

/* Card Base - Non-Featured by Default */
.nafaz-pricing-card {
    width: 389px;
    min-height: 358px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 40px;
    padding: 32px;
    text-align: center;
    flex: 1;
    min-width: 280px;
    max-width: 390px;
    box-shadow: none;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nafaz-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

/* Featured (Middle) Card - Override for "Different" Look */
.nafaz-pricing-card.featured {
    background: #fff;
    border: 2px solid #50bda1;
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 20px 50px rgba(80, 189, 161, 0.15);
    border-radius: 40px;
}

.nafaz-pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 35px rgba(80, 189, 161, 0.2);
}

/* Featured Badge */
.nafaz-featured-badge {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: #50bda1;
    color: #fff;
    padding: 6px 24px;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(80, 189, 161, 0.3);
}

/* Title */
.nafaz-plan-title {
    font-family: 'Cairo', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    letter-spacing: 0px;
    color: #0F172A;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Price */
.nafaz-plan-price {
    display: flex;
    margin-bottom: 20px;
    flex-direction: row-reverse;
    gap: 6px;
    color: #0F172A;
    font-family: 'Cairo', sans-serif;
    justify-content: center;
    align-items: flex-end;
}

.nafaz-plan-price .amount {
    font-size: 40px;
    font-weight: 800;
    line-height: 0.8;
    /* Adjusted for better vertical centering with icon */
    display: flex;
    align-items: center;
}

.nafaz-plan-price .currency-icon::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url('assets/images/riyal-icon.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Global SVG Currency Style */
.nafaz-currency-svg {
    width: 18px;
    height: auto;
    vertical-align: middle;
    display: inline-block;
    margin-right: 5px;
    /* Space after the price */
    position: relative;
    top: -1px;
    /* Subtle tweak to fix "floating" feeling */
}

/* Fix alignment in WooCommerce prices (Checkout) */
.amount bdi,
.amount .woocommerce-Price-amount {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

/* --- Premium WooCommerce Loader Override (Final Version) --- */

/* Hide ALL content and default styling of the loader box */
.blockUI.blockMsg {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    color: transparent !important;
    /* Hide default text */
    text-indent: -9999px !important;
    /* Hide text if color doesn't work */
    overflow: visible !important;
}

.blockUI.blockMsg * {
    display: none !important;
    /* Hide any images, dots, or spans */
}

/* Create the new professional spinner using Pseudo-elements */
.blockUI.blockMsg::before {
    content: "" !important;
    display: block !important;
    width: 50px !important;
    height: 50px !important;
    border: 3px solid rgba(255, 255, 255, 0.1) !important;
    border-top: 3px solid #4CAF93 !important;
    border-radius: 50% !important;
    animation: nafaz-pulse-spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite !important;
    margin: 0 auto 15px auto !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
}

/* Add the professional text */
.blockUI.blockMsg::after {
    content: "جاري تنفيذ طلبك..." !important;
    display: block !important;
    color: #ffffff !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    text-align: center !important;
    text-indent: 0 !important;
    letter-spacing: 0 !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5) !important;
    white-space: nowrap !important;
}

/* Refined Dark Overlay */
.blockUI.blockOverlay {
    background-color: rgba(6, 15, 30, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    opacity: 1 !important;
    z-index: 10000 !important;
}

@keyframes nafaz-pulse-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Features List */
.nafaz-plan-features {
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    direction: rtl;
    text-align: right;
}

.nafaz-plan-features p {
    margin: 0 0 10px;
}

.nafaz-plan-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
    padding-right: 15px;
}

.nafaz-plan-features li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 20px;
}

.nafaz-plan-features li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 9px;
    width: 6px;
    height: 6px;
    background-color: #50bda1;
    border-radius: 50%;
}

/* Buttons */
.nafaz-plan-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    width: 100%;
    border-radius: 16px;
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #0F172A;
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    transition: all 0.3s;
    box-sizing: border-box;
    cursor: pointer;
}

.nafaz-plan-btn.primary {
    background: #50bda1;
    color: #fff;
    border: 2px solid #50bda1;
    box-shadow: 0 8px 20px rgba(80, 189, 161, 0.25);
}

.nafaz-plan-btn.primary:hover {
    background: #3da086;
    border-color: #3da086;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(80, 189, 161, 0.35);
    color: #fff;
}

.nafaz-plan-btn.outline {
    background: #FFFFFF;
    color: #0F172A;
    border: 2px solid #E2E8F0;
}

.nafaz-plan-btn.outline:hover {
    border-color: #50bda1;
    color: #50bda1;
    background: #f8fafc;
}

/* Responsive */
@media (max-width: 900px) {
    .nafaz-pricing-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .nafaz-pricing-card {
        width: 100%;
        max-width: 400px;
        margin-bottom: 0px;
    }

    .nafaz-pricing-card.featured {
        transform: scale(1.02);
        order: -1;
        margin-top: 15px;
        margin-bottom: 15px;
    }

    .nafaz-pricing-card.featured:hover {
        transform: scale(1.02);
    }

    .nafaz-featured-badge {
        top: -14px;
    }
}

/* --- Virtual Invoice Performance Optimization --- */
.nafaz-preview-wrapper.nafaz-perf-optimized {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
    will-change: transform;
}

.nafaz-preview-card {
    /* Simplified shadow for scrolling performance */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03) !important;
}

.nafaz-brand-logo img {
    /* Prevent layout shift */
    display: block;
    max-width: 150px;
    height: auto;
}

/* --- Custom Checkout UI (Confirm Package Change) --- */

.woocommerce-checkout body {
    overflow: hidden !important;
    height: 100vh !important;
}

.nafaz-checkout-page-wrapper {
    background-color: #0c1c36;
    /* Dark background from image */
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9991;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    direction: rtl;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    box-sizing: border-box;
    overflow-y: auto;
    /* Allow scrolling ONLY if content is larger than screen (mainly for small phones) */
}

.nafaz-checkout-modal {
    background: #ffffff;
    width: 500px !important;
    /* Force fixed width on desktop */
    max-width: 95% !important;
    /* Ensure responsiveness on mobile */
    border-radius: 32px;
    padding: 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: auto;
    /* Ensure centering when scrolling */
}

.nafaz-modal-close {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 44px;
    height: 44px;
    background: #f8fafc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
}

.nafaz-modal-close:hover {
    background: #f1f5f9;
}

.nafaz-modal-header {
    text-align: center;
    margin-bottom: 45px;
}

.nafaz-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0c1c36;
    margin: 0;
    text-align: justify;
}

.nafaz-checkout-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.item-name {
    font-size: 18px;
    font-weight: 700;
    color: #0c1c36;
    margin: 0;
}

.item-meta {
    font-size: 14px;
    color: #90A1B9;
    display: block;
    margin-top: 4px;
}

.item-price {
    font-size: 18px;
    font-weight: 800;
    color: #0c1c36;
}

.nafaz-checkout-divider {
    height: 1px;
    background-color: #f1f5f9;
    margin: 30px 0;
}

.nafaz-totals-area {
    margin-bottom: 35px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.total-row .label {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}

.total-row .value {
    font-size: 14px;
    font-weight: 700;
    color: #0c1c36;
}

.nafaz-grand-total {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 0px solid #f1f5f9;
    /* No border in image */
}

.nafaz-grand-total .label {
    font-size: 18px;
    font-weight: 700;
    color: #0c1c36;
}

.nafaz-grand-total .value {
    font-size: 20px;
    font-weight: 800;
    color: #0c1c36;
}

.nafaz-payment-method-selector {
    margin-bottom: 40px;
}

/* Dynamic Payment Styles */
.payment-box-inner-dynamic #payment {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.payment-box-inner-dynamic #payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    list-style: none !important;
}

.payment-box-inner-dynamic #payment ul.payment_methods li {
    background: #f8fafc;
    border-radius: 16px;
    padding: 15px 20px;
    margin-bottom: 12px;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.payment-box-inner-dynamic #payment ul.payment_methods li:hover {
    border-color: #50bda1;
}

.payment-box-inner-dynamic #payment ul.payment_methods li input[type="radio"] {
    margin-left: 10px;
}

.payment-box-inner-dynamic #payment ul.payment_methods li label {
    font-size: 15px;
    font-weight: 700;
    color: #0c1c36;
    cursor: pointer;
}

.payment-box-inner-dynamic #payment .payment_box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin-top: 10px !important;
    font-size: 13px !important;
    color: #64748b !important;
}

.payment-box-inner-dynamic #payment .payment_box::before {
    display: none !important;
}

/* Hide the default WooCommerce place order section inside the dynamic block */
.payment-box-inner-dynamic #payment .form-row.place-order {
    display: none !important;
}

.nafaz-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 30px;
}

.nafaz-primary-btn {
    background: #4CAF93 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 16px 45px !important;
    border-radius: 14px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: transform 0.2s, background 0.2s !important;
    box-shadow: 0px 4px 6px -4px #4CAF9333, 0px 10px 15px -3px #4CAF9333;
}

.nafaz-primary-btn:hover {
    background: #45a787 !important;
    transform: translateY(-2px);
}

.nafaz-cancel-btn {
    font-size: 16px;
    font-weight: 700;
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.nafaz-cancel-btn:hover {
    color: #64748b;
}

/* Hide Astra/Default WooCommerce wrapper elements on this page if needed */
.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    width: 100% !important;
}

@media (max-width: 600px) {
    .nafaz-checkout-modal {
        padding: 30px 20px;
        border-radius: 24px;
    }

    .nafaz-modal-footer {
        flex-direction: column-reverse;
        gap: 15px;
    }

    .nafaz-primary-btn {
        width: 100%;
    }

    .nafaz-modal-close {
        top: 15px;
        left: 15px;
        width: 36px;
        height: 36px;
    }
}

/* Hide Astra theme header and footer on checkout for the modal effect */
.woocommerce-checkout #masthead,
.woocommerce-checkout #colophon,
.woocommerce-checkout .site-header,
.woocommerce-checkout .site-footer,
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .woocommerce-notices-wrapper {
    display: none !important;
}

.woocommerce-checkout .site-content {
    padding: 0 !important;
    margin: 0 !important;
}



@media (max-width: 767px) {
  .elementor-element-c151ed4 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 15px;
    padding-right: 15px; 
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
  }
  .elementor-element-c151ed4 .card-home {
    min-width: 70%;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }
  .elementor-element-c151ed4::-webkit-scrollbar {
    display: none;
  }
  .elementor-element-c151ed4 {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

}



