/* TDG Surveys — Frontend styles (TDG brand palette) */

.tdg-survey-wrap {
    font-family: inherit;
}

.tdg-survey-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.tdg-survey-description {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 14px;
    line-height: 1.5;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */

.tdg-survey-field {
    margin-bottom: 14px;
}

.tdg-survey-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.tdg-survey-required {
    color: #EF8326;
    margin-left: 2px;
}

.tdg-survey-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    color: #111827;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    font-family: inherit;
}

.tdg-survey-input:focus {
    border-color: #EF8326;
    box-shadow: 0 0 0 3px rgba(239,131,38,.12);
}

.tdg-survey-textarea {
    resize: vertical;
    min-height: 72px;
}

/* ── Choice lists (radio / checkbox) ───────────────────────────────────── */

.tdg-survey-choices {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tdg-survey-choice {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}

.tdg-survey-choice input[type="radio"],
.tdg-survey-choice input[type="checkbox"] {
    accent-color: #EF8326;
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Scale ──────────────────────────────────────────────────────────────── */

.tdg-survey-scale {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.tdg-survey-scale-point {
    cursor: pointer;
}

.tdg-survey-scale-point input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tdg-survey-scale-point span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    transition: background .12s, color .12s, border-color .12s;
}

.tdg-survey-scale-point input:checked + span {
    background: #EF8326;
    color: #fff;
    border-color: #EF8326;
}

.tdg-survey-scale-point:hover span {
    border-color: #EF8326;
    color: #EF8326;
}

/* ── Submit ─────────────────────────────────────────────────────────────── */

.tdg-survey-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background: #EF8326;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    font-family: inherit;
    margin-top: 4px;
}

.tdg-survey-submit:hover {
    background: #d6711b;
}

.tdg-survey-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── Error message ──────────────────────────────────────────────────────── */

.tdg-survey-error {
    margin-top: 8px;
    font-size: 12px;
    color: #dc2626;
    font-weight: 500;
}

/* ── Compact (rail) mode ────────────────────────────────────────────────── */

.tdg-survey--compact .tdg-survey-label {
    font-size: 11px;
}

.tdg-survey--compact .tdg-survey-input {
    font-size: 12px;
    padding: 6px 9px;
}

.tdg-survey--compact .tdg-survey-choice {
    font-size: 12px;
}

.tdg-survey--compact .tdg-survey-submit {
    font-size: 12px;
    padding: 6px 14px;
}

/* ── [tdg_my_surveys] shortcode — member history view ───────────────────── */

.tdg-my-surveys {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
}

.tdg-my-surveys-empty {
    color: #6b7280;
    font-size: 14px;
}

.tdg-my-survey-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.tdg-my-survey-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.tdg-my-survey-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.tdg-my-survey-date {
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
}

.tdg-my-survey-answers {
    margin: 0;
    padding: 0;
}

.tdg-my-survey-answers dt {
    padding: 10px 18px 3px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tdg-my-survey-answers dd {
    margin: 0;
    padding: 0 18px 10px;
    font-size: 14px;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    line-height: 1.5;
}

.tdg-my-survey-answers dd:last-child {
    border-bottom: none;
}
