/* =================================================================
   Wing Custom Menu Styling (v2.9 - Final Layout & Responsive Fixes)
   ================================================================= */

/* הגדרת פונט כללי עדין יותר */
body, .wcm-header-container {
    font-family: 'Assistant', sans-serif !important;
}

/* Container Setup - פריסת 3 עמודות סימטרית */
.wcm-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px; /* שוליים אנכיים מופחתים */
    direction: rtl; 
    position: relative; 
    z-index: 10000; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); 
    background: #fff;
}

/* CENTER: Logo Area - ריכוז הלוגו באמצעות Margin */
.wcm-center-logo {
    display: flex;
    justify-content: center;
    flex-grow: 1; /* תופס את כל הרוחב הפנוי */
    order: 2; /* מיקום במרכז */
}
.wcm-logo {
    cursor: pointer; /* הטריגר הראשי לסליידר */
    margin: 0 auto; /* מרכוז הלוגו */
}
.wcm-logo img {
    height: 70px; /* לוגו גדול יותר */
    width: auto;
    border-radius: 50%;
    transition: box-shadow 0.3s ease-in-out;
    animation: gentleGlow 3s infinite alternate; 
}
@keyframes gentleGlow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.2); }
    100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
}

/* RIGHT Side: WhatsApp */
.wcm-right-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* יישור לימין (סוף ה-RTL) */
    width: 33%; 
    order: 3; 
}

/* LEFT Side: Login/Dashboard */
.wcm-left-icons {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* יישור לשמאל (תחילת ה-RTL) */
    width: 33%; 
    order: 1; 
}

/* Login/Dashboard Trigger Icon */
.wcm-login-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-radius: 20px;
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
}
.wcm-login-trigger .material-icons {
    font-size: 30px; /* **גודל אייקון מותאם** */
    color: #0073aa; 
    transition: color 0.3s;
}
.wcm-login-trigger span {
    font-size: 15px; /* **גודל טקסט מותאם** */
    font-weight: 600;
    line-height: 1.2;
    color: #333;
}
.wcm-login-trigger:hover {
    color: #005f8c;
}

/* WhatsApp Icon Styling */
.wcm-whatsapp-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 30px; 
    color: #25D366; 
    transition: transform 0.3s;
    text-decoration: none;
}
.wcm-whatsapp-link .material-icons {
    font-size: 30px;
}
.wcm-whatsapp-link:hover {
    transform: scale(1.05);
}
.wcm-whatsapp-text {
    font-size: 15px;
    font-weight: 400;
    color: #333;
}


/* ************************************** */
/* *** Mobile Responsiveness (Hidden Text) *** */
/* ************************************** */
@media (max-width: 768px) {
    /* הסתרת כל הטקסטים בכותרת */
    .wcm-user-text,
    .wcm-whatsapp-text {
        display: none !important;
    }
    /* שינוי רוחב העמודות למובייל */
    .wcm-right-icons,
    .wcm-left-icons {
        width: auto; /* מאפשר הצמדה בלבד */
        padding: 0;
    }
    .wcm-login-trigger, .wcm-whatsapp-link {
        padding: 0 5px;
    }
    /* מרכוז הלוגו נשמר */
    .wcm-center-logo {
        flex-grow: 1;
    }
}


/* ===================================== */
/* Off-Canvas Menu (Sidebar) Styling     */
/* ===================================== */
.wcm-off-canvas-menu {
    position: fixed;
    top: 0;
    right: 0; 
    width: 300px;
    max-width: 80%;
    height: 100%;
    background-color: #f7f7f7; 
    box-shadow: -5px 0 15px rgba(0,0,0,0.4);
    z-index: 99999; 
    overflow-y: auto; 
    transform: translateX(100%); 
    transition: transform 0.4s ease-out;
    direction: rtl;
    padding-top: 0; 
}
.wcm-off-canvas-menu.is-open {
    transform: translateX(0); 
}
.wcm-menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 99998;
    display: none;
}
.wcm-menu-overlay.is-open {
    display: block;
}

/* Sidebar Branding Area (for Off-Canvas) */
.wcm-sidebar-branding {
    padding: 20px;
    background: linear-gradient(135deg, #0073aa, #0099e6); 
    color: #fff;
    text-align: center;
    border-bottom-left-radius: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}
.wcm-sidebar-logo {
    height: 70px; 
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #fff;
}
.wcm-sidebar-branding h4 {
    margin: 5px 0 0;
    font-size: 1.2em;
    font-weight: 400; 
}

/* Close Button position adjustment */
.wcm-close-menu {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #fff; 
    font-weight: bold;
    z-index: 100000; 
}

/* ************************************** */
/* *** Menu Links (Off-Canvas Content) *** */
/* ************************************** */
.wcm-off-canvas-content {
    padding: 0 0 20px 0;
}
.wcm-off-canvas-content h3 {
    padding: 0 20px;
    font-size: 1.2em; 
    color: #0073aa;
    font-weight: 600;
}

.wcm-off-canvas-content .menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.wcm-off-canvas-content .menu li {
    list-style: none;
    margin: 0;
    transition: background 0.3s ease;
}
.wcm-off-canvas-content .menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px; 
    text-decoration: none;
    color: #333; 
    font-weight: 600; 
    font-size: 1.05em; 
    position: relative;
    font-family: 'Assistant', sans-serif;
}
.wcm-off-canvas-content .menu li a:before {
    content: "\e5cc"; 
    font-family: 'Material Icons';
    margin-left: 10px;
    font-size: 1.2em;
    color: #0073aa; 
    transition: transform 0.3s;
}
.wcm-off-canvas-content .menu li a:hover {
    background: linear-gradient(to left, #e9f8ff 0%, #f7f7f7 100%); 
    color: #0073aa;
    padding-right: 25px; 
}
.wcm-off-canvas-content .menu li a:hover:before {
    transform: translateX(-5px);
}
/* --- Global Modal Overlay (תקף לכל המודלים) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    background: rgba(17, 27, 33, 0.75); /* רקע כהה מודרני */
    backdrop-filter: blur(5px); /* אפקט טשטוש יוקרתי */
    z-index: 9999;
    display: none; /* JS will change this to flex */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* --- Login Card Pro Styles --- */
.login-card-pro {
    background: #ffffff;
    width: 100%;
    max-width: 420px; /* רוחב אידיאלי לדסקטופ */
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    padding: 40px 30px;
    text-align: center;
    direction: rtl;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .login-card-pro {
    transform: translateY(0);
}

/* כפתור סגירה */
.close-modal {
    position: absolute;
    top: 15px;
    left: 15px; /* צד שמאל כי אנחנו ב-RTL */
    background: transparent;
    border: none;
    font-size: 24px;
    color: #8696a0;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 5px;
}

.close-modal:hover {
    color: #111b21;
}

/* --- Header Section --- */
.login-pro-header {
    margin-bottom: 30px;
}

.login-icon-circle {
    width: 64px;
    height: 64px;
    background: #e8f5e9; /* ירוק בהיר מאוד */
    color: #008069; /* ירוק וואטסאפ */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.login-icon-circle .material-icons {
    font-size: 32px;
}

.login-pro-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111b21;
    margin: 0 0 8px 0;
}

.login-pro-header p {
    font-size: 15px;
    color: #54656f;
    margin: 0;
}

/* --- Form Styles --- */
.login-pro-form {
    text-align: right;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111b21;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid #e9edef;
    border-radius: 8px;
    background-color: #fcfdfd;
    transition: all 0.2s;
    box-sizing: border-box; /* חשוב מאוד */
    font-family: 'Heebo', sans-serif;
}

.input-group input:focus {
    outline: none;
    border-color: #008069;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 128, 105, 0.1);
}

/* --- Submit Button --- */
.btn-submit-login-pro {
    width: 100%;
    background-color: #008069;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 50px; /* עיגול מלא כמו אפליקציה */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    transition: background-color 0.2s, transform 0.1s;
}

.btn-submit-login-pro:hover {
    background-color: #006d59;
}

.btn-submit-login-pro:active {
    transform: scale(0.98);
}

/* --- Mobile Responsiveness --- */
@media screen and (max-width: 768px) {
    .modal-overlay {
        align-items: flex-end; /* במובייל המודל עולה מלמטה */
    }

    .login-card-pro {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0; /* פינות עגולות רק למעלה */
        padding: 30px 20px 50px 20px; /* יותר רווח למטה */
        margin: 0;
        transform: translateY(100%); /* אנימציה מלמטה */
    }
    
    .login-icon-circle {
        width: 56px;
        height: 56px;
    }
    
    .login-pro-header h2 {
        font-size: 22px;
    }
}