/* Request for Branches and Agencies - Clean RTL UI */

.rfba-wrapper,
.rfba-wrapper *,
.rfba-wrapper *::before,
.rfba-wrapper *::after {
    box-sizing: border-box;
}

.rfba-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    direction: rtl;
    font-family: Vazirmatn, IRANSansX, IRANSans, Tahoma, Arial, sans-serif;
    color: #111827;
}

.rfba-form {
    width: 100%;
    margin: 0;
    background: #fff;
}

/* Header */
.rfba-form-header {
    width: 100%;
    margin: 0 0 30px;
    text-align: right;
}

.rfba-form-title {
    margin: 0;
    padding: 0;
    color: #111111;
    font-size: 28px;
    line-height: 1.7;
    font-weight: 800;
    text-align: right;
}

/* Fields */
.rfba-grid {
    display: grid;
    width: 100%;
    gap: 23px 28px;
}

.rfba-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rfba-field {
    min-width: 0;
}

.rfba-field label {
    display: block;
    margin: 0 0 9px;
    color: #111111;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 700;
    text-align: right;
}

.rfba-field label span {
    color: #df2f2f;
    margin-right: 3px;
    font-weight: 700;
}

.rfba-field input {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid #e4e0e5;
    border-radius: 6px;
    outline: none;
    background: #faf8fb;
    color: #222;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-align: right;
    box-shadow: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.rfba-field input::placeholder {
    color: #aaa4ad;
    opacity: 1;
}

.rfba-field input:hover {
    border-color: #d9d3da;
}

.rfba-field input:focus {
    border-color: #c9c1ca;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(17, 24, 39, .04);
}

.rfba-field input[dir="ltr"] {
    text-align: left;
}

/* Uploads */
.rfba-upload-row {
    width: 100%;
    margin-top: 27px;
}

.rfba-upload {
    width: 100%;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    direction: rtl;
}

.rfba-upload-info {
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}

.rfba-upload-title {
    display: block;
    margin: 0;
    color: #111111;
    font-size: 16px;
    line-height: 1.7;
    font-weight: 700;
}

.rfba-upload-info small {
    display: block;
    margin-top: 5px;
    color: #aaa4ad;
    font-size: 11px;
    line-height: 1.7;
}

.rfba-upload-control {
    position: relative;
    width: 175px;
    flex: 0 0 175px;
    text-align: center;
}

.rfba-upload-control input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.rfba-upload-button {
    width: 175px;
    min-height: 52px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: #cf4549;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 700;
    text-align: center;
    transition: background-color .2s ease, transform .15s ease;
}

.rfba-upload-button:hover {
    background: #c43d43;
    transform: translateY(-1px);
}

.rfba-upload-button:active {
    transform: translateY(0);
}

.rfba-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.rfba-file-name {
    display: block;
    width: 100%;
    max-width: 175px;
    margin-top: 5px;
    color: #77717a;
    font-size: 10px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Submit */
.rfba-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 27px;
}

.rfba-submit {
    min-width: 90px;
    height: 44px;
    margin: 0;
    padding: 0 22px;
    border: 0;
    border-radius: 7px;
    outline: none;
    background: #cf4549;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    line-height: 1;
    font-weight: 700;
    box-shadow: none;
    transition: background-color .2s ease, transform .15s ease;
}

.rfba-submit:hover {
    background: #c43d43;
    transform: translateY(-1px);
}

.rfba-submit:active {
    transform: translateY(0);
}

/* Messages */
.rfba-notice {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.8;
}

.rfba-notice--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.rfba-notice--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.rfba-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Prevent theme styles from changing the form controls */
.rfba-wrapper .rfba-form input:not([type="hidden"]),
.rfba-wrapper .rfba-form button,
.rfba-wrapper .rfba-form label {
    font-family: Vazirmatn, IRANSansX, IRANSans, Tahoma, Arial, sans-serif;
}

@media (max-width: 768px) {
    .rfba-wrapper {
        padding: 0 14px;
    }

    .rfba-form-title {
        font-size: 23px;
    }

    .rfba-form-header {
        margin-bottom: 24px;
    }

    .rfba-grid--two {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .rfba-field label {
        font-size: 15px;
    }

    .rfba-field input {
        height: 50px;
    }

    .rfba-upload {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .rfba-upload-info {
        width: 100%;
    }

    .rfba-upload-control,
    .rfba-upload-button {
        width: 175px;
        flex-basis: auto;
    }

    .rfba-actions {
        justify-content: flex-start;
    }
}
