/**
 * Tuteer Forms Module - Frontend Styles
 */

/* Base container styling */
.tuteer-form {
    max-width: 100%;
}

/* Specific field classes for future styling */
.tuteer-field-subject select,
.tuteer-field-level select,
.tuteer-field-tutor select {
    width: 100%;
}

/* Disabled/Grayed out state */
.tuteer-field-locked {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(1);
}

.tuteer-field-locked select {
    background-color: #f9f9f9 !important;
}

/* Context Locked state (read-only style for fields set by URL) */
.tuteer-context-locked {
    pointer-events: none;
    opacity: 0.85;
}

.tuteer-context-locked select {
    background-color: #f0f7ff !important;
    border-color: #c2e0ff !important;
}

/* Selected Tutor Box */
.tuteer-selected-tutor-box {
    background-color: #f0f7ff;
    border: 1px solid #c2e0ff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    color: #0056b3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tuteer-selected-tutor-box strong {
    font-weight: 600;
}

.tuteer-selected-tutor-box span {
    font-weight: 400;
}

/* Reordering adjustments */
.tuteer-mode-tutor-context .tuteer-field-tutor,
.tuteer-mode-tutor-subject-context .tuteer-field-tutor,
.tuteer-mode-full-context .tuteer-field-tutor {
    margin-bottom: 25px;
}

/* Hide original select when tutor is already fixed and shown in box? */
.tuteer-mode-full-context .tuteer-field-tutor select,
.tuteer-mode-tutor-subject-context .tuteer-field-tutor select,
.tuteer-mode-tutor-context .tuteer-field-tutor select {
    background-color: #f0f7ff !important;
}

/* Form Warnings/Errors */
.tuteer-form-warning {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

/* Submit button styling */
.tuteer-submit input[type="submit"] {
    /* Base for sticky mobile later */
}

/* Phone Input Styling */
.tuteer-field-phone {
    width: 100%;
}

/* Ensure intl-tel-input takes full width */
.iti {
    width: 100%;
}

.tuteer-field-error input {
    border-color: red !important;
}

.tuteer-phone-error-msg {
    color: red;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Hide hidden fields in admin/Gutenberg if they are shown */
.tuteer-field-phone-full,
.tuteer-field-phone-country,
.tuteer-field-phone-dial-code {
    display: none !important;
}

/* Multi-selection sets styling */
.tuteer-selection-sets {
    margin-bottom: 20px;
}

.tuteer-selection-set {
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #fff;
    position: relative;
}

.tuteer-selection-set__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.tuteer-selection-set__title {
    font-weight: 600;
    font-size: 1.1em;
    margin: 0;
}

.tuteer-selection-set__remove {
    background: none;
    border: none;
    color: #cc0000;
    cursor: pointer;
    font-size: 0.9em;
    padding: 5px 10px;
    text-decoration: underline;
}

.tuteer-selection-set__remove:hover {
    color: #ff0000;
    text-decoration: none;
    background: transparent !important;
}

.tuteer-selection-set__fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .tuteer-selection-set__fields {
        grid-template-columns: 1fr;
    }
}

.tuteer-selection-set__error {
    color: #d63638;
    background-color: #fcf0f1;
    border: 1px solid #f8d7da;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    display: none;
}

.tuteer-add-selection {
    margin: 0rem 0;
    text-align: center;
}

/* Styles moved to pcss.css */
.tuteer-add-selection button {
}

.tuteer-add-selection-limit {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

/* Hide original fields if they are inside selection set wrapper */
.tuteer-selection-sets .gfield {
    margin-bottom: 0 !important;
}

/* Selection sets hidden JSON field */
.tuteer-field-selection-sets-json {
    display: none !important;
}
