/* ==========================================================================
   Modal recensione identico a quello dell'app (app.php).
   Usato dalla pagina pubblica /recensioni quando si arriva dal link email.
   Le classi e la struttura sono le stesse di app.php; qui vengono isolate
   sotto #app-review-sheet per non interferire con la landing.
   ========================================================================== */

#app-review-sheet {
    --bg: #000000;
    --elev: #1c1c1e;
    --fill: rgba(120, 120, 128, .24);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, .60);
    --hairline: rgba(84, 84, 88, .65);
    --accent: #0a84ff;
    --ok: #30d158;
    --closed: #ff453a;
    --star: #ffb400;
    color-scheme: dark;
}

@media (prefers-color-scheme: light) {
    #app-review-sheet {
        --bg: #f2f2f7;
        --elev: #ffffff;
        --fill: rgba(120, 120, 128, .12);
        --label: #000000;
        --label-2: rgba(60, 60, 67, .60);
        --hairline: rgba(60, 60, 67, .29);
        --accent: #007aff;
        --ok: #248a3d;
        --closed: #d70015;
        color-scheme: light;
    }
}

#app-review-sheet.ios-theme-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .28s ease, visibility .28s ease;
}

#app-review-sheet.ios-theme-modal:not([hidden]) {
    display: flex;
}

#app-review-sheet.ios-theme-modal.is-open {
    visibility: visible;
    opacity: 1;
}

#app-review-sheet .ios-theme-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#app-review-sheet .ios-theme-modal__sheet {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    padding: 20px 18px 18px;
    border: 1px solid var(--hairline);
    border-radius: 28px;
    background: var(--elev);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .25);
    transform: scale(.9);
    opacity: 0;
    transition: transform .3s cubic-bezier(.32, .72, 0, 1), opacity .24s ease;
}

#app-review-sheet.ios-theme-modal.is-open .ios-theme-modal__sheet {
    transform: scale(1);
    opacity: 1;
}

#app-review-sheet .report-alert {
    padding: 0;
    overflow: hidden;
}

#app-review-sheet .report-alert__body {
    padding: 24px 20px 12px;
    text-align: center;
}

#app-review-sheet .report-alert__title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.015em;
    color: var(--label);
}

#app-review-sheet .report-alert__message {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--label-2);
}

#app-review-sheet .report-alert__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 20px;
}

#app-review-sheet .report-alert__btn {
    width: 100%;
    min-height: 50px;
    border-radius: 999px;
    border: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--label);
    background: transparent;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease, background .12s ease;
}

#app-review-sheet a.report-alert__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--accent);
    color: #ffffff;
}

#app-review-sheet .report-alert__btn:active {
    transform: scale(.97);
    opacity: .85;
}

#app-review-sheet .review-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 0 16px 12px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#app-review-sheet .review-star {
    padding: 5px;
    border: 0;
    background: none;
    cursor: pointer;
    color: color-mix(in srgb, var(--label) 20%, transparent);
    transition: color .12s ease, transform .12s ease;
}

#app-review-sheet .review-star svg {
    display: block;
    width: 34px;
    height: 34px;
    fill: currentColor;
}

#app-review-sheet .review-star.is-filled {
    color: var(--star);
}

#app-review-sheet .review-star:active {
    transform: scale(.9);
}

#app-review-sheet .review-stars[hidden],
#app-review-sheet .review-success[hidden] {
    display: none;
}

#app-review-sheet .review-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--label);
}

#app-review-sheet .review-success svg {
    width: 46px;
    height: 46px;
    color: var(--ok);
}

#app-review-sheet .report-alert .auth-input {
    background: var(--fill);
    border-color: var(--hairline);
    color: var(--label);
}

#app-review-sheet .report-alert .auth-input::placeholder {
    color: var(--label-2);
}

#app-review-sheet .report-alert .auth-input:focus {
    border-color: color-mix(in srgb, var(--label) 24%, transparent);
    box-shadow: none;
    outline: none;
}

/* Il pulsante di invio deve restare rosso come nell'app: la regola base
   #app-review-sheet .report-alert__btn è più specifica di #app-review-send
   e senza questa override lo renderebbe trasparente sulla landing. */
#app-review-sheet #app-review-send {
    background: #e34234;
    color: #ffffff;
}

#app-review-sheet #app-review-send:active {
    background: #c8301f;
}

#app-review-sheet #app-review-send:disabled {
    opacity: .45;
}
