/*
 * dialog-essaypicker.css
 *
 * Styles for Essay Picker dialog
 */

/* *******************************************************
 * Dialog sizing
 * ******************************************************* */

#essayPickerModal .db-dialog {
    max-width: 720px;
    width: 94%;
    max-height: 90vh;
}

/* *******************************************************
 * Filter row — three dropdowns side by side on desktop
 * ******************************************************* */

.ep-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    align-items: end;
}

.ep-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.ep-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ep-select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    appearance: auto;
}

.ep-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

/* *******************************************************
 * Fetch button — full width, distinct from Select
 * ******************************************************* */

.ep-fetch-row {
    display: flex;
    justify-content: stretch;
}

.ep-fetch-row .db-btn {
    flex: 1;
    background: #667eea;
    color: white;
    font-size: 1rem;
    padding: 12px;
}

.ep-fetch-row .db-btn:hover:not(:disabled) {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

/* *******************************************************
 * Essay textarea
 * ******************************************************* */

.ep-text-area {
    min-height: 180px;
    max-height: 40vh;
    resize: vertical;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #222;
    background: #fafafa;
    border-color: #e0e0e0;
}

.ep-text-area:not(:placeholder-shown) {
    background: white;
}

/* *******************************************************
 * Select button — full width, green
 * ******************************************************* */

.ep-select-row {
    display: flex;
    justify-content: stretch;
}

.ep-select-row .db-btn {
    flex: 1;
    background: #28a745;
    color: white;
    font-size: 1rem;
    padding: 12px;
}

.ep-select-row .db-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.ep-select-row .db-btn:disabled {
    background: #ccc;
    color: #888;
}

/* *******************************************************
 * Mobile layout — stack dropdowns vertically
 * ******************************************************* */

@media (max-width: 600px) {
    #essayPickerModal .db-dialog {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: 100%;
    }


    .ep-filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ep-text-area {
        min-height: 140px;
        max-height: 30vh;
    }

    .ep-select {
        font-size: 1rem;
        padding: 12px 14px;
    }
}
