/* ============================================================
   AutoDeal WooCommerce Reviews Bridge — Styles
   ============================================================ */

/* ── Reset liste ─────────────────────────────────────────── */
.adwb-reviews-section {
    margin-top: 40px;
}

ol.adwb-review-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Carte avis ──────────────────────────────────────────── */
.adwb-review-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid #ebebeb;
}

.adwb-review-item:last-child {
    border-bottom: none;
}

/* ── Header : avatar + meta ──────────────────────────────── */
.adwb-review-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.adwb-review-header .avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.adwb-review-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.adwb-review-author {
    font-weight: 700;
    font-size: 14px;
    color: #222;
    line-height: 1.3;
}

.adwb-review-date {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

/* ── Etoiles WooCommerce ─────────────────────────────────── */
.adwb-review-meta .star-rating,
.adwb-popup-item .star-rating {
    display: block;
    margin-top: 4px;
    font-size: 14px;
    overflow: hidden;
    position: relative;
    height: 1em;
    line-height: 1;
    width: 5.4em;
    font-family: WooCommerce, star, Arial, sans-serif;
    color: #d3ced2;
}

.adwb-review-meta .star-rating::before,
.adwb-popup-item .star-rating::before {
    content: '\e021\e021\e021\e021\e021';
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    letter-spacing: 0.1em;
}

.adwb-review-meta .star-rating span,
.adwb-popup-item .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}

.adwb-review-meta .star-rating span::before,
.adwb-popup-item .star-rating span::before {
    content: '\e020\e020\e020\e020\e020';
    top: 0;
    position: absolute;
    left: 0;
    letter-spacing: 0.1em;
    color: #f0c040;
}

.adwb-review-meta .star-rating strong,
.adwb-popup-item .star-rating strong {
    font-size: 0;
}

/* ── Corps de l'avis ─────────────────────────────────────── */
.adwb-review-body {
    padding-left: 64px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.adwb-review-title {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}

.adwb-review-title strong {
    font-weight: 700;
}

.adwb-review-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ── Photos ──────────────────────────────────────────────── */
.adwb-review-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.adwb-review-photo-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
    cursor: zoom-in;
}

.adwb-review-photo-link:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.adwb-review-photo {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: cover;
}

/* ── Bouton Voir Plus ────────────────────────────────────── */
.adwb-seemore-wrap {
    padding: 28px 0 8px;
    text-align: center;
}

.adwb-seemore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid #e84242;
    border-radius: 4px;
    color: #e84242;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.adwb-seemore-btn:hover,
.adwb-seemore-btn:focus {
    background: #e84242;
    color: #fff;
    outline: none;
}

.adwb-seemore-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e84242;
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    min-width: 28px;
    transition: background 0.2s ease, color 0.2s ease;
}

.adwb-seemore-btn:hover .adwb-seemore-count,
.adwb-seemore-btn:focus .adwb-seemore-count {
    background: #fff;
    color: #e84242;
}

/* ── Overlay popup ───────────────────────────────────────── */
.adwb-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.adwb-popup-overlay[hidden] {
    display: none !important;
}

/* ── Popup ───────────────────────────────────────────────── */
.adwb-popup {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: adwbPopupIn 0.22s ease;
}

@keyframes adwbPopupIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ── En-tete du popup ────────────────────────────────────── */
.adwb-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #ebebeb;
    flex-shrink: 0;
}

.adwb-popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 16px;
}

.adwb-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.adwb-popup-close:hover {
    background: #e84242;
    border-color: #e84242;
    color: #fff;
}

/* ── Corps scrollable du popup ───────────────────────────── */
.adwb-popup-body {
    overflow-y: auto;
    padding: 0 24px;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Avis dans le popup : meme mise en forme, dernier sans bordure */
.adwb-popup-list .adwb-popup-item {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid #ebebeb;
    list-style: none;
}

.adwb-popup-list .adwb-popup-item:last-child {
    border-bottom: none;
}

/* ── Lightbox photo ──────────────────────────────────────── */
.adwb-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.88);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: adwbFadeIn 0.18s ease;
}

@keyframes adwbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.adwb-lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
    pointer-events: none;
}

/* ── Masquer tout select residuel ────────────────────────── */
select.wcpr-rating,
select#wcpr-rating,
#respond select[name="rating"],
#commentform select[name="rating"],
.comment-form-rating select {
    display: none !important;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .adwb-review-header { gap: 12px; }
    .adwb-review-header .avatar { width: 40px; height: 40px; }
    .adwb-review-body { padding-left: 52px; }
    .adwb-review-photo { max-width: 140px; max-height: 140px; }
    .adwb-popup { max-height: 95vh; border-radius: 12px 12px 0 0; align-self: flex-end; }
    .adwb-popup-overlay { align-items: flex-end; padding: 0; }
}
