﻿/* تحسينات للتجاوب مع كل أحجام الهواتف المحمولة لنموذج الاشتراك */

/* قواعد أساسية للنموذج */
.subscribe-form {
    padding: 20px;
    border-radius: 10px;
    /* background-color: #fff; */
    /* box-shadow: 0 0 15px rgba(0, 0, 0, 0.05); */
}

/* تخطيط مرن للصفوف */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

/* حقول النموذج - متجاوبة مع جميع الأحجام */
.form-group {
    margin-bottom: 20px !important;
    width: 100%;
    position: relative;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #E5E5E5;
    border-radius: 5px;
    font-size: var(--font-base);
    transition: all 0.3s ease;
    height: auto;
    min-height: 50px;
    box-sizing: border-box;
    outline: none;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

/* تأثيرات التفاعل مع حقول الإدخال */
.form-control:focus {
    border-color: #00a59a;
    box-shadow: 0 0 0 2px rgba(0, 165, 154, 0.1);
}

.form-control::placeholder {
    color: #999;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.form-control:focus::placeholder {
    opacity: 0.5;
}

/* تصحيح مظهر حقول الإدخال للأجهزة المختلفة */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* قائمة نوع الاشتراك - متجاوبة */
.select-wrapper {
    position: relative;
    width: 100%;
    border-radius: 5px;
    overflow: hidden;
}

.select-wrapper select {
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 15px;
    padding-left: 30px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #E5E5E5;
    font-family: 'Tajawal', sans-serif;
    color: #333;
}

.select-wrapper select:focus {
    border-color: #00a59a;
    box-shadow: 0 0 0 2px rgba(0, 165, 154, 0.1);
}

.select-wrapper select option {
    font-family: 'Tajawal', sans-serif;
    padding: 10px;
}

.arrow-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #00a59a;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-wrapper:hover .arrow-icon {
    transform: translateY(-50%) scale(1.2);
}

/* اختيار الدولة في رقم الهاتف - متجاوب */
.country-select {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.country-select .flag-circle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-select .flag-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.country-select.active .dropdown-arrow {
    transform: rotate(180deg);
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 10;
    margin-top: 5px;
}

.country-option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.country-option:hover {
    background-color: #f0f0f0;
}

.country-option .flag-img {
    width: 24px;
    height: 24px;
    margin-left: 10px;
    border-radius: 50%;
}

.country-option .country-name {
    flex-grow: 1;
    margin-left: 10px;
}

.country-option .country-code {
    color: #888;
}

.country-select.active .country-dropdown {
    display: block;
}

/* تحسين قسم رقم الهاتف */
.phone-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
}

.phone-input {
    flex: 1;
}

.country-code {
    flex-shrink: 0;
}

/* خدمات إضافية */
.additional-services-title {
    margin: 30px 0 15px;
    color: #00A3A8;
    font-size: var(--font-xl);
    font-weight: 600;
}

/* مربعات الاختيار - متجاوبة */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
    padding: 5px 0;
    cursor: pointer;
}

.form-check-input {
    margin-left: 10px;
    min-width: 18px;
    height: 18px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #00a59a;
    border-radius: 4px;
    background-color: white;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: #00a59a;
}

.form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-check-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 165, 154, 0.1);
    outline: none;
}

.form-check-label {
    font-size: var(--font-sm);
    color: #333;
    cursor: pointer;
    user-select: none;
    flex: 1;
}

/* زر التسجيل - متجاوب */
.submit-btn {
    background-color: #00A3A8;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 30px;
    font-size: var(--font-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: auto;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 163, 168, 0.1);
    font-family: 'Tajawal', sans-serif;
    text-align: center;
}

.submit-btn:hover {
    background-color: #008C91;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 140, 145, 0.2);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 140, 145, 0.2);
}

.submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 163, 168, 0.3);
}

/* تخصيص الاختيار المتعلق بالشروط والأحكام */
.terms-check {
    margin: 25px 0;
}

/* استعلامات الوسائط للهواتف المحمولة */

/* الهواتف الكبيرة (577px - 767px) */
@media (max-width: 767px) {
    .subscribe-content {
        padding: 20px 10px;
    }
    
    .subscribe-title {
        font-size: var(--font-2xl);
        margin-bottom: 25px;
    }
    
    .subscribe-form {
        padding: 20px;
    }
    
    /* تغيير تخطيط الصفوف إلى عمودي */
    .form-row {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 12px;
    }
    
    .form-control {
        font-size: var(--font-sm);
        padding: 12px 15px;
        min-height: 50px;
    }
}

/* الهواتف المتوسطة (415px - 576px) */
@media (max-width: 576px) {
    .subscribe-content {
        padding: 15px 5px;
    }
    
    .subscribe-title {
        font-size: var(--font-xl);
        margin-bottom: 20px;
    }
    
    .subscribe-form {
        padding: 15px;
    }
    
    .form-control {
        font-size: var(--font-sm);
        padding: 10px 12px;
        min-height: 45px;
    }
    
    /* تحسين حجم خانة الهاتف */
    .phone-row {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .phone-input {
        flex: 7;
    }
    
    .country-code {
        flex: 3;
        margin-left: 10px;
    }
    
    .country-select {
        height: 45px;
        padding: 5px 10px;
    }
    
    .flag-circle {
        width: 20px;
        height: 20px;
    }
    
    .code {
        font-size: var(--font-xs);
    }
    
    /* تعديل حجم مربعات الاختيار */
    .form-check-input {
        min-width: 16px;
        height: 16px;
    }
    
    .form-check-label {
        font-size: var(--font-sm);
    }
    
    /* تعديل زر التقديم */
    .submit-btn {
        padding: 12px 25px;
        font-size: var(--font-sm);
        margin-top: 15px;
        width: 100%;
    }
}

/* الهواتف الصغيرة (376px - 414px) */
@media (max-width: 414px) {
    .subscribe-content {
        padding: 10px 5px;
    }
    
    .subscribe-title {
        font-size: var(--font-xl);
        margin-bottom: 15px;
    }
    
    .subscribe-form {
        padding: 12px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-control {
        font-size: var(--font-sm);
        padding: 8px 10px;
        min-height: 42px;
    }
    
    .country-select {
        height: 42px;
        padding: 4px 8px;
        min-width: 80px;
    }
    
    .flag-circle {
        width: 18px;
        height: 18px;
        margin-left: 6px;
    }
    
    /* تعديل زر التقديم */
    .submit-btn {
        padding: 10px 20px;
        font-size: var(--font-sm);
    }

}

/* الهواتف الصغيرة جداً (320px - 375px) */
@media (max-width: 375px) {
    .subscribe-title {
        font-size: var(--font-lg);
        margin-bottom: 12px;
        text-align: center;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        font-size: var(--font-sm);
        padding: 8px 10px;
        min-height: 40px;
    }
    
    .country-select {
        height: 40px;
        padding: 4px 8px;
    }
    
    .flag-circle {
        width: 18px;
        height: 18px;
        margin-left: 5px;
    }
    
    .code {
        font-size: 11px;
    }
    
    .additional-services-title {
        font-size: var(--font-base);
    }
    
    .form-check-label {
        font-size: var(--font-sm);
    }
    
    .submit-btn {
        font-size: var(--font-sm);
        padding: 10px 0;
    }

}

/* هواتف أكبر (414px - 767px) */
@media (min-width: 414px) and (max-width: 767px) {
    .subscribe-form {
        padding: 20px;
    }
    
    .form-control {
        min-height: 48px;
    }
    
    .country-select {
        height: 48px;
    }
    
    .additional-services-title {
        font-size: var(--font-lg);
    }
}

/* الأجهزة اللوحية */
@media (min-width: 768px) and (max-width: 991px) {
    .form-row {
        flex-direction: row;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .phone-row .phone-input {
        flex: 5;
    }
    
    .phone-row .country-code {
        flex: 2;
    }
    
    .submit-btn {
        width: auto;
        padding: 12px 40px;
    }
}

.country-code-select {
    width: 80px;
    height: 45px;
    border-radius: 12px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    gap: 3px;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0 8px;
    position: relative;
    cursor: pointer;
}

.country-code-select .flag-img {
    width: 16px;
    height: 12px;
}

.country-code-select .code {
    font-family: 'Droid Arabic Kufi';
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.country-code-select .dropdown-arrow {
    position: absolute;
    left: 5px;
    font-size: 10px;
}

.country-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 10;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    margin-top: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.country-option {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.country-option:hover {
    background-color: #f1f1f1;
}

.country-option .flag-img {
    width: 16px;
    height: 12px;
    margin-left: 10px;
}

.country-option .country-name {
    margin-left: 10px;
}

.country-option .country-code {
    margin-right: auto;
    font-size: 12px;
    color: #666;
}

/* دعم Forced Colors Mode */
@media (forced-colors: active) {
    .country-code-select {
        border: 2px solid CanvasText;
        background-color: Canvas;
        color: CanvasText;
    }

    .country-dropdown {
        border: 2px solid CanvasText;
        background-color: Canvas;
    }

    .country-option {
        border: 1px solid CanvasText;
    }

    .country-option:hover {
        background-color: Highlight;
        color: HighlightText;
    }
}

