/* ==========================================================
   RHF Support Forms — Frontend Modal Styles
========================================================== */

:root {
    --rhf-navy:   #262262;
    --rhf-orange: #FF8C42;
    --rhf-orange-dark: #e07835;
    --rhf-border: #e5e5e5;
    --rhf-bg:     #f9f9f9;
    --rhf-white:  #ffffff;
    --rhf-text:   #262262;
    --rhf-muted:  #666666;
    --rhf-success-bg: #eaf7ec;
    --rhf-success-text: #2e7d32;
    --rhf-error-bg:   #fdecea;
    --rhf-error-text: #c62828;
    --rhf-radius: 8px;
    --rhf-shadow: 0 8px 40px rgba(0,0,0,0.18);
}

/* ---- Body lock ---- */
body.rhf-sf-no-scroll {
    overflow: hidden;
}

/* ---- Modal backdrop ---- */
.rhf-sf-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.rhf-sf-modal.rhf-sf-modal--open {
    display: flex;
}

.rhf-sf-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    cursor: pointer;
}

/* ---- Modal container ---- */
.rhf-sf-modal-container {
    position: relative;
    z-index: 1;
    background: var(--rhf-white);
    border-radius: var(--rhf-radius);
    box-shadow: var(--rhf-shadow);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: 16px;
    overflow: hidden;
    animation: rhf-sf-slide-up 0.25s ease;
}

@keyframes rhf-sf-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Close button ---- */
.rhf-sf-modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: var(--rhf-white);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}

.rhf-sf-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ---- Header ---- */
.rhf-sf-modal-header {
    background: var(--rhf-navy);
    padding: 28px 32px 24px;
    flex-shrink: 0;
}

.rhf-sf-modal-header h2 {
    color: var(--rhf-white);
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 700;
}

.rhf-sf-modal-header p {
    color: rgba(255,255,255,0.8);
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}

/* ---- Scrollable body ---- */
.rhf-sf-modal-body {
    overflow-y: auto;
    padding: 24px 32px 32px;
    flex: 1;
}

/* ---- Section labels ---- */
.rhf-sf-form-section-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rhf-navy);
    border-bottom: 2px solid var(--rhf-navy);
    padding-bottom: 6px;
    margin: 24px 0 16px;
}

.rhf-sf-form-section-label:first-child {
    margin-top: 0;
}

/* ---- Row / field layout ---- */
.rhf-sf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.rhf-sf-field {
    display: flex;
    flex-direction: column;
}

.rhf-sf-field.rhf-sf-full {
    grid-column: 1 / -1;
}

.rhf-sf-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--rhf-text);
    margin-bottom: 6px;
}

/* ---- Inputs ---- */
.rhf-sf-modal-body input[type="text"],
.rhf-sf-modal-body input[type="email"],
.rhf-sf-modal-body input[type="tel"],
.rhf-sf-modal-body input[type="number"],
.rhf-sf-modal-body input[type="month"],
.rhf-sf-modal-body select,
.rhf-sf-modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--rhf-border);
    border-radius: var(--rhf-radius);
    font-size: 15px;
    color: var(--rhf-text);
    background: var(--rhf-white);
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: inherit;
}

.rhf-sf-modal-body input:focus,
.rhf-sf-modal-body select:focus,
.rhf-sf-modal-body textarea:focus {
    outline: none;
    border-color: var(--rhf-navy);
}

.rhf-sf-modal-body textarea {
    resize: vertical;
}

/* ---- Radio group ---- */
.rhf-sf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhf-sf-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--rhf-text);
    cursor: pointer;
}

.rhf-sf-radio-label input[type="radio"] {
    width: auto;
    accent-color: var(--rhf-navy);
}

/* ---- Checkbox group ---- */
.rhf-sf-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhf-sf-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--rhf-text);
    cursor: pointer;
}

.rhf-sf-checkbox-label input[type="checkbox"] {
    width: auto;
    accent-color: var(--rhf-navy);
}

/* ---- Form footer ---- */
.rhf-sf-form-footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rhf-sf-privacy-note {
    font-size: 13px;
    color: var(--rhf-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rhf-sf-privacy-note .fa-lock {
    color: var(--rhf-navy);
    font-size: 12px;
}

/* ---- Submit button ---- */
.rhf-sf-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: var(--rhf-orange);
    color: var(--rhf-white);
    border: none;
    border-radius: var(--rhf-radius);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
}

.rhf-sf-submit-btn:hover:not(:disabled) {
    background: var(--rhf-orange-dark);
}

.rhf-sf-submit-btn:active:not(:disabled) {
    transform: scale(0.99);
}

.rhf-sf-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ---- Messages ---- */
.rhf-sf-form-message {
    padding: 14px 16px;
    border-radius: var(--rhf-radius);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.rhf-sf-form-message.rhf-sf-success {
    background: var(--rhf-success-bg);
    color: var(--rhf-success-text);
    border-left: 4px solid #4caf50;
}

.rhf-sf-form-message.rhf-sf-error {
    background: var(--rhf-error-bg);
    color: var(--rhf-error-text);
    border-left: 4px solid #f44336;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .rhf-sf-modal-container {
        max-height: 95vh;
        margin: 8px;
    }

    .rhf-sf-modal-header {
        padding: 20px 20px 16px;
    }

    .rhf-sf-modal-body {
        padding: 16px 20px 24px;
    }

    .rhf-sf-row {
        grid-template-columns: 1fr;
    }

    .rhf-sf-field.rhf-sf-full {
        grid-column: 1;
    }
}
