/* ============================================
   STAY RATING - Gradimento del soggiorno (dashboard v2, lotto 4a)
   Striscia d'invito, voce di menu, questionario (mockup v30:
   stelle arancio, chip selezionati nel colore del brand).
   ============================================ */

:root {
    --sr-star-on: #D97706;
    --sr-star-off: #D6D3CE;
}

/* === VOCE DI MENU === */
.menu-link {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
}

.menu-link:hover {
    background: var(--bg-tertiary);
}

.menu-link .material-symbols-outlined {
    font-size: 22px;
    color: var(--brand-turquoise);
}

/* === STRISCIA D'INVITO (sopra la bottom-nav) === */
.sr-strip {
    position: fixed;
    left: var(--space-4);
    right: var(--space-4);
    bottom: calc(var(--space-1) + var(--safe-area-bottom) + var(--nav-height) + var(--space-2));
    max-width: calc(500px - var(--space-4) * 2);
    margin: 0 auto;
    z-index: var(--z-toast);

    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "text close"
        "stars close";
    align-items: center;
    gap: var(--space-1) var(--space-2);
    padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);

    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);

    opacity: 0;
    transform: translateY(12px);
    transition: opacity 300ms ease, transform 300ms ease;
}

.sr-strip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-strip.is-covered {
    visibility: hidden;
}

.sr-strip-text {
    grid-area: text;
    margin: 0;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.sr-strip-stars {
    grid-area: stars;
    display: flex;
    gap: var(--space-1);
}

.sr-strip-close {
    grid-area: close;
    align-self: start;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
}

.sr-strip-close .material-symbols-outlined {
    font-size: 18px;
}

/* === STELLE (striscia e questionario) === */
.sr-star {
    padding: 0 2px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1.1;
    color: var(--sr-star-off);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.sr-strip .sr-star {
    font-size: 26px;
    color: var(--sr-star-on);
    opacity: 0.45;
}

.sr-strip .sr-star:hover,
.sr-strip .sr-star:focus-visible {
    opacity: 1;
}

.sr-star.is-on {
    color: var(--sr-star-on);
}

.sr-star:active {
    transform: scale(0.9);
}

/* === QUESTIONARIO (detail modal, non a schermo intero) === */
.modal:not(.modal--fullscreen) .modal-close {
    z-index: 10;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
}

/* La bottom-nav resta sopra i modal (bottom-nav.css): spazio in fondo
   perche' il pulsante di invio non finisca sotto la nav. */
.sr-sheet {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    padding: var(--space-6) var(--space-5)
             calc(var(--nav-height) + var(--space-1) + var(--safe-area-bottom) + var(--space-6));
}

.sr-title {
    margin: 0;
    padding-right: var(--space-10);
}

.sr-stars {
    display: flex;
    gap: var(--space-1);
    margin-top: calc(var(--space-2) * -1);
}

.sr-stars .sr-star {
    font-size: 38px;
}

.sr-block {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.sr-block[hidden] {
    display: none;
}

.sr-question {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}

.sr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.sr-chip {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    font: inherit;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.sr-chip.is-on {
    background: var(--brand-turquoise);
    border-color: var(--brand-turquoise);
    color: var(--text-inverse);
}

.sr-textarea,
.sr-input {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-3);
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    font: inherit;
    font-size: var(--text-base);
    color: var(--text-primary);
}

.sr-textarea {
    resize: vertical;
    min-height: 84px;
}

.sr-textarea:focus,
.sr-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.sr-foot {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
}

.sr-note {
    margin: 0;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.sr-counter {
    flex-shrink: 0;
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}

.sr-error {
    margin: 0;
    padding: var(--space-2) var(--space-3);
    background: #FDF1DC;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: #9A5B00;
}

.sr-error[hidden] {
    display: none;
}

.sr-submit {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--brand-turquoise);
    border: none;
    border-radius: var(--radius-lg);
    font: inherit;
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    color: var(--text-inverse);
    cursor: pointer;
}

.sr-submit:disabled {
    opacity: 0.45;
    cursor: default;
}

/* === RINGRAZIAMENTO === */
.sr-thanks {
    align-items: center;
    text-align: center;
}

.sr-thanks .sr-title {
    padding-right: 0;
}

.sr-thanks-icon {
    font-size: 40px;
    color: var(--sr-star-on);
}

.sr-thanks-text,
.sr-thanks-reception {
    margin: 0;
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.sr-thanks-reception {
    font-weight: var(--weight-semibold);
    color: var(--text-primary);
}
