/* ------------------ Base & Layout (شاشة ثابتة 100%، بدون تمرير) ------------------ */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    will-change: transform; 
}

html {
    /* متغير ارتفاع الشاشة الذي يضبطه JS لحل مشكلة اهتزاز الشاشة */
    --vh: 100vh;
    height: 100%;
}

body {
    height: 100%; 
    height: calc(var(--vh) * 100); 
    width: 100%;
    
    /* *** الثبات المطلق: منع التمرير على مستوى الصفحة بالكامل *** */
    overflow: hidden; 
    position: fixed; 
    top: 0;
    left: 0;
    
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(135deg, #f0f2f5 0%, #e6fff3 100%); 
    color: #333;
    
    display: flex;
    justify-content: center; 
    align-items: center; 
}

/* الحاوية الرئيسية (Full-Screen App) */
.page-wrapper {
    width: 100%;
    max-width: 480px; 
    height: 100%; 
    max-height: 100%; 
    
    background-color: #ffffff;
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    
    padding: 30px 20px; 
    
    display: flex;
    flex-direction: column;
    
    /* *** السماح بالتمرير الداخلي فقط إذا كان المحتوى طويلاً ليظهر كل شيء *** */
    overflow-y: auto; 
    overflow-x: hidden;
    
    transform: translateZ(0); 
}

/* إخفاء شريط التمرير (الداخلي) */
.page-wrapper::-webkit-scrollbar { display: none; }
.page-wrapper { -ms-overflow-style: none; scrollbar-width: none; }


/* ------------------ Typography & Headings ------------------ */

.app-heading { color: #075E54; text-align: center; margin-bottom: 5px; font-weight: 800; font-size: clamp(1.8rem, 5vw, 2.2rem); }
.description { text-align: center; color: #777; margin-bottom: 30px; font-size: 0.95rem;}


/* ------------------ Form Elements & Inputs ------------------ */

.main-form { width: 100%; }
.input-group { margin-bottom: 20px; } 
.input-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: #555; font-weight: 600; }

#countryInput, #phoneInput { 
    width: 100%; 
    padding: 12px 15px; 
    border: 2px solid #ddd; 
    border-radius: 12px; 
    font-size: 1.0rem; 
    transition: all 0.2s;
    background-color: #f7f7f7;
    color: #333;
    font-family: 'Cairo', sans-serif;
    resize: vertical;
}
#countryInput {
    background-color: #ffffff; 
    font-weight: 600;
}
#phoneInput {
     background-color: #ffffff;
}

#countryInput:focus, #phoneInput:focus { 
    border-color: #25D366; 
    outline: none; 
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2); 
}


.phone-input-container { display: flex; gap: 10px; margin-bottom: 25px;}

.country-code-wrapper { 
    display: flex; 
    align-items: center; 
    background-color: #f7f7f7; 
    border: 2px solid #ddd; 
    border-radius: 12px; 
    padding: 0 10px; 
    flex-basis: 120px; 
    flex-shrink: 0; 
    transition: border-color 0.2s;
}

#codeInput { 
    border: none; 
    background: transparent; 
    padding: 12px 0; 
    text-align: right; 
    width: 100%; 
    font-size: 1.05rem; 
    font-weight: 700; 
    color: #075E54;
}
.country-code-wrapper:focus-within { 
    border-color: #25D366; 
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.2); 
    background-color: #ffffff;
}

.flag-icon { font-size: 1.4rem; margin-left: 8px; min-width: 24px;}


/* ------------------ Main Button & Notes ------------------ */

.install-prompt-button { width: 100%; padding: 14px; margin-bottom: 20px; background-color: #4A90E2; color: white; border: none; border-radius: 12px; font-size: 1.0rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3); transition: all 0.2s; }

#whatsappButton { 
    width: 100%; 
    padding: 18px; 
    background-color: #25D366; 
    color: white; 
    border: none; 
    border-radius: 12px; 
    font-size: 1.2rem; 
    font-weight: 800; 
    cursor: pointer; 
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.6); 
    transition: all 0.2s; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}
#whatsappButton:hover { background-color: #1FAF59; transform: translateY(-2px) scale(1.01); }
.icon { width: 22px; height: 22px; margin-left: 10px; filter: drop-shadow(0 0 1px rgba(0,0,0,0.2)); }

.prominent-note { font-size: 0.85rem; font-weight: 700; color: #FF5722; padding: 5px 0; text-align: center; margin-top: 15px;}


/* ------------------ Share Section & Footer ------------------ */
.share-section { 
    text-align: center; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #f0f0f0; 
    width: 100%; 
    flex-shrink: 0; 
    flex-grow: 1; 
}
.share-title { font-size: 0.9rem; color: #555; margin-bottom: 15px; font-weight: 600; }
.share-icons { display: flex; justify-content: space-between; gap: 8px; }
.share-btn { flex-grow: 1; padding: 12px 0; border-radius: 12px; border: none; color: white; font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); transition: transform 0.2s, opacity 0.2s; }
.share-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.share-btn.whatsapp-share { background-color: #25D366; }
.share-btn.messenger { background-color: #0078FF; }
.share-btn.facebook { background-color: #1877F2; }

.app-footer {
    width: 100%;
    text-align: center;
    margin-top: 20px; 
    padding: 15px 0 0 0; 
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.contact-link { color: #075E54; text-decoration: none; font-weight: 800; font-size: 0.95rem; display: block; margin-bottom: 8px; transition: color 0.3s; }
.copyright-text { margin: 5px 0; font-size: 0.8rem; color: #aaa; }

