/* FeedbackFormModal - Dual Feedback Questionnaire Styles */

/* ============ MODAL STRUCTURE ============ */

/* Modal Overlay - scoped via .modal-overlay parent used by this component */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    width: 100%;
}

.modal-overlay .modal-large {
    max-width: 850px;
}

/* ============ TYPE SELECTION SCREEN ============ */

.ffm-type-card {
    flex: 1;
    padding: 1.5rem;
    border: 2px solid #C8DDD8;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: white;
}

.ffm-type-card:hover {
    border-color: #372562;
    background: #F0F7F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(232, 114, 106, 0.12);
}

.ffm-type-card:active {
    transform: translateY(0);
}

/* ============ FORM BODY TEXT ============ */

/* LINGO brand purple for all body text within the modal */
.modal-overlay .modal-content {
    color: #372562;
}

.modal-overlay .modal-content input,
.modal-overlay .modal-content textarea,
.modal-overlay .modal-content select {
    color: #372562;
}

.modal-overlay .modal-content input::placeholder,
.modal-overlay .modal-content textarea::placeholder {
    color: #8AADA2;
}

/* ============ CHECKBOX SECTIONS ============ */

.modal-overlay .modal-content label {
    cursor: pointer;
}

.modal-overlay .modal-content input[type="checkbox"] {
    accent-color: #372562;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.modal-overlay .modal-content input[type="radio"] {
    accent-color: #372562;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ============ LIKERT TABLE ============ */

.modal-overlay table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.modal-overlay table thead tr {
    background: #F0F7F5;
}

.modal-overlay table thead th {
    text-align: center;
    padding: 0.5rem;
    border-bottom: 2px solid #C8DDD8;
    color: #372562;
    font-weight: 600;
}

.modal-overlay table thead th:first-child {
    text-align: left;
    min-width: 200px;
}

.modal-overlay table tbody td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid #C8DDD8;
    color: #372562;
}

.modal-overlay table tbody tr:nth-child(even) {
    background: #F0F7F5;
}

.modal-overlay table tbody tr:hover {
    background: #E8F2EF;
}

/* ============ SUPPORT RATING SCALE ============ */
/* Rating pill buttons are styled inline in the component;
   these provide fallback/enhancement */

.modal-overlay .modal-content [style*="border-radius: 8px"][style*="cursor: pointer"] {
    transition: all 0.15s ease;
}

/* ============ FORM INPUTS ============ */

.modal-overlay .modal-content input[type="text"],
.modal-overlay .modal-content textarea {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-overlay .modal-content input[type="text"]:focus,
.modal-overlay .modal-content textarea:focus {
    outline: none;
    border-color: #372562;
    box-shadow: 0 0 0 3px rgba(91, 45, 142, 0.1);
}

/* ============ ERROR / SUCCESS MESSAGES ============ */

.modal-overlay .error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

.modal-overlay .success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ============ BUTTONS ============ */

.modal-overlay .modal-content button {
    font-family: inherit;
    transition: all 0.15s ease;
}

.modal-overlay .modal-content button:hover:not(:disabled) {
    opacity: 0.9;
}

.modal-overlay .modal-content button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============ LOADING STATE ============ */

.modal-overlay .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 640px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-overlay .modal-content {
        max-height: 95vh;
        border-radius: 8px;
    }

    /* Stack type selection cards vertically on small screens */
    .ffm-type-card {
        min-width: 100%;
    }

    /* Likert table: reduce font size for narrow screens */
    .modal-overlay table {
        font-size: 0.75rem;
    }

    .modal-overlay table thead th {
        font-size: 0.65rem;
        padding: 0.35rem 0.2rem;
        min-width: 50px;
    }

    .modal-overlay table thead th:first-child {
        min-width: 120px;
    }

    .modal-overlay table tbody td {
        padding: 0.4rem 0.25rem;
    }
}

/* ============ PRINT ============ */

@media print {
    .modal-overlay {
        position: static;
        background: none;
        padding: 0;
        overflow: visible;
    }

    .modal-overlay .modal-content {
        max-height: none;
        box-shadow: none;
        border-radius: 0;
    }

    .modal-overlay table {
        page-break-inside: avoid;
    }

    .modal-overlay button {
        display: none;
    }
}
