/* تنسيقات النماذج المدمجة - Embedded Forms Styles */

.embedded-form {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.embedded-form .form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.embedded-form .form-title {
    color: #007cba;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.embedded-form .form-description {
    color: #6c757d;
    font-size: 16px;
    line-height: 1.6;
}

.embedded-form .form-label {
    font-weight: 600;
    color: #495057;
    margin: 0 auto 10px auto;
    display: block;
    max-width: 600px;
    text-align: right;
    font-size: 16px;
}

.embedded-form .form-label .text-danger {
    color: #dc3545 !important;
    font-weight: bold;
}

.embedded-form .form-control,
.embedded-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 0 auto 15px auto;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 600px;
    display: block;
    box-sizing: border-box;
}

.embedded-form .form-control:focus,
.embedded-form .form-select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 186, 0.15);
}

.embedded-form .form-check {
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.embedded-form .form-check:hover {
    background: #e3f2fd;
}

.embedded-form .form-check-input {
    margin-top: 0.25em;
    margin-left: 10px;
}

.embedded-form .form-check-input:checked {
    background-color: #007cba;
    border-color: #007cba;
}

.embedded-form .form-check-label {
    margin-right: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.embedded-form .form-header-section {
    text-align: center;
    margin: 30px 0;
}

.embedded-form .form-section-title {
    color: #007cba;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.embedded-form .form-submit-section {
    text-align: center;
    padding-top: 25px;
    border-top: 2px solid #f8f9fa;
    margin-top: 30px;
}

.embedded-form .btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #0056b3 100%);
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.embedded-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 186, 0.3);
}

.embedded-form .btn-primary:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* العرض المتجاوب - تناسق مع عرض الصفحة */
.embedded-form {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* تحسين العرض حسب حجم الشاشة */
@media (min-width: 1200px) {
    .embedded-form {
        max-width: 800px;
        margin: 30px auto;
        padding: 35px;
    }
    
    .embedded-form .form-title {
        font-size: 28px;
    }
    
    .embedded-form .form-description {
        font-size: 18px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .embedded-form {
        max-width: 700px;
        margin: 25px auto;
        padding: 30px;
    }
    
    .embedded-form .form-title {
        font-size: 26px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .embedded-form {
        max-width: 90%;
        margin: 20px auto;
        padding: 25px;
    }
    
    .embedded-form .form-title {
        font-size: 24px;
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 767px) {
    .embedded-form {
        max-width: 95%;
        padding: 20px 15px;
        margin: 15px auto;
    }
    
    .embedded-form .form-title {
        font-size: 20px;
    }
    
    .embedded-form .form-description {
        font-size: 14px;
    }
    
    .embedded-form .btn-primary {
        width: 100%;
        padding: 12px 20px;
    }
    
    .embedded-form .form-control,
    .embedded-form .form-select {
        font-size: 16px; /* منع تكبير iOS */
    }
}

@media (max-width: 480px) {
    .embedded-form {
        max-width: 98%;
        padding: 15px 10px;
        margin: 10px auto;
        border-radius: 8px;
    }
    
    .embedded-form .form-title {
        font-size: 18px;
    }
    
    .embedded-form .form-description {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .embedded-form .form-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
}

/* تأثيرات الانتقال */
.embedded-form .form-control,
.embedded-form .form-select,
.embedded-form .form-check {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تنسيق رسائل النجاح */
/* تحسين توزيع العناصر داخل النموذج */
.embedded-form .form-row {
    display: block;
    width: 100%;
    margin-bottom: 25px;
}

.embedded-form .form-col {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
    display: block;
}

.embedded-form .form-col-full {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
}

.embedded-form .form-col-half {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 15px auto;
}

/* تحسين النصوص والخيارات */
.embedded-form .form-check-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.embedded-form .form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* تحسين للشاشات الصغيرة */
@media (max-width: 768px) {
    .embedded-form .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .embedded-form .form-col,
    .embedded-form .form-col-half {
        flex: 100%;
        min-width: unset;
    }
    
    .embedded-form .form-check-group {
        grid-template-columns: 1fr;
    }
}

.embedded-form .alert-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    animation: successSlide 0.5s ease-out;
}

@keyframes successSlide {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.embedded-form .alert-success .fas {
    margin-left: 10px;
    font-size: 18px;
}