/* report.css — Botón y modal de «Reportar un error» (inc/ui/report_button.php, report-modal.js).
   Misma estructura que el modal de WhatPiece con la piel de .db-modal: superficie crema,
   borde azul oscuro y franja naranja. */

/* 30px, igual que el hueco hasta .db-game-links: el margen colapsa con el del bloque de
   encima (resultado, niveles, tablero… hasta 28px), así que mientras sea el mayor la
   distancia es siempre la misma, haya mensaje de victoria o no. */
.report-bug-wrap { display: flex; justify-content: center; margin: 30px 0 0; }

/* Píldora con fondo propio (sobre el cielo del fondo un texto suelto no contrasta), en el
   azul secundario de ajustes: discreta, para que no invite a pulsarla. */
.report-bug-link {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 18px; border: 2px solid #1c5180; border-radius: 999px;
    background: var(--db-blue); color: #fff6df;
    font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
    box-shadow: 0 3px 0 #173d5b; transition: transform .15s, background-color .15s;
}
.report-bug-link:hover { transform: translateY(-2px); background: #2d6fa9; }
.report-bug-link:focus-visible { outline: 3px solid var(--db-orange); outline-offset: 2px; }

.report-overlay {
    position: fixed; inset: 0; z-index: 300; padding: 20px;
    display: grid; place-items: center; overflow-y: auto;
    background: #071e2bd9; backdrop-filter: blur(5px);
}
.report-modal {
    width: 100%; max-width: 460px; max-height: calc(100dvh - 40px); overflow-y: auto;
    padding: 24px 22px; box-sizing: border-box;
    background: var(--db-surface); color: var(--db-text);
    border: 2px solid #132f50; border-top: 4px solid #ff912b; border-radius: 14px;
    box-shadow: 0 20px 60px #081b35a0;
}
.report-title {
    margin: 0 0 4px; text-align: center;
    font-family: 'Bangers', Impact, sans-serif; font-weight: 400; font-size: 30px; letter-spacing: .03em;
    color: var(--db-text);
}
.report-intro { margin: 0 0 14px; text-align: center; font-size: 15px; color: var(--db-muted); }

.report-select { position: relative; margin-bottom: 12px; }
.report-select-trigger {
    display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box;
    padding: 11px 13px; border: 2px solid var(--db-border); border-radius: 8px;
    background: #fffaf0; color: var(--db-text); font: inherit; font-size: 15px; text-align: left; cursor: pointer;
}
.report-select-trigger:hover { border-color: #c09a64; }
.report-select-trigger:focus-visible,
.report-select-trigger[aria-expanded="true"] { outline: none; border-color: var(--db-orange-dark); }
.report-select-text { flex: 1; }
.report-select-text.report-select-empty { color: var(--db-muted); }
.report-select-arrow { flex-shrink: 0; transition: transform .2s; }
.report-select-trigger[aria-expanded="true"] .report-select-arrow { transform: rotate(180deg); }

/* Fondo opaco: la lista flota sobre el comentario. */
.report-select-list {
    display: none; position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5;
    margin: 0; padding: 4px; list-style: none; max-height: 240px; overflow-y: auto;
    background: #fffaf0; border: 2px solid #132f50; border-radius: 10px; box-shadow: 0 10px 24px #08213a55;
}
.report-select-list.open { display: block; }
.report-select-option { padding: 10px 12px; border-radius: 6px; font-size: 15px; cursor: pointer; }
.report-select-option:hover,
.report-select-option:focus-visible { outline: none; background: #f8cf8166; }
.report-select-option.selected { background: #ff9b3f33; font-weight: 700; }

.report-guidance {
    margin: 0 0 12px; padding: 11px 13px;
    border: 1px solid #e9b36b; border-left: 4px solid var(--db-orange); border-radius: 8px; background: #fff6e2;
}
.report-guidance.hidden,
.report-confirm.hidden { display: none; }
.report-guidance-title { margin: 0 0 5px; font-size: 15px; color: var(--db-orange-dark); }
.report-guidance-text { margin: 0; font-size: 14px; line-height: 1.45; }
.report-confirm { display: flex; align-items: flex-start; gap: 9px; margin-top: 10px; font-size: 14px; line-height: 1.35; cursor: pointer; }
.report-confirm input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--db-orange-dark); }

.report-textarea {
    display: block; width: 100%; box-sizing: border-box; padding: 10px 12px;
    border: 2px solid var(--db-border); border-radius: 8px; background: #fffaf0; color: var(--db-text);
    font: inherit; font-size: 15px; resize: vertical;
}
.report-textarea::placeholder { color: var(--db-muted); }
.report-textarea:focus { outline: none; border-color: var(--db-orange-dark); }
.report-email-input { margin-top: 8px; resize: none; }

.report-status { margin: 10px 0 0; font-size: 14px; text-align: center; }
.report-status:empty { display: none; }
.report-status.report-ok { color: #2e7d32; font-weight: 700; }
.report-status.report-ko { color: #b3261e; font-weight: 700; }

.report-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.report-btn-primary,
.report-btn-secondary {
    padding: 10px 20px; border-radius: 8px; border: 2px solid transparent;
    font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.report-btn-primary { background: #f58b28; color: #152e4e; border-color: #a95417; }
.report-btn-primary:hover:not(:disabled) { background: #ff9b3f; }
.report-btn-primary:disabled { opacity: .55; cursor: default; }
.report-btn-secondary { background: none; border-color: var(--db-border); color: var(--db-text); }
.report-btn-secondary:hover { background: #183f680f; }
.report-btn-primary:focus-visible,
.report-btn-secondary:focus-visible { outline: 3px solid var(--db-blue); outline-offset: 2px; }

@media (max-width: 480px) {
    .report-overlay { padding: 8px; }
    .report-modal { padding: 16px 14px; max-height: calc(100dvh - 16px); }
    .report-title { font-size: 25px; }
    .report-intro { margin-bottom: 8px; font-size: 14px; }
    .report-guidance { padding: 9px 10px; }
    .report-guidance-text,
    .report-confirm { font-size: 13px; }
    .report-textarea { font-size: 14px; }
    .report-actions { margin-top: 10px; }
    .report-btn-primary,
    .report-btn-secondary { flex: 1; padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .report-bug-link, .report-select-arrow { transition: none; }
    .report-bug-link:hover { transform: none; }
}
