/* Advanced percentage-based ratings demo — visual sliders, weighted aggregate */

.rt-demo-nav {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c2340 100%);
    color: #fff;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.9rem;
}

.rt-demo-nav .logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fbbf24;
}

.rt-demo-nav .spacer { flex: 1; }

.rt-demo-hero {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.35rem 1.5rem;
    text-align: center;
}

.rt-demo-hero h1 {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    color: #1e293b;
}

.rt-demo-hero p {
    margin: 0 auto;
    max-width: 560px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
}

.rt-scenario-bar {
    padding: 0.85rem 1.5rem 1rem;
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
}

.rt-scenario-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #92400e;
    margin-bottom: 0.5rem;
}

.rt-scenario-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.rt-scenario-chip {
    min-height: 38px;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 2px solid #fcd34d;
    background: #fff;
    color: #78350f;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.rt-scenario-chip:hover {
    border-color: #f59e0b;
    color: #92400e;
}

.rt-scenario-chip.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.rt-scenario-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #a16207;
    line-height: 1.45;
}

.rt-admin-scenario-hint {
    font-size: 0.82rem;
    color: #475569;
    margin: 0 0 0.5rem;
    line-height: 1.45;
}

.rt-body {
    padding: 1.25rem 1.5rem 2rem;
    max-width: 720px;
}

.rt-entity-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rt-entity-card .icon {
    font-size: 2rem;
}

.rt-entity-card strong {
    display: block;
    color: #1e293b;
}

.rt-entity-card span {
    font-size: 0.82rem;
    color: #64748b;
}

.rt-score-preview {
    background: linear-gradient(135deg, #1e3a5f 0%, #0c2340 100%);
    border-radius: 14px;
    padding: 1.35rem 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
    color: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
}

.rt-score-preview .overall-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.rt-score-preview .score-stars {
    font-size: 1.65rem;
    letter-spacing: 3px;
    color: #fbbf24;
    margin: 0.25rem 0;
    line-height: 1.2;
}

.rt-score-preview .score-number {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
}

.rt-score-preview .score-number small {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.75;
}

.rt-score-preview .score-percent {
    font-size: 0.88rem;
    opacity: 0.9;
    margin-top: 0.35rem;
}

.rt-score-preview .score-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.rt-question-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s;
}

.rt-question-card:hover,
.rt-question-card:focus-within {
    border-color: #3b82f6;
}

.rt-question-title {
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.2rem;
    font-size: 1rem;
}

.rt-question-text {
    color: #6b7280;
    font-size: 0.88rem;
    margin: 0 0 0.85rem;
    line-height: 1.45;
}

.rt-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.rt-slider-labels .label-poor { color: #dc2626; }
.rt-slider-labels .label-excellent { color: #059669; }

.rt-rating-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, #fecaca 0%, #fef3c7 25%, #fef9c3 50%, #d9f99d 75%, #bbf7d0 100%);
    outline: none;
    cursor: pointer;
    touch-action: pan-y;
}

.rt-rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rt-rating-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    cursor: grab;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rt-rating-slider:active::-webkit-slider-thumb { cursor: grabbing; }

/* Reviewers never see per-slider percentages — only the combined result */
.rt-slider-meta { display: none; }

.rt-comment-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 0.82rem;
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
}

.rt-comment-toggle:hover { color: #3b82f6; }

.rt-comment-toggle .toggle-icon {
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.rt-comment-toggle.open .toggle-icon { transform: rotate(90deg); }

.rt-comment-box {
    display: none;
    margin-top: 0.55rem;
}

.rt-comment-box.show { display: block; }

.rt-comment-box textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    min-height: 56px;
}

.rt-comment-box textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.rt-overall-comment {
    margin-top: 0.5rem;
}

.rt-overall-comment label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.rt-submit-row {
    margin-top: 1.25rem;
    text-align: center;
}

.rt-btn-submit {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.rt-btn-submit:hover {
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.rt-success {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
}

.rt-success.show { display: block; }

.rt-success .tick {
    width: 56px;
    height: 56px;
    background: #059669;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

/* Admin criteria builder */
.rt-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.rt-admin-criterion {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
}

.rt-admin-criterion .head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.rt-admin-criterion strong { color: #1e293b; }

.rt-admin-criterion .q {
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.rt-admin-criterion .meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

.rt-admin-criterion button.rt-remove {
    background: none;
    border: none;
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

.rt-admin-form .ops-field {
    margin-bottom: 0.55rem;
}

.rt-admin-form label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.2rem;
}

.rt-admin-form input,
.rt-admin-form textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
}

.rt-admin-note {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.75rem;
}

.rt-admin-note strong { color: #1d4ed8; }

@media (max-width: 700px) {
    .rt-body { padding: 1rem; }
    .rt-score-preview .score-number { font-size: 2.25rem; }
}
