/* ── RTA App ──────────────────────────────────────────────────── */

/* ── Setup wizard ─────────────────────────────────────────────── */
.rta-setup-wrap {
    padding-bottom: 2rem;
}

/* Progress bar */
.rta-progress {
    display: flex;
    align-items: center;
}

.rta-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.rta-step-dot.active {
    border-color: #dc3545;
    color: #dc3545;
}

.rta-step-dot.done {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.rta-step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 6px;
    transition: background 0.2s;
}

.rta-step-line.active {
    background: #dc3545;
}

/* Option cards (step 1) */
.rta-option-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}

.rta-option-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.04);
}

.rta-option-card.selected {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
}

.rta-option-icon {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
    margin-top: 1px;
}

.rta-option-card.selected .rta-option-icon {
    color: #dc3545;
}

.rta-option-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.rta-option-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
}

/* Info box */
.rta-info-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
}

/* ── Main RTA view ────────────────────────────────────────────── */

/* SPL row */
.rta-spl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rta-spl-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.rta-spl-value {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.rta-spl-unit {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
    align-self: flex-end;
    padding-bottom: 4px;
}

.rta-spl-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.rta-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rta-meta-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.3);
}

.rta-meta-val {
    font-size: 0.82rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.rta-meta-reset {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
    padding: 0 2px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.15s;
}

.rta-meta-reset:hover {
    color: #dc3545;
}

/* Canvas */
.rta-canvas-wrap {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
}

#rta-canvas {
    display: block;
    width: 100%;
    height: 100%;
    padding: 3px;
}

/* Controls */
.rta-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rta-ctrl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 32px;
}

.rta-ctrl-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    min-width: 72px;
}

.rta-vol-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Main button */
.rta-btn-main {
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Layout grid ──────────────────────────────────────────────── */

/* Portrait: coluna única */
.rta-main-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rta-left-col  { width: 100%; }
.rta-right-col { width: 100%; }

/* Landscape em telas pequenas: canvas | controles lado a lado */
@media (max-height: 520px) and (orientation: landscape) {
    .rta-main-grid {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
    }

    .rta-left-col {
        flex: 1;
        min-width: 0;
    }

    .rta-right-col {
        width: 195px;
        flex-shrink: 0;
    }

    .rta-canvas-wrap {
        height: 170px;
        margin-bottom: 0;
    }

    .rta-spl-value {
        font-size: 1.9rem;
    }

    .rta-btn-main {
        height: 38px;
        font-size: 0.9rem;
    }
}

/* Telas maiores (tablet/desktop): canvas mais alto */
@media (min-width: 576px) {
    .rta-canvas-wrap {
        height: 260px;
    }
}

/* ── Saved Responses ──────────────────────────────────────────── */
.rta-saved-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.02);
    transition: opacity 0.15s;
}

.rta-saved-item.rta-saved-hidden {
    opacity: 0.45;
}

.rta-saved-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rta-saved-name {
    flex: 1;
    font-size: 0.8rem;
    outline: none;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: text;
    border-radius: 3px;
    padding: 1px 3px;
    margin: 0 -3px;
}

.rta-saved-name:focus {
    text-overflow: clip;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.rta-saved-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.rta-saved-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.28);
    font-size: 0.78rem;
    padding: 2px 5px;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
    border-radius: 3px;
}

.rta-saved-btn:hover {
    color: rgba(255, 255, 255, 0.85);
}

.rta-saved-btn.danger:hover {
    color: #dc3545;
}

.rta-clear-btn {
    font-size: 0.72rem;
    text-decoration: none;
    opacity: 0.7;
}

.rta-clear-btn:hover {
    opacity: 1;
}

.rta-kbd {
    font-size: 0.58rem;
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.45);
    font-family: monospace;
    vertical-align: middle;
}
