/* ─── Oxford Survey — Public Form ─── */
.ox-survey-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
}

.ox-survey-logo {
    display: block;
    width: 100px;
    margin: 0 auto 16px;
}

.ox-survey-header {
    text-align: center;
    margin-bottom: 36px;
}

.ox-survey-header h2 {
    color: #1e3a5f;
    font-size: 1.6rem;
    margin: 0 0 6px;
}

.ox-survey-semester {
    color: #888;
    font-size: 0.95rem;
    margin: 0 0 16px;
}

.ox-survey-professor-badge {
    display: inline-block;
    background: #f0f4ff;
    border: 1px solid #c5d5f0;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1rem;
    color: #1e3a5f;
}

/* ─── Questions ─── */
.ox-survey-question {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid #f0f0f0;
}

.ox-survey-question:last-of-type {
    border-bottom: none;
}

.ox-survey-label {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #222;
    margin-bottom: 4px;
}

.ox-survey-hint {
    font-size: 0.85rem;
    color: #888;
    margin: 0 0 12px;
}

.ox-required {
    color: #dc3545;
}

/* ─── Radio Buttons ─── */
.ox-survey-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.ox-survey-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.95rem;
}

.ox-survey-radio:hover {
    border-color: #1e3a5f;
    background: #fafbff;
}

.ox-survey-radio:has(input:checked) {
    border-color: #1e3a5f;
    background: #f0f4ff;
}

.ox-survey-radio input[type="radio"] {
    accent-color: #1e3a5f;
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

/* ─── Rating Buttons (1-5 scale) ─── */
.ox-survey-rating {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.ox-survey-rating-btn {
    flex: 1;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.ox-survey-rating-btn:hover {
    border-color: #1e3a5f;
    background: #fafbff;
    transform: translateY(-2px);
}

.ox-survey-rating-btn.selected {
    border-color: #1e3a5f;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.15);
}

.rating-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.rating-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.ox-survey-rating-btn.selected .rating-label {
    color: #1e3a5f;
    font-weight: 700;
}

/* ─── NPS Scale (0-10) ─── */
.ox-survey-nps {
    display: flex;
    gap: 4px;
    margin-top: 10px;
    flex-wrap: nowrap;
}

.ox-survey-nps-btn {
    flex: 1;
    min-width: 0;
    padding: 12px 4px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.ox-survey-nps-btn:hover {
    border-color: #1e3a5f;
    transform: translateY(-2px);
}

/* Detractor colors (0-6) */
.ox-survey-nps-btn.selected[data-value="0"],
.ox-survey-nps-btn.selected[data-value="1"],
.ox-survey-nps-btn.selected[data-value="2"],
.ox-survey-nps-btn.selected[data-value="3"],
.ox-survey-nps-btn.selected[data-value="4"],
.ox-survey-nps-btn.selected[data-value="5"],
.ox-survey-nps-btn.selected[data-value="6"] {
    background: #fde8e8;
    border-color: #e53e3e;
    color: #c53030;
}

/* Passive colors (7-8) */
.ox-survey-nps-btn.selected[data-value="7"],
.ox-survey-nps-btn.selected[data-value="8"] {
    background: #fefce8;
    border-color: #d69e2e;
    color: #b7791f;
}

/* Promoter colors (9-10) */
.ox-survey-nps-btn.selected[data-value="9"],
.ox-survey-nps-btn.selected[data-value="10"] {
    background: #e6ffed;
    border-color: #38a169;
    color: #276749;
}

.ox-survey-nps-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #999;
}

/* ─── Text Fields ─── */
.ox-survey-question textarea,
.ox-survey-question input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
    margin-top: 8px;
}

.ox-survey-question textarea:focus,
.ox-survey-question input[type="text"]:focus {
    outline: none;
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.ox-survey-outro-field {
    margin-top: 8px;
}

/* ─── Submit ─── */
.ox-survey-submit {
    text-align: center;
    margin-top: 32px;
}

.ox-survey-submit button {
    background: #1e3a5f;
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    max-width: 320px;
}

.ox-survey-submit button:hover {
    background: #15304d;
}

.ox-survey-submit button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Error / Success ─── */
.ox-survey-error {
    padding: 12px 16px;
    background: #fde8e8;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    color: #c53030;
    margin-top: 16px;
    text-align: center;
    font-size: 0.95rem;
}

.ox-survey-success {
    text-align: center;
    padding: 40px 20px;
}

.ox-survey-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: #e6ffed;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ox-survey-success-icon svg {
    width: 40px;
    height: 40px;
    color: #38a169;
}

.ox-survey-success h2 {
    color: #1e3a5f;
    margin-bottom: 10px;
}

.ox-survey-success p {
    color: #555;
    font-size: 1rem;
}

.ox-survey-success-sub {
    color: #999 !important;
    font-size: 0.9rem !important;
    margin-top: 16px;
    font-style: italic;
}

/* ─── Validation highlight ─── */
.ox-survey-question.has-error {
    border-left: 3px solid #dc3545;
    padding-left: 16px;
}

.ox-survey-question.has-error .ox-survey-label {
    color: #dc3545;
}

/* ─── Mobile ─── */
@media (max-width: 480px) {
    .ox-survey-wrapper {
        padding: 20px 14px 40px;
    }

    .ox-survey-header h2 {
        font-size: 1.3rem;
    }

    .ox-survey-rating {
        gap: 6px;
    }

    .ox-survey-rating-btn {
        min-width: 56px;
        padding: 10px 4px;
    }

    .rating-emoji {
        font-size: 1.3rem;
    }

    .rating-label {
        font-size: 0.65rem;
    }

    .ox-survey-nps {
        gap: 3px;
    }

    .ox-survey-nps-btn {
        min-width: 0;
        padding: 10px 0;
        font-size: 0.85rem;
    }

    .ox-survey-submit button {
        width: 100%;
        max-width: none;
    }
}
