/* OEP Google Reviews — Front-end styles v1.8.0 */

/* ─────────────────────────────────────────────
   CSS Custom Properties
───────────────────────────────────────────── */
.oepr-wrap {
    --oepr-accent:       var(--e-global-color-accent, var(--ast-global-color-0, #1a73e8));
    --oepr-star:         #FBBC04;
    --oepr-radius:       12px;
    --oepr-gap:          20px;
    --oepr-per-view:     3;
    --oepr-font:         var(--ast-body-font-family, var(--e-global-typography-text-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif));

    /* Light (default) */
    --oepr-bg:           transparent;
    --oepr-card-bg:      #ffffff;
    --oepr-card-border:  #e8eaed;
    --oepr-card-shadow:  0 1px 6px rgba(60,64,67,.12), 0 2px 16px rgba(60,64,67,.06);
    --oepr-card-hover:   0 4px 18px rgba(60,64,67,.18), 0 8px 32px rgba(60,64,67,.10);
    --oepr-text:         #202124;
    --oepr-text-sub:     #5f6368;
    --oepr-text-muted:   #9aa0a6;
    --oepr-divider:      #f1f3f4;
    --oepr-avatar-bg:    #e8f0fe;
    --oepr-avatar-text:  #1a73e8;
    --oepr-badge-bg:     #ffffff;
    --oepr-badge-border: #e8eaed;

    font-family: var(--oepr-font);
    color: var(--oepr-text);
    box-sizing: border-box;
    background: var(--oepr-bg);
}

/* Dark theme */
.oepr-wrap[data-theme="dark"] {
    --oepr-bg:           #0f1117;
    --oepr-card-bg:      #1c1f26;
    --oepr-card-border:  rgba(255,255,255,.09);
    --oepr-card-shadow:  0 1px 6px rgba(0,0,0,.4), 0 2px 16px rgba(0,0,0,.3);
    --oepr-card-hover:   0 4px 24px rgba(0,0,0,.55);
    --oepr-text:         #e8eaed;
    --oepr-text-sub:     #9aa0a6;
    --oepr-text-muted:   #5f6368;
    --oepr-divider:      rgba(255,255,255,.07);
    --oepr-avatar-bg:    rgba(26,115,232,.18);
    --oepr-avatar-text:  #8ab4f8;
    --oepr-badge-bg:     #1c1f26;
    --oepr-badge-border: rgba(255,255,255,.09);
    border-radius: 16px;
    padding: 28px 28px 32px;
}

/* ─────────────────────────────────────────────
   Section title
───────────────────────────────────────────── */
.oepr-section-title {
    text-align: center;
    margin: 0 0 24px;
    font-size: 1.75em;
    font-weight: 700;
    color: var(--oepr-text);
}

/* ─────────────────────────────────────────────
   Rating summary header (shown above all layouts)
───────────────────────────────────────────── */
.oepr-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: var(--oepr-card-bg);
    border: 1px solid var(--oepr-card-border);
    border-radius: var(--oepr-radius);
    box-shadow: var(--oepr-card-shadow);
    flex-wrap: wrap;
}
.oepr-summary-logo { display: flex; align-items: center; flex-shrink: 0; }
.oepr-summary-divider { width: 1px; height: 32px; background: var(--oepr-card-border); flex-shrink: 0; }
.oepr-summary-name {
    font-weight: 600;
    font-size: .95em;
    color: var(--oepr-text);
    flex: 1;
    min-width: 0;
}
.oepr-summary-rating {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}
.oepr-summary-score {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--oepr-text);
    line-height: 1;
}
.oepr-summary-count {
    font-size: .8em;
    color: var(--oepr-text-muted);
}

/* ─────────────────────────────────────────────
   EXCELLENT badge (slider-card layout header)
───────────────────────────────────────────── */
.oepr-badge-header {
    display: flex;
    gap: 20px;
    align-items: stretch;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.oepr-excellent-badge {
    background: var(--oepr-badge-bg);
    border: 1px solid var(--oepr-badge-border);
    border-radius: var(--oepr-radius);
    box-shadow: var(--oepr-card-shadow);
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 180px;
    text-align: center;
    flex-shrink: 0;
}
.oepr-excellent-label {
    font-size: 1.35em;
    font-weight: 800;
    color: #1e8a4a;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.oepr-excellent-score {
    font-size: .85em;
    color: var(--oepr-text-sub);
    margin-top: 2px;
}
.oepr-excellent-count {
    font-size: .75em;
    color: var(--oepr-text-muted);
}
.oepr-excellent-logo { margin-top: 8px; opacity: .8; }

/* ─────────────────────────────────────────────
   Stars
───────────────────────────────────────────── */
.oepr-stars { display: inline-flex; gap: 1px; line-height: 1; }
.oepr-star          { color: #dadce0; font-size: 1em; }
.oepr-star.filled   { color: var(--oepr-star); }
.oepr-star.half     {
    background: linear-gradient(90deg, var(--oepr-star) 50%, #dadce0 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─────────────────────────────────────────────
   Grid / Masonry / List
───────────────────────────────────────────── */
.oepr-layout-grid .oepr-grid,
.oepr-layout-masonry .oepr-grid,
.oepr-layout-list .oepr-grid {
    display: grid;
    gap: var(--oepr-gap);
    align-items: start;
}
.oepr-cols-1 .oepr-grid { grid-template-columns: 1fr; }
.oepr-cols-2 .oepr-grid { grid-template-columns: repeat(2,1fr); }
.oepr-cols-3 .oepr-grid { grid-template-columns: repeat(3,1fr); }
.oepr-cols-4 .oepr-grid { grid-template-columns: repeat(4,1fr); }
.oepr-cols-5 .oepr-grid { grid-template-columns: repeat(5,1fr); }
.oepr-cols-6 .oepr-grid { grid-template-columns: repeat(6,1fr); }
.oepr-layout-list .oepr-grid { grid-template-columns: 1fr; }

/* ─────────────────────────────────────────────
   Card (shared by all layouts)
───────────────────────────────────────────── */
.oepr-card {
    background: var(--oepr-card-bg);
    border: 1px solid var(--oepr-card-border);
    border-radius: var(--oepr-radius);
    padding: 18px 20px 16px;
    box-shadow: var(--oepr-card-shadow);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: transform .22s ease, box-shadow .22s ease;
    position: relative;
}
.oepr-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--oepr-card-hover);
}

/* List layout horizontal card */
.oepr-layout-list .oepr-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}
.oepr-layout-list .oepr-card-header  { flex-shrink: 0; }
.oepr-layout-list .oepr-card-body    { flex: 1; min-width: 0; }

/* ─────────────────────────────────────────────
   Card header: avatar + meta + G icon
───────────────────────────────────────────── */
.oepr-card-header {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 12px;
}

/* Avatar */
.oepr-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--oepr-avatar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05em;
    color: var(--oepr-avatar-text);
    border: 1.5px solid rgba(0,0,0,.06);
}
.oepr-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Meta block */
.oepr-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.oepr-author {
    font-size: .9em;
    font-weight: 600;
    color: var(--oepr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.oepr-stars-date {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
.oepr-date {
    font-size: .72em;
    color: var(--oepr-text-muted);
    line-height: 1;
}

/* Google icon pinned top-right */
.oepr-g-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: .85;
}

/* ─────────────────────────────────────────────
   Review text + read-more
───────────────────────────────────────────── */
.oepr-text {
    font-size: .85em;
    line-height: 1.65;
    color: var(--oepr-text-sub);
    margin: 0;
    word-break: break-word;
    hyphens: auto;
}
.oepr-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.oepr-read-more {
    background: none;
    border: none;
    padding: 5px 0 0;
    font-size: .78em;
    color: var(--oepr-accent);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: none;
    text-align: left;
    line-height: 1;
}
.oepr-read-more.visible { display: block; }
.oepr-read-more:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────
   Slider
───────────────────────────────────────────── */
.oepr-layout-slider,
.oepr-layout-slider-card { position: relative; }

.oepr-slider-nav-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 14px;
}

.oepr-slider-track-wrap {
    overflow: hidden;
    border-radius: var(--oepr-radius);
}
.oepr-slider-track {
    display: flex;
    gap: var(--oepr-gap);
    transition: transform .4s cubic-bezier(.25,.8,.25,1);
    will-change: transform;
}

.oepr-layout-slider .oepr-card,
.oepr-layout-slider-card .oepr-card {
    flex-shrink: 0;
    width: calc((100% - var(--oepr-gap) * (var(--oepr-per-view) - 1)) / var(--oepr-per-view));
}

/* Nav buttons */
.oepr-btn-nav {
    background: var(--oepr-card-bg);
    border: 1px solid var(--oepr-card-border);
    color: var(--oepr-text-sub);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1em;
    transition: all .18s;
    box-shadow: var(--oepr-card-shadow);
    flex-shrink: 0;
    line-height: 1;
}
.oepr-btn-nav:hover {
    background: var(--oepr-accent);
    color: #fff;
    border-color: var(--oepr-accent);
    box-shadow: 0 2px 12px rgba(26,115,232,.35);
    transform: scale(1.08);
}
.oepr-btn-nav:disabled { opacity: .3; cursor: default; transform: none; box-shadow: none; }

/* Dots */
.oepr-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}
.oepr-dot {
    height: 6px;
    width: 6px;
    border-radius: 3px;
    background: var(--oepr-card-border);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: width .25s, background .25s, border-radius .25s;
}
.oepr-dot.active {
    width: 20px;
    background: var(--oepr-accent);
    border-radius: 3px;
}

/* ─────────────────────────────────────────────
   Error / Empty
───────────────────────────────────────────── */
.oepr-error {
    background: #fef7e0;
    border-left: 4px solid #f9ab00;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9em;
    color: #3c4043;
}
.oepr-error a { color: #1a73e8; }
.oepr-empty {
    text-align: center;
    color: var(--oepr-text-muted);
    padding: 48px 20px;
    font-size: .95em;
}

/* ─────────────────────────────────────────────
   Responsive breakpoints
───────────────────────────────────────────── */
@media (max-width: 1100px) {
    .oepr-cols-5 .oepr-grid,
    .oepr-cols-6 .oepr-grid { grid-template-columns: repeat(4,1fr); }
}
@media (max-width: 900px) {
    .oepr-cols-4 .oepr-grid,
    .oepr-cols-5 .oepr-grid,
    .oepr-cols-6 .oepr-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 700px) {
    .oepr-cols-3 .oepr-grid,
    .oepr-cols-4 .oepr-grid,
    .oepr-cols-5 .oepr-grid,
    .oepr-cols-6 .oepr-grid { grid-template-columns: repeat(2,1fr); }
    .oepr-badge-header { flex-direction: column; }
    .oepr-excellent-badge { min-width: 0; width: 100%; }
}
@media (max-width: 500px) {
    .oepr-cols-2 .oepr-grid,
    .oepr-cols-3 .oepr-grid,
    .oepr-cols-4 .oepr-grid,
    .oepr-cols-5 .oepr-grid,
    .oepr-cols-6 .oepr-grid { grid-template-columns: 1fr; }
    .oepr-wrap[data-theme="dark"] { padding: 20px 16px 24px; }
    .oepr-summary { gap: 8px; }
    .oepr-summary-divider { display: none; }
}

/* ─────────────────────────────────────────────
   Google Maps Embed widget  [oep_embed]
───────────────────────────────────────────── */
.oepr-embed-wrap {
    font-family: var(--oepr-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    box-sizing: border-box;
}
.oepr-embed-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e8eaed;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}
.oepr-embed-title {
    font-weight: 600;
    font-size: .95em;
    color: #202124;
    flex: 1;
}
.oepr-embed-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .88em;
    color: #5f6368;
}
.oepr-embed-score { font-weight: 700; color: #202124; font-size: 1em; }
.oepr-embed-count { font-size: .8em; color: #9aa0a6; }
.oepr-embed-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .8em;
    font-weight: 600;
    transition: background .18s;
    white-space: nowrap;
    flex-shrink: 0;
}
.oepr-embed-link:hover { background: #1558b0; color: #fff; }
.oepr-embed-iframe-wrap {
    position: relative;
    width: 100%;
    line-height: 0;
}
.oepr-embed-iframe-wrap iframe {
    width: 100%;
    display: block;
    border: 1px solid #e8eaed;
    border-radius: 0 0 12px 12px;
}
.oepr-embed-wrap.no-header .oepr-embed-iframe-wrap iframe {
    border-radius: 12px;
}
.oepr-embed-footer {
    margin-top: 10px;
    text-align: center;
    font-size: .78em;
    color: #9aa0a6;
}
.oepr-embed-footer a { color: #1a73e8; text-decoration: none; }
.oepr-embed-footer a:hover { text-decoration: underline; }

/* No API key notice */
.oepr-embed-notice {
    background: #fef7e0;
    border: 1px solid #f9ab00;
    border-radius: 10px;
    padding: 16px 20px;
    font-size: .9em;
    color: #3c4043;
    line-height: 1.6;
}
.oepr-embed-notice strong { color: #b06000; }
.oepr-embed-notice code { background: #fff3cd; padding: 1px 6px; border-radius: 4px; font-size: .92em; }

