/* ========================================
   Modal Styles
   ======================================== */

/* ----------------------------------------
   Modal Overlay & Container
   ---------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    overflow-y: auto;
    padding: 0px;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-container.modal-sm {
    max-width: 400px;
}

/* ----------------------------------------
   Modal Header
   ---------------------------------------- */
.modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.4;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--background-light);
}

/* ----------------------------------------
   Modal Body & Footer
   ---------------------------------------- */
.modal-body {
    padding: 15px;
}

.modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ----------------------------------------
   Multi-language Title Styles
   ---------------------------------------- */
.subtitle-en, .subtitle-ar {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-light);
}

.subtitle-ar {
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

.section-subtitle-ar {
    font-size: 1rem;
    color: var(--text-light);
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

.multi-lang-title {
    line-height: 1.6;
}

.multi-lang-title .lang-en,
.multi-lang-title .lang-ar {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

.multi-lang-title .lang-ar {
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

.multi-lang-text {
    line-height: 1.8;
}

.multi-lang-text .lang-en,
.multi-lang-text .lang-ar {
    color: var(--text-light);
    display: block;
    margin-top: 8px;
}

.multi-lang-text .lang-ar {
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

/* ----------------------------------------
   Form Styles
   ---------------------------------------- */
.form-section {
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.6;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
}

.label-ar {
    font-size: 0.9rem;
    color: var(--text-light);
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

/* ----------------------------------------
   Input with Prefix
   ---------------------------------------- */
.input-with-prefix {
    display: flex;
    align-items: center;
    position: relative;
}

.prefix {
    position: absolute;
    left: 16px;
    font-weight: 600;
    color: var(--text-color);
}

.input-with-prefix input {
    padding-left: 40px;
}

/* ----------------------------------------
   Radio & Checkbox Styles
   ---------------------------------------- */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}

.radio-label input[type="radio"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-label span {
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-style {
    text-align: center;
    font-size: 1rem;
    color: var(--text-color);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ----------------------------------------
   Agreement Styles
   ---------------------------------------- */
.agreement-list {
    background: var(--background-light);
    padding: 20px;
    border-radius: 12px;
}

.agreement-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    cursor: pointer;
}

.agreement-label:last-child {
    margin-bottom: 0;
}

.agreement-label input[type="checkbox"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.agreement-text {
    flex: 1;
    line-height: 1.8;
    font-size: 0.95rem;
}

.agree-ar {
    display: block;
    color: var(--text-light);
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
    margin-top: 4px;
}

/* ----------------------------------------
   Deposit Account Box
   ---------------------------------------- */
.deposit-account-box {
    background: white;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.8;
}

.account-ar {
    display: block;
    margin-top: 10px;
    color: var(--text-light);
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
}

/* ----------------------------------------
   Deposit Notice
   ---------------------------------------- */
.deposit-notice {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--secondary-color);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.deposit-notice p {
    margin-bottom: 16px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-color);
}

.deposit-notice p:last-child {
    margin-bottom: 0;
}

.notice-ar {
    display: block;
    color: var(--text-light);
    font-family: 'Noto Sans Arabic', sans-serif;
    direction: rtl;
    margin-top: 4px;
}

/* ----------------------------------------
   File Upload Styles
   ---------------------------------------- */
.file-upload-area {
    position: relative;
}

.file-upload-area input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: var(--background-light);
}

.file-preview img {
    max-width: 150px;
    border-radius: 8px;
    margin-top: 10px;
}

.file-icon {
    font-size: 1.5rem;
}

/* ----------------------------------------
   Signature Pad
   ---------------------------------------- */
.signature-pad-container {
    position: relative;
    background: var(--background-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.signature-pad {
    width: 100%;
    height: 200px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    cursor: crosshair;
}

.date-field {
    margin-top: 20px;
    font-weight: 600;
}

.date-field input {
    margin-left: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

/* ----------------------------------------
   Status Modal
   ---------------------------------------- */
.status-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

/* ----------------------------------------
   Responsive Modal
   ---------------------------------------- */
@media (max-width: 768px) {
    .modal-container {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }

    .modal-title {
        font-size: 1.2rem;
    }
    
    .subtitle-en, .subtitle-ar {
        font-size: 0.9rem;
    }
    
    .agreement-text {
        font-size: 0.85rem;
    }
    
    .deposit-notice p {
        font-size: 0.85rem;
    }
}
