/* Reseñas (templates/resenas.php). Sobre contacto.css + empresas.css. */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.tr-order {
    display: flex; flex-direction: column; gap: 4px; max-width: 30em; padding: 14px 16px; border-radius: 12px;
    background: rgba(246, 240, 232, 0.1); border: 1px solid rgba(246, 240, 232, 0.2);
}
.tr-order small { font-size: 12px; color: rgba(246, 240, 232, 0.8); }
.tr-order strong { font-size: 15px; font-weight: 500; color: var(--paper-text) !important; }

/* Estrellas: radios dentro de labels; se pintan la elegida y las de antes. */
.tr-rating { margin: 0; padding: 0; border: 0; min-width: 0; }
.tr-rating legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.tr-rating legend span { color: var(--brand); }
.tr-stars { display: inline-flex; gap: 4px; }
.tr-stars label { position: relative; display: inline-flex; padding: 2px; border-radius: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tr-stars input { position: absolute; top: 0; left: 0; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tr-stars svg { fill: var(--ink-06); stroke: var(--ink-15); stroke-width: 1; stroke-linejoin: round; transition: fill 0.15s ease, stroke 0.15s ease, transform 0.2s var(--ease); }
.tr-stars label:has(input:checked) svg,
.tr-stars label:has(~ label input:checked) svg { fill: #E0A400; stroke: #C98A00; }
@media (hover: hover) {
    .tr-stars:hover label svg { fill: var(--ink-06); stroke: var(--ink-15); }
    .tr-stars label:hover svg,
    .tr-stars label:has(~ label:hover) svg { fill: #F0C040; stroke: #C98A00; }
}
.tr-stars label:active svg { transform: scale(0.9); }
.tr-stars label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
.tr-rating-label { display: inline-block; margin-left: 10px; font-size: 14px; font-weight: 500; color: var(--ink-60); vertical-align: middle; transform: translateY(-12px); }

.tr-count { align-self: flex-end; font-size: 12px; color: var(--ink-60); }

/* Foto */
.tr-photo-label { font-size: 13px; font-weight: 500; }
.tr-photo { position: relative; }
.tr-photo-input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.tr-photo-drop {
    display: flex; align-items: center; justify-content: center; min-height: 96px; border: 1px dashed var(--ink-15); border-radius: 12px;
    background: var(--paper); color: var(--ink-60); font-size: 15px; font-weight: 500 !important; cursor: pointer; overflow: hidden;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.tr-photo-drop:hover { border-color: var(--ink-50); color: var(--ink); }
.tr-photo:has(.tr-photo-input:focus-visible) .tr-photo-drop { outline: 2px solid var(--brand); outline-offset: 2px; }
.tr-photo-drop span { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.tr-photo-drop span[hidden], .tr-photo-drop img[hidden], .tr-photo-remove[hidden] { display: none; }
.tr-photo-drop img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.tr-photo-remove { align-self: flex-start; padding: 4px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tr-hint { font-size: 12px; color: var(--ink-60); }
.tr-hint.is-error { color: #9B1C1C; }

.tr-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.tr-consent input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }

/* Estados sin formulario */
.tr-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tr-empty p { color: var(--ink-60); }
.tr-empty p strong { color: var(--ink); font-weight: 500; }
.tr-empty a:not(.th-btn), .tr-note a { text-decoration: underline; text-underline-offset: 3px; }
.tr-note { font-size: 14px; }
.tr-btn { background: var(--ink); color: var(--paper-text) !important; }

.tr-orders { display: flex; flex-direction: column; width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
.tr-orders li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--ink-06); }
.tr-orders li:first-child { border-top: 0; }
.tr-orders li > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-orders strong { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.tr-orders small { font-size: 12px; color: var(--ink-60); }
.tr-tag { flex: none; font-size: 13px; font-style: normal; font-weight: 500; color: var(--teal); }
.tr-tag--muted { color: var(--ink-60); }

@media (max-width: 480px) {
    .tr-stars svg { width: 40px; height: 40px; }
    .tr-rating-label { display: block; margin: 4px 0 0; transform: none; }
    .tr-form .te-form-foot .th-btn { width: 100%; justify-content: center; }
}
