/* ════════════════════════════════════════
   Serigest Reviews — Frontend + Landing
   ════════════════════════════════════════ */

:root {
    --sr-green:    #00b67a;
    --sr-green-dk: #005128;
    --sr-s5: #00b67a;
    --sr-s4: #73cf11;
    --sr-s3: #ffce00;
    --sr-s2: #ff8622;
    --sr-s1: #ff3722;
}

/* ══════════════════════════════════════════
   WIDGET BADGE (shortcode)
   ══════════════════════════════════════════ */

.sr-widget { display: inline-block; }

.sr-widget__badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    transition: box-shadow .2s, transform .2s;
    font-family: inherit;
}
.sr-widget__badge:hover { box-shadow: 0 4px 16px rgba(0,0,0,.13); transform: translateY(-1px); }

.sr-widget__logo-star { font-size: 28px; color: var(--sr-green); line-height: 1; }

.sr-widget__info { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.sr-widget__label { font-size: 13px; font-weight: 700; color: #111; }
.sr-widget__stars { display: flex; align-items: center; gap: 6px; }
.sr-widget__score { font-size: 13px; font-weight: 600; color: #333; }
.sr-widget__count { font-size: 11px; color: #888; }

/* Stars shared */
.sr-stars { display: inline-flex; gap: 1px; }
.sr-star { color: #dcdce6; font-size: 18px; line-height: 1; }
.sr-star--full { color: inherit; }
.sr-star--half { position: relative; display: inline-block; color: #dcdce6; }
.sr-star--half::before {
    content: '★';
    position: absolute;
    left: 0; top: 0;
    color: var(--sr-star-color, #00b67a);
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

/* ══════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════ */

.sr-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: flex-end; justify-content: center; }
.sr-modal[hidden] { display: none; }

.sr-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }

.sr-modal__box {
    position: relative;
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px 28px 40px;
    box-shadow: 0 -8px 40px rgba(0,0,0,.18);
    animation: srSlideUp .28s ease;
}

@keyframes srSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 680px) {
    .sr-modal { align-items: center; }
    .sr-modal__box { border-radius: 16px; max-height: 80vh; }
}

.sr-modal__close {
    position: absolute;
    top: -5px;
    right: 16px;
    background: #fff;
    border: none;
    font-size: 15px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background .15s;
}
.sr-modal__close:hover { background: #f5f5f5; color: #111; }

/* Summary */
.sr-modal__summary { display: flex; gap: 24px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid #f0f0f0; }

.sr-modal__score-wrap { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 4px; }
.sr-modal__score { font-size: 44px; font-weight: 800; color: #111; line-height: 1; }
.sr-modal__score-wrap .sr-stars { font-size: 22px; }
.sr-modal__label { font-size: 14px; font-weight: 700; color: #111; }
.sr-modal__total { font-size: 11px; color: #999; text-align: center; }

.sr-modal__bars { flex: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.sr-modal__bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.sr-modal__bar-label { width: 46px; color: #555; flex-shrink: 0; }
.sr-modal__bar-track { flex: 1; height: 8px; background: #f0f0f0; border-radius: 4px; overflow: hidden; }
.sr-modal__bar-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.sr-bar--5 { background: var(--sr-s5); }
.sr-bar--4 { background: var(--sr-s4); }
.sr-bar--3 { background: var(--sr-s3); }
.sr-bar--2 { background: var(--sr-s2); }
.sr-bar--1 { background: var(--sr-s1); }
.sr-modal__bar-pct { width: 30px; color: #888; text-align: right; flex-shrink: 0; font-size: 11px; }

/* Review items */
.sr-modal__reviews { display: flex; flex-direction: column; gap: 16px; }

.sr-modal__review { border: 1px solid #f0f0f0; border-radius: 10px; padding: 14px 16px; }
.sr-modal__rev-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sr-modal__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sr-green); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sr-modal__rev-meta { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.sr-modal__rev-meta strong { font-size: 13px; color: #111; }
.sr-modal__rev-meta span { font-size: 11px; color: #aaa; }
.sr-modal__rev-text { font-size: 13px; color: #555; line-height: 1.55; margin: 0; }
.sr-modal__rev-head .sr-stars { margin-left: auto; font-size: 14px; }

.sr-modal__load-more {
    display: block; width: 100%; margin-top: 16px;
    padding: 10px; background: #f5f6f8; border: 1px solid #e4e7ec;
    border-radius: 8px; font-size: 13px; font-weight: 600; color: #555;
    cursor: pointer; transition: background .15s;
}
.sr-modal__load-more:hover { background: #e8eaf0; }
.sr-modal__load-more[hidden] { display: none; }

/* ══════════════════════════════════════════
   MY ACCOUNT TAB
   ══════════════════════════════════════════ */

.sr-ma-title { font-size: 20px; font-weight: 700; color: #111; margin: 0 0 6px; }
.sr-ma-subtitle { font-size: 14px; color: #888; margin: 0 0 24px; }

.sr-ma-list { display: flex; flex-direction: column; gap: 16px; }

.sr-ma-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
}

.sr-ma-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sr-ma-card__order { font-size: 14px; font-weight: 700; color: #111; }
.sr-ma-card__date  { font-size: 12px; color: #aaa; margin-left: auto; }
.sr-ma-card__status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: #f5f5f5; color: #555; }

/* Existing review display */
.sr-ma-review { padding: 12px 14px; border-radius: 8px; background: #f9fafb; }
.sr-ma-review--approved { border-left: 3px solid var(--sr-green); }
.sr-ma-review--pending  { border-left: 3px solid #f59e0b; }
.sr-ma-review--rejected { border-left: 3px solid #e53935; }
.sr-ma-review__stars { margin-bottom: 6px; }
.sr-ma-review__text   { font-size: 13px; color: #555; margin: 0 0 8px; line-height: 1.55; }
.sr-ma-review__status { font-size: 12px; color: #888; margin: 0; }

/* Form */
.sr-ma-invite { font-size: 14px; color: #333; margin: 0 0 14px; }
.sr-ma-note   { font-size: 13px; color: #aaa; font-style: italic; }

/* Star picker — JS driven */
.sr-star-picker { display: flex; flex-direction: row; justify-content: flex-start; gap: 4px; margin-bottom: 12px; }
.sr-star-picker input[type="radio"] { display: none; }
.sr-star-picker label { display: none; } /* nasconde le label originali */
.sr-star-picker__stars { display: flex; gap: 4px; }
.sr-star-picker__star {
    font-size: 32px;
    color: #dcdce6;
    cursor: pointer;
    transition: color .1s, transform .1s;
    line-height: 1;
    user-select: none;
}
.sr-star-picker__star:hover,
.sr-star-picker__star.is-active { color: var(--sr-green); }
.sr-star-picker__star:hover { transform: scale(1.15); }

/* Large (landing) */
.sr-star-picker--large .sr-star-picker__star { font-size: 44px; }

.sr-textarea {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e4e7ec; border-radius: 8px;
    padding: 10px 12px; font-size: 14px; font-family: inherit;
    resize: vertical; outline: none; transition: border-color .15s;
}
.sr-textarea:focus { border-color: var(--sr-green); }

.sr-btn-submit {
    display: inline-block; margin-top: 10px;
    background: var(--sr-green); color: #fff;
    border: none; border-radius: 8px; cursor: pointer;
    font-size: 14px; font-weight: 700; padding: 12px 28px;
    transition: background .15s; font-family: inherit;
}
.sr-btn-submit:hover { background: #009e6b; }

.sr-form-note { font-size: 12px; color: #aaa; margin: 8px 0 0; }

.sr-form-feedback { margin-top: 10px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.sr-form-feedback--ok    { background: #d1fae5; color: #065f46; }
.sr-form-feedback--error { background: #fee2e2; color: #991b1b; }

/* ══════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════ */

.sr-landing-body {
    margin: 0; padding: 0;
    background: #f4f7f5;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a1a;
}

.sr-landing-header {
    background: var(--sr-green);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.sr-landing-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-size: 18px; font-weight: 800; }
.sr-landing-logo img { height: 36px; border-radius: 6px; }

.sr-landing-header__stats { display: flex; align-items: center; gap: 8px; color: #fff; }
.sr-landing-score { font-size: 22px; font-weight: 800; }
.sr-landing-header__stats .sr-stars { font-size: 18px; color: #fff; }
.sr-landing-count { font-size: 13px; opacity: .85; }

.sr-landing-main { max-width: 700px; margin: 0 auto; padding: 32px 16px 60px; display: flex; flex-direction: column; gap: 24px; }

.sr-landing-card {
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.07);
    text-align: center;
}
.sr-landing-card--success { border-top: 4px solid var(--sr-green); }
.sr-landing-card--error   { border-top: 4px solid #e53935; }

.sr-landing-icon { font-size: 48px; margin-bottom: 12px; }
.sr-landing-card h2 { font-size: 22px; font-weight: 800; margin: 0 0 10px; }
.sr-landing-card p  { color: #666; font-size: 15px; line-height: 1.6; margin: 0 0 20px; }

.sr-landing-card__title { font-size: 22px; font-weight: 800; color: #111; margin: 0 0 6px; text-align: left; }
.sr-landing-card__sub   { font-size: 14px; color: #666; margin: 0 0 20px; text-align: left; }

.sr-landing-stars-label { font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; text-align: left; }
.sr-star-picker { justify-content: flex-start; }

.sr-landing-rating-label { font-size: 15px; font-weight: 700; min-height: 22px; margin-bottom: 12px; text-align: left; }
.sr-rl--5 { color: var(--sr-s5); }
.sr-rl--4 { color: var(--sr-s4); }
.sr-rl--3 { color: var(--sr-s3); }
.sr-rl--2 { color: var(--sr-s2); }
.sr-rl--1 { color: var(--sr-s1); }

.sr-landing-textarea { width: 100%; box-sizing: border-box; border: 1.5px solid #e4e7ec; border-radius: 10px; padding: 12px 14px; font-size: 15px; font-family: inherit; resize: vertical; outline: none; margin-bottom: 16px; transition: border-color .15s; }
.sr-landing-textarea:focus { border-color: var(--sr-green); }

.sr-landing-btn {
    display: inline-block; background: var(--sr-green); color: #fff;
    border: none; border-radius: 10px; cursor: pointer;
    font-size: 16px; font-weight: 700; padding: 15px 36px;
    font-family: inherit; text-decoration: none;
    transition: background .15s; box-shadow: 0 4px 12px rgba(0,182,122,.3);
}
.sr-landing-btn:hover { background: #009e6b; color: #fff; }
.sr-landing-btn--ghost { background: #f5f5f5; color: #555; box-shadow: none; }
.sr-landing-btn--ghost:hover { background: #e8e8e8; }

.sr-landing-feedback { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.sr-landing-feedback--success { background: #d1fae5; color: #065f46; }
.sr-landing-feedback--error   { background: #fee2e2; color: #991b1b; }

/* Recent reviews on landing */
.sr-landing-reviews { }
.sr-landing-reviews__title { font-size: 16px; font-weight: 700; color: #111; margin: 0 0 16px; }

.sr-landing-rev { background: #fff; border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.sr-landing-rev__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sr-landing-rev__avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--sr-green); color: #fff; font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sr-landing-rev__head > div { flex: 1; }
.sr-landing-rev__head strong { font-size: 14px; display: block; color: #111; }
.sr-landing-rev__date { font-size: 11px; color: #aaa; }
.sr-landing-rev__stars { font-size: 16px; margin-left: auto; }
.sr-landing-rev__text { font-size: 13px; color: #555; line-height: 1.55; margin: 0; }

/* ══════════════════════════════════════════
   CAROUSEL SHORTCODE [serigest_reviews_carousel]
   ══════════════════════════════════════════ */

/* Stelle quadrate stile TrustPilot */
.sr-tp-stars { display: inline-flex; gap: 2px; }
.sr-tp-star {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border-radius: 2px;
    flex-shrink: 0;
}
.sr-tp-star--half {
    background: linear-gradient(to right, var(--sr-half-color, #00b67a) 50%, #dcdce6 50%) !important;
}

.sr-carousel-wrap {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 8px 0 0;
    width: 100%;
    box-sizing: border-box;
}

/* ── Left summary ── */
.sr-carousel__summary {
    flex-shrink: 0;
    width: 148px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding-top: 4px;
}
.sr-carousel__label {
    font-size: 20px;
    font-weight: 800;
    color: #111;
    line-height: 1.1;
}
.sr-carousel__stars .sr-tp-star { width: 24px; height: 24px; font-size: 15px; }
.sr-carousel__score {
    font-size: 28px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}
.sr-carousel__score span { font-size: 13px; font-weight: 400; color: #888; }
.sr-carousel__meta {
    font-size: 11px;
    color: #888;
    line-height: 1.5;
}
.sr-carousel__meta strong { color: #333; }

/* ── Viewport + arrows ── */
.sr-carousel__viewport {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sr-carousel__arrow {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #e4e7ec;
    background: #fff;
    color: #555;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, color .15s;
}
.sr-carousel__arrow:hover:not(:disabled) { border-color: #00b67a; color: #00b67a; }
.sr-carousel__arrow:disabled { opacity: .3; cursor: default; }

/* ── Track — flex con 4 card visibili e overflow scrollabile ── */
.sr-carousel__track {
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 2px 8px;
}
.sr-carousel__track::-webkit-scrollbar { display: none; }

/* ── Card stile TrustPilot: larghezza = 25% - gap per 4 visibili ── */
.sr-carousel__card {
    flex: 0 0 calc(25% - 9px);
    background: #fff;
    border: 0;
    border-radius: 8px;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    scroll-snap-align: start;
    box-sizing: border-box;
}

.sr-carousel__card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.sr-carousel__verified {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 500;
    color: #555;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.sr-carousel__card-title {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-carousel__card-text {
    font-size: 12px;
    color: #555;
    margin: 0;
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-carousel__card-meta {
    font-size: 11px;
    color: #888;
    margin: 6px 0 0;
    line-height: 1.4;
}
.sr-carousel__card-meta strong { color: #333; font-weight: 600; }

/* ── Footer link ── */
.sr-carousel__footer { margin-top: 10px; text-align: right; }
.sr-carousel__read-all {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    font-family: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .15s;
}
.sr-carousel__read-all:hover { color: var(--sr-green); }

/* ── Mobile ── */
@media (max-width: 700px) {
    .sr-carousel-wrap { flex-direction: column; gap: 14px; }
    .sr-carousel__summary { width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
    .sr-carousel__label { font-size: 17px; }
    .sr-carousel__arrow { display: none; }
    .sr-carousel__viewport { width: 100%; }
    .sr-carousel__card { flex: 0 0 72vw; }
}
