/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.meal-calculator-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 12px;
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    background: #ffffff;
}

/* Grid الرئيسي - sidebar يسار + محتوى يمين */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}


/* Payment Summary Box */
/* Payment Summary Box - نفس الصورة بالظبط */
.payment-summary-box {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 32px 28px;
    position: sticky;
    top: 20px;
    box-shadow: none;
}

/* Summary Image - الشنطة */
.summary-image {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
}

.bag-image {
    font-size: 0;
    width: 25%;
    height: 100px;
    margin: 0 auto 12px;
    display: block;
    background-image: url('/wp-content/uploads/2026/01/imgi_7_calo-bag__1_-removebg-preview.png');
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
}
/*
.bag-image::before {
    content: '🛍️';
    font-size: 80px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
*/
.bag-subtitle {
    color: #1a1a1a;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    background: white;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
}

/* Summary Header */
.summary-header {
    text-align: right;
    margin-bottom: 24px;
    padding-bottom: 0;
    border-bottom: none;
    width: 75%;
}

.summary-header h3 {
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
    margin: 0 0 8px;
    text-align: right;
}

.dynamic-summary {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0;
    min-height: auto;
    transition: all 0.3s ease;
    text-align: right;
}

.dynamic-summary.active {
    color: #1a1a1a;
    font-weight: 500;
}

/* Promo Code Section */
.promo-code-section {
    margin-bottom: 16px;
}

.promo-toggle {
    width: 100%;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.promo-toggle:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.promo-icon {
    font-size: 16px;
}

.promo-input-wrapper {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.promo-input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s;
}

.promo-input:focus {
    outline: none;
    border-color: #10b981;
}

.promo-apply {
    background: #eaf7f2;
    color: #24a170;
    border: none;
    padding: 12px 22px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.promo-apply:hover {
    background: #166144;
    color: white;
}
.promo-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.promo-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.promo-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Discount Banner - البانر الأخضر */
.discount-banner {
    background: linear-gradient(90deg, #34d399 0%, #10b981 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    position: relative;
}

.discount-banner::before {
    content: '';
    position: absolute;
    left: 12px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.discount-icon {
    font-size: 16px;
    position: relative;
    z-index: 1;
}

/* ملخص الدفع - العنوان */
.summary-title { 
    font-size: 18px;
    font-weight: 700 !important;
    color: #1a1a1a;
    margin-bottom: 16px;
    text-align: right;
}

.summary-body {
    margin-bottom: 24px;
    
    padding: 0px;
    border-radius: 12px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
}

.summary-line .label {
    color: #6b7280;
    font-weight: 400;
}

.summary-line .value {
    color: #1a1a1a;
    font-weight: 600;
}

.discount-value {
    color: #10b981 !important;
}

/* خط الفاصل */
.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 0;
}

/* المجموع */
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
}

.summary-total .label {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.summary-total .value.total {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

/* Checkout Button - زر كمل */
.checkout-btn {
    width: 100%;
    background: #166144;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 13px 16px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.checkout-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
}

.checkout-btn:active {
    transform: translateY(0);
}

.checkout-btn .arrow {
    font-size: 18px;
    transition: transform 0.3s;
}

.checkout-btn:hover .arrow {
    transform: translateX(-3px);
}

/* Security Badges - إزالتها أو إخفائها */
.security-badges {
    display: none;
}

/* تعديل الخط العام */
.payment-summary-box * {
    font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

/* Responsive */
@media (max-width: 1024px) {
    .payment-summary-box {
        position: relative;
        top: 0;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .summary-header h3 {
        font-size: 20px;
    }
    
    .bag-image {
        width: 100px;
        height: 100px;
    }
    
    .bag-image::before {
        font-size: 64px;
    }
    
    .summary-body {
        padding: 16px;
    }
}

/* المحتوى الرئيسي - يمين */
.main-content-area {
    background: #fafafa;
    border-radius: 20px;
    padding: 25px 18px;
}

/* Main Header */
.main-header {
    text-align: center;
    margin-bottom: 32px;
}

.main-header h1 {
    font-size: 26px;
    color: #1a1a1a;
    font-weight: 700;
}

/* Meal Types Grid - 6 كروت */
.meal-types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 50px;
}

.meal-type-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.meal-type-card:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}
.meal-type-card.selected .btn-select
{
    background-color: #166144 ;
    color: white;
}

.meal-type-card.selected {
    border:solid 2px #166144;
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}
.text-selected {
    display: none;
}

.meal-type-card.selected .text-default {
    display: none;
}

.meal-type-card.selected .text-selected {
    display: inline;
}


.card-header {
    display: flex;
    gap: 30px;
    margin-bottom: 12px;
    justify-content: space-between;

}

.meal-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    flex-shrink: 0;
}

.card-title h3 {
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 4px;
    font-weight: 700;
}

.card-title p {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.btn-info {
   
    background: transparent;
    border: none ;
    color: #24a170;
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}
.btn-info svg {
    transform: rotate(180deg);
     display: block; 
}

/*
.btn-info:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}
*/

.btn-select {
    flex: 0.3;
    background: #C3EADA;
    border: none;
    color: #3E9874;
    padding: 7px 12px;
    border-radius: 35px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    
}

.btn-select:hover {
    background: #059669;
    color: white;
}

/* Sections */
.section-meals,
.section-days,
.section-payment {
    margin-bottom: 40px;
}

.section-meals h2,
.section-days h2,
.section-payment h2 {
    font-size: 28px;
    color: #1f2937;
    text-align: right;
    margin-bottom: 14px;
    font-weight: 700;
}

.subtitle {
    text-align: right;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 24px;
}

/* Meals Grid */
.meals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 100%;
    margin: 0 auto;
}

.meal-option {
    cursor: pointer;
}

.meal-option.mandatory {
    cursor: not-allowed;
}

.meal-option input {
    display: none;
}

.meal-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.meal-check {
   /* position: absolute; */
   /* top: 8px; */
/*     right: 8px; */
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    background: white;
    transition: all 0.3s;
}

.meal-option input:checked + .meal-box,
.meal-box.active {
    border: solid 2px #166144 ;
    background: #ecfdf5;
}


.meal-option input:checked + .meal-box .meal-check,
.meal-box.active .meal-check {
    background: #166144;
    border-color: #166144;
    color: white;
}

.meal-box span {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.meal-option:hover .meal-box:not(.active) {
    border-color: #cbd5e0;
}

/* Days Grid */
.days-grid {
    display: flex;
    gap: 8px;
    justify-content: start;
    flex-wrap: wrap;
}

.day-option {
    cursor: pointer;
}

.day-option input {
    display: none;
}

.day-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.3s;
    white-space: nowrap;
}

.day-option input:checked + .day-box {
    background: #166144;
    border-color: #166144;
    color: white;
}

.day-option:hover .day-box {
    border-color: #166144;
}

/* Payment Options */
.payment-options {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}

.payment-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    padding: 16px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    
}

.payment-card input {
    display: none;
}

.payment-card:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.payment-card input:checked ~ .payment-content {
    color: #1f2937;
}

.payment-card input:checked ~ .radio-indicator {
    background: white;
    border-color: #166144;
}

.payment-card input:checked ~ .radio-indicator::after {
    transform: scale(1);
}

.payment-card.recommended {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.payment-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

.price-badge {
    background: #f3f4f6;
    color: #1f2937;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    position: absolute;
    left: 6%;
    top: 40%;
}

.payment-content p {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
}

.save-badge {
    /*display: inline-block;*/
    display: none;
    background: #d1fae5;
    color: #065f46;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

.save-badge.green {
    background: #d1fae5;
    color: #065f46;
}

.radio-indicator {
    position: absolute;
    top: 40%;
    left: 16px;
    width: 21px;
    height: 21px;
    border: 1.5px solid #cbd5e0;
    border-radius: 50%;
    background: white;
    transition: all 0.3s;
}

.radio-indicator::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    background: #166144;
    border-radius: 50%;
    transition: transform 0.3s;
}

.recommended-badge {
    position: absolute;
    top: -8px;
    right: 16px;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.2);
}
.payment-card:has(input:checked) {
    border:solid 2px #166144;
    background: #ecfdf5;
}
/* Responsive */
@media (max-width: 1200px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-summary-box {
        position: relative;
        order: 2;
    }
    
    .main-content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .meal-types-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-options {
        grid-template-columns: 1fr;
    }
    
    .days-grid {
        justify-content: stretch;
    }
    
    .day-box {
        flex: 1;
        text-align: center;
    }
    
    .meals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .price-badge {
         background: #f3f4f6;
    color: #1f2937;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    position: absolute;
    left: 15%;
    top: 40%;
    }
}



/* Modal Styles */
.meal-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #6b7280;
}

.modal-close:hover {
    background: #e5e7eb;
    
}

.modal-header {
    text-align: right;
    margin-bottom: 30px;
}

.modal-icon {
    font-size: 80px;
    margin-bottom: 16px;
    display: inline-block;
    animation: iconBounce 0.6s ease-out;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.modal-header h2 {
    font-size: 32px;
    color: #1f2937;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    text-align: right;
}

.modal-body p {
    font-size: 16px;
    line-height: 1.8;
    color: #6b7280;
    margin-bottom: 30px;
}

/* Macros Chart */
.macros-chart {
   
    border-radius: 16px;
    padding: 0px;
}

.macros-chart h3 {
    font-size: 20px;
    color: #1f2937;
    margin: 0 0 20px;
    font-weight: 700;
}

.macros-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.macro-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

.protein-bar {
    background: #dbeafe;
    color: #1e40af;
}

.carbs-bar {
    background: #fed7aa;
    color: #c2410c;
}

.fats-bar {
    background: #e9d5ff;
    color: #6b21a8;
}

.macro-label {
    font-weight: 700;
}

.macro-value {
    font-weight: 600;
}

/* Visual Bar */
.visual-bar {
    display: flex;
    height: 15px !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.visual-value {
    display: flex;
    height: 50px !important;
    overflow: hidden;
    margin-top: 10px ; 
    
}

.visual-segment {
    height: 100%;
    transition: all 0.5s ease;
    position: relative;
}

.protein-segment {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.carbs-segment {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.fats-segment {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
        max-height: 90vh;
    }
    
    .modal-header h2 {
        font-size: 26px;
    }
    
    .modal-icon {
        font-size: 60px;
    }
    
    .macros-chart {
        padding: 20px;
    }
}


/* ====== Macros Popups Styles ====== */

/* قسم نتيجة الماكروز في الصفحة الرئيسية */
/* ====== تصميم قسم نتيجة الماكروز الجديد ====== */

.macros-result-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 2px solid #10b981;
    border-radius: 24px;
    padding: 40px;
    margin: 40px 0;
}

.macros-result-header {
    text-align:right;
    margin-bottom: 32px;
}


@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

.macros-result-header h2 {
    font-size: 32px;
    color: #1f2937;
    margin: 0 0 12px;
    font-weight: 700;
    text-align:right;

}

.macros-result-header .subtitle {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    line-height: 1.6;
}

/* Calories Box */
.calories-box {
    display: flex;
    justify-content: space-between;
    text-align: right;
    margin-bottom: 10px;
}

.calories-box h3 {
    font-size: 18px;
    color: #10b981;
    margin: 0 0 8px;
    font-weight: 700;
}

.calories-box p {
    color: #10b981;
    font-size: 16px;
    margin: 0;
    font-weight: 700;
}

/* Macros Details */
.macros-details {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.macro-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.macro-row:last-child {
    border-bottom: none;
}

.macro-label {
    color: #6b7280;
    font-size: 16px;
    font-weight: 600;
}

.macro-value {
    color: #1f2937;
    font-size: 16px;
    font-weight: 500;
}



.visual-bar {
    display: flex;
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.visual-segment {
    transition: width 0.6s ease;
    position: relative;
}

.protein-segment {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.carbs-segment {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.fats-segment {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

/* Recommended Meals Section */
.recommended-meals-section {
}



.meals-recommendation {
    text-align: right;
}

.meals-recommendation p {
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
    margin: 0 0 12px;
    font-weight: 700;
}

.meals-note {
    color: #9ca3af !important;
    font-size: 13px !important;
    font-style: italic;
    line-height: 1.6 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .macros-result-section {
        padding: 24px 16px;
    }
    
    
    
    .macros-result-header h2 {
        font-size: 26px;
    }
    
    .calories-box {
        padding: 24px 16px;
    }
    
    .calories-box h3 {
        font-size: 36px;
    }
    
    .macro-row {
        padding: 12px 0;
    }
    
    .macro-label {
        font-size: 14px;
    }
    
    .macro-value {
        font-size: 16px;
    }
    
    .visual-bar {
        height: 32px;
    }
    
    .recommended-meals-section {
        padding: 20px 16px;
    }
    
    .recommended-meals-section h3 {
        font-size: 18px;
    }
    
    .meals-recommendation p {
        font-size: 14px;
    }
}

/* ====== Macros Popups ====== */

.macros-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.macros-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.macros-content {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.macros-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #6b7280;
}

.macros-close:hover {
    background: #e5e7eb;
    
}

.macros-content h2 {
    font-size: 28px;
    color: #1f2937;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 700;
}

.macros-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Input Styles */
.macros-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
/*    margin-bottom:24px; */
}
#birthdate
{
      margin-bottom:24px; 

}

.macros-input:focus {
    outline: none;
    border-color: #10b981;
    background: #f0fdf4;
}

.input-with-unit {
    position: relative;
    margin-bottom: 24px;
}

.input-with-unit .unit {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 600;
    pointer-events: none;
}

/* Gender Grid */
.gender-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gender-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.gender-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.gender-option.selected {
    border-color: #166144;
    background: #ecfdf5;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.gender-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.gender-option span {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

/* Goals Grid */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.goal-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.goal-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.goal-option.selected {
    border-color: #166144;
    background: #ecfdf5;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.goal-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.goal-option h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 6px;
    font-weight: 700;
}

.goal-option p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Activity Grid */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.activity-option {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.activity-option:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.activity-option.selected {
    border-color: #166144;
    background: #ecfdf5;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.activity-icon {
    font-size: 40px;
    margin-bottom: 8px;
}

.activity-option h3 {
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 6px;
    font-weight: 700;
}

.activity-option p {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Button */
.macros-btn {
    width: 100%;
    background: #166144;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cairo', sans-serif;
}

.macros-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.25);
}

.macros-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Result Popup */
.result-popup {
    max-width: 600px;
}

.result-calories {
    font-size: 48px;
    font-weight: 700;
    color: #10b981;
    text-align: center;
    margin: 24px 0;
}

.macros-title {
    font-size: 18px;
    color: #1f2937;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 700;
}

.result-macros-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.result-macro-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
}

.result-macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    color: #1f2937;
}

.result-bar {
    height: 24px;
    background: #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.protein-fill {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.carbs-fill {
    background: linear-gradient(90deg, #f97316 0%, #ea580c 100%);
}

.fats-fill {
    background: linear-gradient(90deg, #a855f7 0%, #9333ea 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .macros-content {
        padding: 32px 20px;
    }
    
    .goals-grid,
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .result-calories {
        font-size: 40px;
    }
}

/* ====== Register Popup Styles ====== */

.register-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-content {
    max-width: 500px;
}

.register-header {
    text-align: center;
    margin-bottom: 32px;
}

.register-header h2 {
    font-size: 26px;
    color: #1f2937;
    margin-bottom: 12px;
    font-weight: 700;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: right;
}

.form-group label {
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
}

.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.country-code {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
    pointer-events: none;
}

.phone-input {
    padding-right: 80px !important;
}

.register-note {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.5;
    margin: 8px 0;
}

.register-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .register-content {
        max-width: 90%;
        padding: 32px 20px;
    }
    
    .register-header h2 {
        font-size: 22px;
    }
    .payment-summary-box {
   
    padding: 25px 18px;
    
}
}
/* ====== Location Popup Styles ====== */

.location-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.location-header {
    text-align: center;
    margin-bottom: 20px;
}

.location-header h2 {
    font-size: 26px;
    color: #1f2937;
    margin-bottom: 8px;
    font-weight: 700;
}

.search-location {
    margin-bottom: 16px;
}

#map {
    border: 2px solid #e5e7eb;
}

.selected-location {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: right;
}

.selected-location p {
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .location-content {
        max-width: 95%;
        padding: 24px 16px;
    }
    
    #map {
        height: 280px !important;
    }
}
#customerName {
  margin-bottom: 15px;
}

/* ====== قسم التفضيلات الغذائية ====== */

.section-dietary-restrictions {
    margin-bottom: 40px;
    background: white;
    padding: 24px;
    border-radius: 16px;
}

.section-dietary-restrictions h2 {
    font-size: 28px;
    color: #1f2937;
    text-align: right;
    margin-bottom: 14px;
    font-weight: 700;
}

.section-dietary-restrictions .subtitle {
    text-align: right;
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 32px;
}

.restriction-block {
    margin-bottom: 32px;
}

.restriction-block h3 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 16px;
    font-weight: 600;
    text-align: right;
}

/* خيارات نعم/لا */
.restriction-options {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.restriction-option {
    cursor: pointer;
    flex: 1;
}

.restriction-option input {
    display: none;
}

.restriction-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
}

.restriction-option input:checked + .restriction-box {
    border-color: #166144;
    background: #ecfdf5;
    color: #166144;
}

.restriction-option:hover .restriction-box {
    border-color: #cbd5e0;
}

/* شبكة الحساسية */
.allergies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.allergy-option {
    cursor: pointer;
}

.allergy-option input {
    display: none;
}

.allergy-box {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.allergy-check {
    width: 18px;
    height: 18px;
    border: 1.5px solid #cbd5e0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    background: white;
    transition: all 0.3s;
}

.allergy-option input:checked + .allergy-box {
    border: solid 2px #166144;
    background: #ecfdf5;
}

.allergy-option input:checked + .allergy-box .allergy-check {
    background: #166144;
    border-color: #166144;
    color: white;
}

.allergy-box span {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.allergy-option:hover .allergy-box:not(.active) {
    border-color: #cbd5e0;
}

/* حقول النص (Textarea) */
.restriction-textarea {
    margin-top: 16px;
}

.restriction-textarea label {
    display: block;
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: right;
}

.restriction-textarea textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    resize: vertical;
    transition: all 0.3s;
    line-height: 1.6;
    text-align: right;
}

.restriction-textarea textarea:focus {
    outline: none;
    border-color: #10b981;
    background: #f0fdf4;
}

.restriction-textarea textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .section-dietary-restrictions {
        padding: 20px 16px;
    }

    .section-dietary-restrictions h2 {
        font-size: 24px;
    }

    .restriction-block h3 {
        font-size: 16px;
    }

    .allergies-grid {
        grid-template-columns: 1fr;
    }

    .restriction-options {
        flex-direction: column;
    }
}

/* English Alignment */
html[lang^="en"] .section-dietary-restrictions h2,
html[lang^="en"] .section-dietary-restrictions .subtitle,
html[lang^="en"] .restriction-block h3,
html[lang^="en"] .restriction-textarea label {
    text-align: left;
}

html[lang^="en"] .restriction-textarea textarea {
    text-align: left;
}

/*english alignment*/

html[lang^="en"] .section-meals h2,
html[lang^="en"] .section-days h2,
html[lang^="en"] .section-payment h2,
html[lang^="en"] .subtitle ,
html[lang^="en"] .summary-title , 
html[lang^="en"] .macros-result-header h2 , 
html[lang^="en"] .meals-recommendation p ,
html[lang^="en"] .modal-header h2 , 
html[lang^="en"] .modal-body p,
html[lang^="en"] .macro-value ,
html[lang^="en"] .visual-value span ,
html[lang^="en"] .summary-header h3 , 
html[lang^="en"] p#dynamicSummary{
  text-align: left ;
}


html[lang^="en"] .radio-indicator {
  top: 40% !important;
  right: 16px !important;
  left: auto !important;
  transform: translateY(-40%);
}
html[lang^="en"] .price-badge {
    right: 6% !important;
    top: 40% !important;;
    left: auto !important;
}
html[lang^="en"] .btn-info svg {
    transform: rotate(0deg);
    display: block;
}
@media (max-width: 768px) {
    html[lang^="en"] .price-badge{
        right: 15% !important;
    top: 40% !important;;
    left: auto !important;
    }
        html[lang^="en"] .summary-header h3 , 
        html[lang^="en"] .dynamic-summary{
        text-align: left;
    }
    
}