:root {
    --bg: #202124;
    --surface: #292a2d;
    --text: #e8eaed;
    --text-dim: #9aa0a6;
    --accent: #8ab4f8;
    --border: #3c4043;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Google Sans", Roboto, Arial, system-ui, sans-serif;
    line-height: 1.5;
}

body {
    display: flex;
    justify-content: center;
    padding: 24px 16px;
    min-height: 100vh;
}

.page-centered { align-items: center; }

.card {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
}

.greeting h1 {
    font-size: 1.35rem;
    font-weight: 500;
    margin: 0 0 8px;
}

.greeting .branch { color: var(--accent); }

.subtitle {
    color: var(--text-dim);
    margin: 0;
    font-size: 0.95rem;
}

/* ---- Formulario de reseña (estilo GMB) ---- */
:root {
    --star: #5f6368;
    --star-on: #fdd663;
    --error: #f28b82;
}

.review-form {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.rating {
    border: 0;
    margin: 0;
    padding: 0;
}

.rating-overall legend {
    padding: 0;
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}

.rating legend {
    padding: 0;
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text);
}

.rating-sub legend {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* Estrellas: row-reverse para que hover/checked ilumine las anteriores */
.stars {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.stars input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.stars label {
    cursor: pointer;
    font-size: 2.4rem;
    line-height: 1;
    color: var(--star);
    padding: 0 4px;
    transition: color 0.1s ease, transform 0.1s ease;
}

.stars label:first-of-type { padding-right: 0; }

.stars label:hover { transform: scale(1.08); }

.rating-sub .stars label {
    font-size: 1.6rem;
    padding: 0 3px;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
    color: var(--star-on);
}

.stars input:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.subratings {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.field textarea,
.field input[type="text"] {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.field textarea:focus,
.field input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
}

.field-error {
    margin: 6px 0 0;
    color: var(--error);
    font-size: 0.85rem;
}

/* Honeypot: fuera de pantalla (no display:none para que bots lo rellenen) */
.hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-submit {
    align-self: flex-start;
    background: var(--accent);
    color: #202124;
    border: 0;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.12s ease;
}

.btn-submit:hover { filter: brightness(1.08); }
.btn-submit:active { filter: brightness(0.95); }

a.btn-submit { text-decoration: none; display: inline-block; }

/* ---- Pantalla de gracias ---- */
.thanks {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
}

.thanks h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

.thanks p {
    margin: 0;
    color: var(--text-dim);
}

.thanks .branch { color: var(--accent); }

.btn-google {
    background: #fdd663;
    color: #202124;
    font-weight: 600;
}

.redirect-note {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin: 0;
}

a.link-secondary {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

a.link-secondary:hover { text-decoration: underline; }
