/* ============================================================
   MODAL SHELL
   ============================================================ */

.hoa-modal-overlay {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.65);
    /* FIX: added flex centering so modal doesn't rely on margin:auto alone */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5%;
    box-sizing: border-box;
}

.hoa-modal {
    background: #3a3a2e;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    /* FIX: was "overflow: hidden" — this was clipping the modal body and causing the white block.
       Changed to "overflow: visible" so the form renders fully. */
    overflow: visible;
    /* FIX: removed "margin: 5% auto" — handled by flexbox on overlay now */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.hoa-modal-header {
    padding: 15px 20px;
    background: #3a3a2e;
    color: #8fbc5a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.hoa-modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #8fbc5a;
}

/* FIX: modal body now scrolls independently; overflow-y:auto here instead of on the modal */
.hoa-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background: #fff;
    border-radius: 0 0 8px 8px;
}

.hoa-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    line-height: 1;
}

.hoa-loading {
    padding: 20px;
    text-align: center;
    font-weight: bold;
}

/* ============================================================
   ARC FORM — BASE WRAPPER
   FIX: id selector updated from "#arc-request-form" to "#hoa-arc-form"
   ============================================================ */

#hoa-arc-form {
    font-family: inherit;
    padding: 10px 5px;
    max-width: 700px;
    margin: 0 auto;
}

#hoa-arc-form h2 {
    margin-bottom: 15px;
    font-size: 1.6rem;
    text-align: center;
    font-weight: 600;
}

/* ============================================================
   FIELDSETS
   ============================================================ */

#hoa-arc-form fieldset {
    border: 1px solid #ccc;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    background: #fafafa;
}

#hoa-arc-form legend {
    font-weight: bold;
    padding: 0 8px;
    font-size: 1.1rem;
}

/* ============================================================
   LABELS + INPUTS
   ============================================================ */

#hoa-arc-form label {
    display: block;
    margin-top: 12px;
    font-weight: 500;
}

#hoa-arc-form input[type="text"],
#hoa-arc-form input[type="date"],
#hoa-arc-form input[type="file"],
#hoa-arc-form select,
#hoa-arc-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}

#hoa-arc-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox alignment */
#hoa-arc-form input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */

#arc-submit-btn {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.2s ease;
}

#arc-submit-btn:hover {
    background: #005f8d;
}

#arc-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

/* ============================================================
   SUCCESS / ERROR MESSAGES
   ============================================================ */

#arc-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    display: none;
}

#arc-form-message.arc-success {
    display: block;
    background: #e6f7e6;
    border: 1px solid #4caf50;
    color: #2e7d32;
}

#arc-form-message.arc-error {
    display: block;
    background: #fdecea;
    border: 1px solid #f44336;
    color: #c62828;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 600px) {
    .hoa-modal {
        width: 95%;
    }

    #hoa-arc-form {
        padding: 5px;
    }

    #hoa-arc-form fieldset {
        padding: 12px;
    }

    #arc-submit-btn {
        font-size: 1rem;
        padding: 10px;
    }
}