/* ==========================================================================
   feedback_modal.css — "Submit Feedback" modal (feedback_modal.php)

   Loaded through $pageStyles on pages that declare it, and self-linked from
   feedback_modal.php via wdrStylesheetTag() on any page that includes the
   modal without declaring it (the helper emits each stylesheet only once).

   The "Pick a Title" modal is separate and lives in random_title.css/js.
   ========================================================================== */

/* --- Overlay + dialog ---------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 31, 58, 0.85);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #ffffff;
    padding: 2.5rem;
    border: 3px solid #F2C14E;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feedback-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    color: #0056b3;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover { color: #F2C14E; }

.modal-title    { margin-bottom: 0.5rem; border-bottom: none; }
.modal-subtitle { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }

/* --- Form controls ------------------------------------------------------- */
.modal-content label {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    color: #0056b3;
    font-size: 0.9rem;
}

.modal-content input,
.modal-content textarea,
.feedback-modal-content select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    background-color: #fdfdfd;
}

.modal-content input:focus,
.modal-content textarea:focus,
.feedback-modal-content select:focus {
    outline: none;
    border-color: #F2C14E;
    box-shadow: 0 0 5px rgba(242, 193, 78, 0.5);
}

.modal-submit { width: 100%; margin-top: 1.5rem; }

/* --- Title autocomplete -------------------------------------------------- */
.feedback-title-autocomplete {
    position: relative;
}

.feedback-title-suggestions {
    position: absolute;
    z-index: 10020;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.feedback-title-suggestion {
    display: block;
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.09);
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.feedback-title-suggestion:last-child {
    border-bottom: 0;
}

.feedback-title-suggestion:hover,
.feedback-title-suggestion.is-active {
    background: rgba(0, 0, 0, 0.065);
}

.feedback-title-suggestion-title,
.feedback-title-suggestion-meta {
    display: block;
}

.feedback-title-suggestion-title {
    font-weight: 600;
}

.feedback-title-suggestion-meta {
    margin-top: 0.15rem;
    font-size: 0.86em;
    opacity: 0.75;
}

/* --- "Title is missing" extra fields ------------------------------------- */
.feedback-missing-title-fields {
    margin: 0 0 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 8px;
}

.feedback-missing-title-fields legend {
    padding: 0 0.35rem;
    font-weight: 700;
}

.feedback-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 0.8rem;
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 620px) {
    .feedback-two-column {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 600px) {
    .modal-content {
        width: calc(100% - 1.5rem);
        padding: 1.5rem 1.1rem;
    }
}
