/* Keep rating headings and controls in the same columns on mobile. */
@media only screen and (max-width: 770px) {
    #customer-reviews #product-review-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
    }

    #customer-reviews #product-review-table col {
        width: 14%;
    }

    #customer-reviews #product-review-table col:first-child {
        width: 30%;
    }

    #customer-reviews #product-review-table th,
    #customer-reviews #product-review-table td {
        display: table-cell;
        float: none;
        width: 14%;
        vertical-align: middle;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }

    #customer-reviews #product-review-table th:first-child {
        width: 30%;
    }

    #customer-reviews #product-review-table tbody th {
        padding: 8px 4px 8px 0;
        font-size: 11px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: break-word;
        text-align: left;
    }

    #customer-reviews #product-review-table .rating-box {
        width: 100%;
        height: auto;
        background: none;
        text-indent: 0;
        text-align: center;
    }

    #customer-reviews #product-review-table .rating-box .rating {
        display: none;
    }

    #customer-reviews #product-review-table .rating-number {
        display: inline-block;
        font-size: 15px;
        line-height: 1.4;
    }

    #customer-reviews #product-review-table .rating-number:after {
        content: "\2605";
        display: inline;
        background: none;
        width: auto;
        height: auto;
        margin-left: 2px;
        top: 0;
        font-size: 11px;
    }

    #customer-reviews #product-review-table tbody td {
        padding: 0;
    }

    #customer-reviews #product-review-table tbody td label {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 12px 0;
    }

    #customer-reviews #product-review-table input.radio {
        width: 16px;
        height: 16px;
        margin: 0;
    }
}

/* ---- Review summary, sorting, photos and lightbox (UX round 4) ---- */
#customer-reviews.eudora-pdp-reviews [hidden] { display: none !important; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

#customer-reviews.eudora-pdp-reviews .eudora-rv-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 48px; margin: 8px 0 24px; padding: 20px 24px; border: 1px solid var(--pf-line, #e6e1d8); border-radius: var(--pf-radius, 4px); background: #faf8f4; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-summary__score { flex: 0 0 auto; min-width: 180px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-summary__avg { margin: 0 0 4px; color: var(--pf-muted, #6a6a6a); font-size: 15px; line-height: 1.2; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-summary__avg strong { color: var(--pf-ink, #1c1c1c); font-size: 44px; font-weight: 600; line-height: 1; }
#customer-reviews.eudora-pdp-reviews .eudora-review-stars--lg { font-size: 24px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-summary__based { margin: 6px 0 0; color: var(--pf-muted, #6a6a6a); font-size: 14px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-bars { flex: 1 1 260px; max-width: 460px; margin: 0; padding: 0; list-style: none; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-bars li { display: grid; grid-template-columns: 64px 1fr 36px; align-items: center; gap: 12px; margin: 0; padding: 4px 0; background: none; font-size: 14px; color: var(--pf-text, #3a3a3a); }
#customer-reviews.eudora-pdp-reviews .eudora-rv-bars__track { display: block; height: 10px; border-radius: 5px; background: #e4dfd6; overflow: hidden; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-bars__fill { display: block; height: 100%; border-radius: 5px; background: #f5b900; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-bars__n { text-align: right; font-variant-numeric: tabular-nums; }

#customer-reviews.eudora-pdp-reviews .eudora-rv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 0 0 8px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools__field { display: flex; align-items: center; gap: 10px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools label { margin: 0; color: var(--pf-text, #3a3a3a); font-size: 15px; font-weight: 500; text-transform: none; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools select { height: 44px; padding: 0 12px; border: 1px solid var(--pf-field, #b9b3a8); border-radius: var(--pf-radius, 4px); background: #fff; color: var(--pf-ink, #1c1c1c); font-size: 15px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools__check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools__check input { width: 20px; height: 20px; margin: 0; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools__status { margin: 0; color: var(--pf-muted, #6a6a6a); font-size: 14px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools select:focus-visible,
#customer-reviews.eudora-pdp-reviews .eudora-rv-tools input:focus-visible { outline: 2px solid var(--pf-ink, #1c1c1c); outline-offset: 2px; }

#customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__list { display: block; max-width: 820px; margin: 12px 0 20px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-item { margin: 0; padding: 20px 0; border: 0; border-top: 1px solid var(--pf-line, #e6e1d8); list-style: none; }
#customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__title { font-size: 16px; }
#customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__body { font-size: 15px; max-width: 70ch; }
#customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__date { flex-basis: auto; }
#customer-reviews.eudora-pdp-reviews .review-meta { gap: 4px 14px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-note { padding: 2px 8px; border: 1px solid var(--pf-line, #e6e1d8); border-radius: 12px; background: #faf8f4; color: var(--pf-muted, #6a6a6a); font-size: 12px; }

#customer-reviews.eudora-pdp-reviews .eudora-rv-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; padding: 0; list-style: none; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-photos li { margin: 0; padding: 0; background: none; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-photo { display: block; width: 88px; height: 88px; padding: 0; border: 1px solid var(--pf-line, #e6e1d8); border-radius: var(--pf-radius, 4px); background: #f2efe9; overflow: hidden; cursor: zoom-in; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-photo:focus-visible { outline: 3px solid var(--pf-ink, #1c1c1c); outline-offset: 2px; }

#customer-reviews.eudora-pdp-reviews .eudora-rv-more-wrap { margin: 0 0 24px; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-more { height: 46px; padding: 0 22px; border: 1px solid var(--pf-ink, #1c1c1c); border-radius: var(--pf-radius, 4px); background: #fff; color: var(--pf-ink, #1c1c1c); font-size: 15px; font-weight: 600; cursor: pointer; }
#customer-reviews.eudora-pdp-reviews .eudora-rv-more:focus-visible { outline: 2px solid var(--pf-ink, #1c1c1c); outline-offset: 2px; }

html.eudora-rv-lock { overflow: hidden; }
.eudora-rv-lightbox { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 20, 20, .93); }
.eudora-rv-lightbox[hidden] { display: none; }
.eudora-rv-lightbox__panel { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 100%; max-height: 100%; }
.eudora-rv-lightbox__img { display: block; max-width: 92vw; max-height: calc(100vh - 140px); height: auto; width: auto; border-radius: 4px; background: #222; }
.eudora-rv-lightbox__bar { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 12px; color: #fff; font-size: 15px; }
.eudora-rv-lightbox button { min-width: 48px; height: 48px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 24px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.eudora-rv-lightbox button:disabled { opacity: .35; cursor: default; }
.eudora-rv-lightbox button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.eudora-rv-lightbox__close { position: absolute; top: -8px; right: -8px; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
    .eudora-rv-lightbox:not([hidden]) { animation: eudora-rv-fade .15s ease-out; }
    @keyframes eudora-rv-fade { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 600px) {
    #customer-reviews.eudora-pdp-reviews .eudora-rv-summary { padding: 16px; gap: 16px; }
    #customer-reviews.eudora-pdp-reviews .eudora-rv-bars { flex-basis: 100%; max-width: none; }
    #customer-reviews.eudora-pdp-reviews .eudora-rv-tools__field { width: 100%; }
    #customer-reviews.eudora-pdp-reviews .eudora-rv-tools select { flex: 1; }
    #customer-reviews.eudora-pdp-reviews .eudora-rv-photo { width: 76px; height: 76px; }
    .eudora-rv-lightbox__close { top: 4px; right: 4px; }
    .eudora-rv-lightbox__img { max-height: calc(100vh - 150px); }
}
#customer-reviews.eudora-pdp-reviews .eudora-review-stars { line-height: 1; vertical-align: top; }
#customer-reviews.eudora-pdp-reviews .eudora-review-stars > span { display: block; line-height: 1; }
#customer-reviews.eudora-pdp-reviews .eudora-review-stars > .eudora-review-stars__fill { display: block; }

/* Review form: optional photo upload (senior-friendly: 16px+ text, 44px+ targets) */
.eudora-rv-upload label { font-size: 16px; font-weight: 600; }
.eudora-rv-upload__help { margin: 4px 0 8px; font-size: 16px; line-height: 1.4; color: #444; }
.eudora-rv-upload__input { display: block; width: 100%; min-height: 44px; padding: 10px 0; font-size: 16px; }
.eudora-rv-upload__input::file-selector-button { min-height: 44px; padding: 10px 18px; margin-right: 12px; font-size: 16px; cursor: pointer; }
.eudora-rv-upload__error { margin: 6px 0 0; font-size: 16px; line-height: 1.4; color: #b00020; font-weight: 600; }
.eudora-rv-upload__previews { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0 0; padding: 0; list-style: none; }
.eudora-rv-upload__previews li { display: flex; align-items: center; gap: 10px; flex: 1 1 100%; min-width: 0; font-size: 16px; }
.eudora-rv-upload__previews img { width: 64px; height: 64px; object-fit: cover; border: 1px solid #ccc; border-radius: 4px; flex: none; }
.eudora-rv-upload__previews span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eudora-rv-upload__previews button { min-height: 44px; min-width: 44px; padding: 8px 14px; font-size: 16px; cursor: pointer; }
.eudora-rv-upload__help, .eudora-rv-upload__error, .eudora-rv-upload__previews li, .eudora-rv-upload__previews span, .eudora-rv-upload__previews button { text-transform: none; letter-spacing: normal; }

/* Photo field: no legacy input box; the picker is a brand-pink outline button. */
#customer-reviews .form-list .eudora-rv-upload input.eudora-rv-upload__input {
    display: flex; align-items: center; width: 100%; height: auto; min-height: 48px; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: none; box-shadow: none; color: #444; font: inherit; font-size: 16px; line-height: 1.4;
}
#customer-reviews .form-list .eudora-rv-upload input.eudora-rv-upload__input::file-selector-button {
    min-height: 46px; margin: 0 14px 0 0; padding: 0 20px; border: 1px solid var(--el-brand, #d1045f); border-radius: 6px;
    background: #fff; color: var(--el-brand, #d1045f); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
#customer-reviews .form-list .eudora-rv-upload input.eudora-rv-upload__input::file-selector-button:hover { background: var(--el-brand, #d1045f); color: #fff; }
#customer-reviews .form-list .eudora-rv-upload input.eudora-rv-upload__input:focus-visible { outline: 3px solid #1d1d1f; outline-offset: 3px; }
#customer-reviews .form-list .eudora-rv-upload__previews button {
    border: 1px solid #ccc; border-radius: 6px; background: #fff; color: #1d1d1f;
}
#customer-reviews .form-list .eudora-rv-upload__previews button:hover { border-color: #a8034c; color: #a8034c; }
@media (prefers-reduced-motion: reduce) { #customer-reviews .form-list .eudora-rv-upload input.eudora-rv-upload__input::file-selector-button { transition: none; } }

/* "Write a review" toggle: brand-pink outline like the photo picker (overrides the green in eudora-pdp-1.0.5.css, which is live and stays unedited). */
.catalog-product-view #customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__form > summary {
    border: 1px solid var(--el-brand, #d1045f); border-radius: 6px; background: #fff; color: var(--el-brand, #d1045f);
    transition: background-color .15s ease, color .15s ease;
}
.catalog-product-view #customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__form > summary:hover,
.catalog-product-view #customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__form[open] > summary {
    background: var(--el-brand, #d1045f); color: #fff;
}
.catalog-product-view #customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__form > summary:focus-visible { outline: 3px solid #1d1d1f; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .catalog-product-view #customer-reviews.eudora-pdp-reviews .eudora-pdp-reviews__form > summary { transition: none; } }
