/* CoHer Course Survey - Frontend Styles v3.0.0 */

.ccs-survey {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ccs-survey__header { margin-bottom: 32px; text-align: center; }
.ccs-survey__header h2 { font-size: 24px; color: #1a1a1a; margin-bottom: 8px; }
.ccs-survey__description { color: #666; font-size: 15px; }

/* ── SECTION HEADER ── */
.ccs-survey__section {
    margin: 32px 0 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2271b1 100%);
    border-radius: 8px;
    color: #fff;
}
.ccs-survey__section h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #fff;
}
.ccs-survey__section-hint {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.85;
    color: #fff;
}

/* ── REGULAR QUESTION CARD ── */
.ccs-survey__question {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
    position: relative;
    transition: border-color 0.2s;
}
.ccs-survey__question:hover { border-color: #b0b0b0; }
.ccs-survey__question--required { border-left: 3px solid #2271b1; }

.ccs-survey__question-number {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #2271b1;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.ccs-survey__label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 16px;
    line-height: 1.4;
}
.ccs-required { color: #d63638; font-weight: 700; }
.ccs-optional { color: #999; font-weight: 400; font-size: 13px; }

/* ── RATING SCALE (1–5 Likert) ── */
.ccs-rating {
    user-select: none;
}

.ccs-rating__scale {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .ccs-rating__scale { gap: 6px; }
}

.ccs-rating__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.ccs-rating__radio { display: none; }

.ccs-rating__num {
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #555;
    background: #fff;
    transition: all 0.15s;
}

.ccs-rating__option:hover .ccs-rating__num {
    border-color: #2271b1;
    color: #2271b1;
    background: #f0f6ff;
}

.ccs-rating__option--selected .ccs-rating__num {
    background: #ddeeff;
    border-color: #2271b1;
    color: #2271b1;
}

.ccs-rating__option--active .ccs-rating__num {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    transform: scale(1.08);
}

.ccs-rating__labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
    width: calc(44px * 5 + 10px * 4);
    max-width: 100%;
}

@media (max-width: 480px) {
    .ccs-rating__num { width: 38px; height: 38px; font-size: 15px; }
    .ccs-rating__labels { width: calc(38px * 5 + 6px * 4); }
}

/* ── DROPDOWN ── */
.ccs-survey__select {
    width: 100%;
    max-width: 340px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}
.ccs-survey__select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

.ccs-dropdown-other {
    margin-top: 10px;
}
.ccs-dropdown-other input {
    width: 100%;
    max-width: 340px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ccs-dropdown-other input:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

/* ── RADIO / CHECKBOX ── */
.ccs-survey__option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 6px;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-weight: normal;
}
.ccs-survey__option:hover { background: #f7f9fc; border-color: #c0c0c0; }
.ccs-survey__option input[type="radio"],
.ccs-survey__option input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.ccs-survey__option span { font-size: 14px; color: #333; }

.ccs-survey__option--other { flex-wrap: wrap; }
.ccs-other-text {
    flex: 1;
    min-width: 150px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, opacity 0.2s;
}
.ccs-other-text:disabled { opacity: 0.4; background: #f5f5f5; }
.ccs-other-text:focus { outline: none; border-color: #2271b1; }

/* ── TEXTAREA ── */
.ccs-survey__input textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ccs-survey__input textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

/* ── SUBMIT & STATUS ── */
.ccs-survey__submit { text-align: center; margin-top: 32px; }

.ccs-survey__btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.ccs-survey__btn:hover { background: #135e96; }
.ccs-survey__btn:disabled { background: #999; cursor: not-allowed; }

.ccs-survey__status {
    margin-top: 16px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
}
.ccs-survey__status--success { background: #edfaef; color: #1a7a2e; border: 1px solid #b8e6c1; }
.ccs-survey__status--error   { background: #fce4e4; color: #d63638; border: 1px solid #f0b8b8; }

/* ── MESSAGES ── */
.ccs-message {
    max-width: 600px;
    margin: 40px auto;
    padding: 24px;
    text-align: center;
    border-radius: 8px;
    font-size: 16px;
}
.ccs-message--error   { background: #fce4e4; color: #d63638; border: 1px solid #f0b8b8; }
.ccs-message--success { background: #edfaef; color: #1a7a2e; border: 1px solid #b8e6c1; }

.ccs-survey__back { margin-top: 20px; }
.ccs-survey__btn--back {
    display: inline-block;
    text-decoration: none;
    background: #50575e;
    color: #fff;
    padding: 12px 36px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s;
}
.ccs-survey__btn--back:hover { background: #3c4044; color: #fff; }

/* ── VALIDATION ── */
.ccs-survey__question--invalid {
    border-color: #d63638;
    animation: ccs-shake 0.4s ease;
}
.ccs-survey__question--invalid .ccs-rating__num { border-color: #d63638; }

@keyframes ccs-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-4px); }
    75%       { transform: translateX(4px); }
}
