/**
 *  ____                _        ____
 * |  _ \ _ __ ___  ___| |_ __ _|  _ \  _____   __
 * | |_) | '__/ _ \/ __| __/ _` | | | |/ _ \ \ / /
 * |  __/| | |  __/\__ \ || (_| | |_| |  __/\ V /
 * |_|   |_|  \___||___/\__\__,_|____/ \___| \_/
 *
 * PrestaDev.pl - PD Google Business Reviews Pro
 *
 * NOTICE OF LICENSE
 *
 * This source file is licensed under the PrestaDev Proprietary License
 * shipped with this package in the file LICENSE.md.
 * If you did not receive a copy of the license, please contact: info@prestadev.pl
 *
 * DISCLAIMER
 *
 * Do not edit, modify or copy this file.
 * If you wish to customize it, contact us at info@prestadev.pl.
 *
 * @author    Patryk Marek <info@prestadev.pl>
 * @copyright 2012-2026 Patryk Marek - PrestaDev.pl
 *
 * @see      https://prestadev.pl
 *
 * @version   1.0.0
 *
 * @license   PrestaDev.pl Patryk Marek Proprietary License
 *
 * @date      2026-04-12
 */

/* ============================================================
   CUSTOM PROPERTIES
   ============================================================ */
.pdgbr-widget {
    --pdgbr-accent: #4285f4;
    --pdgbr-accent-light: #e8f0fe;
    --pdgbr-accent-dark: #1a56db;
    --pdgbr-star: #f4b400;
    margin: 30px 0 0;
}

/* ============================================================
   SHARED WIDGET BASE
   ============================================================ */

/* --- Head --- */
.pdgbr-widget__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.pdgbr-widget__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

/* --- Meta --- */
.pdgbr-widget__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-top: 4px;
}

.pdgbr-widget__rating {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.pdgbr-widget__stars {
    color: var(--pdgbr-star);
    letter-spacing: 2px;
    font-size: 16px;
}

.pdgbr-widget__count {
    color: #777;
    font-size: 13px;
}

.pdgbr-widget__provider {
    color: #999;
    font-size: 12px;
}

/* --- Link button --- */
.pdgbr-widget__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    background: var(--pdgbr-accent);
    color: #fff;
    transition: background .2s, box-shadow .2s;
}

.pdgbr-widget__link:hover {
    background: var(--pdgbr-accent-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   LAYOUT: GRID
   ============================================================ */
.pdgbr-layout-grid .pdgbr-widget__reviews {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ============================================================
   LAYOUT: SLIDER
   ============================================================ */
.pdgbr-layout-slider .pdgbr-widget__reviews-wrap {
    position: relative;
}

.pdgbr-layout-slider .pdgbr-widget__reviews {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.pdgbr-layout-slider .pdgbr-widget__reviews::-webkit-scrollbar {
    display: none;
}

.pdgbr-layout-slider .pdgbr-review {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

/* --- Slider buttons --- */
.pdgbr-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    z-index: 2;
    transition: background .15s, box-shadow .15s;
}

.pdgbr-slider-btn:hover {
    background: var(--pdgbr-accent-light);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.pdgbr-slider-btn--prev {
    left: -18px;
}

.pdgbr-slider-btn--next {
    right: -18px;
}

/* --- Slider dots --- */
.pdgbr-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 14px;
}

.pdgbr-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .2s, transform .2s;
}

.pdgbr-slider-dot.active {
    background: var(--pdgbr-accent);
    transform: scale(1.3);
}

/* --- Shared avatar fallback (initial letter) --- */
span.pdgbr-review__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    background: #90a4ae;
    text-transform: uppercase;
    line-height: 1;
}

/* ============================================================
   STYLE 1: CLASSIC — Clean cards, subtle shadow, hover lift
   ============================================================ */
.pdgbr-style-classic {
    padding: 24px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
    border: 1px solid #e5e7eb;
}

.pdgbr-style-classic .pdgbr-review {
    padding: 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow .2s, transform .2s;
}

.pdgbr-style-classic .pdgbr-review:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pdgbr-style-classic .pdgbr-review__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pdgbr-style-classic .pdgbr-review__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    flex-shrink: 0;
}

.pdgbr-style-classic .pdgbr-review__name {
    font-weight: 700;
    font-size: 14px;
}

.pdgbr-style-classic .pdgbr-review__date {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 1px;
}

.pdgbr-style-classic .pdgbr-review__stars {
    color: var(--pdgbr-star);
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.pdgbr-style-classic .pdgbr-review__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #444;
}

.pdgbr-style-classic .pdgbr-review__source {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: var(--pdgbr-accent);
    text-decoration: none;
}

.pdgbr-style-classic .pdgbr-review__source:hover {
    text-decoration: underline;
}

/* ============================================================
   STYLE 2: MINIMAL — No shadow, thin separators, outlined button
   ============================================================ */
.pdgbr-style-minimal {
    padding: 20px 0;
}

.pdgbr-style-minimal .pdgbr-widget__head {
    padding: 0 0 14px;
    border-bottom: 2px solid #eee;
}

.pdgbr-style-minimal .pdgbr-widget__link {
    background: transparent;
    color: var(--pdgbr-accent);
    border: 1.5px solid var(--pdgbr-accent);
}

.pdgbr-style-minimal .pdgbr-widget__link:hover {
    background: var(--pdgbr-accent-light);
}

.pdgbr-style-minimal .pdgbr-review {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    background: transparent;
}

.pdgbr-style-minimal .pdgbr-review:last-child {
    border-bottom: none;
}

.pdgbr-style-minimal .pdgbr-review__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pdgbr-style-minimal .pdgbr-review__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
}

.pdgbr-style-minimal .pdgbr-review__name {
    font-weight: 600;
    font-size: 14px;
}

.pdgbr-style-minimal .pdgbr-review__date {
    font-size: 11px;
    color: #aaa;
    margin-left: 8px;
}

.pdgbr-style-minimal .pdgbr-review__stars {
    color: var(--pdgbr-star);
    font-size: 13px;
    margin-bottom: 6px;
}

.pdgbr-style-minimal .pdgbr-review__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.pdgbr-style-minimal .pdgbr-review__source {
    display: none;
}

/* In grid mode, minimal gets subtle card borders for separation */
.pdgbr-layout-grid.pdgbr-style-minimal .pdgbr-review {
    padding: 18px;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

/* ============================================================
   STYLE 3: BUBBLE — Speech bubble with CSS triangle
   ============================================================ */
.pdgbr-style-bubble {
    padding: 24px;
    border-radius: 16px;
    background: var(--pdgbr-accent-light);
}

.pdgbr-style-bubble .pdgbr-widget__head {
    margin-bottom: 22px;
}

.pdgbr-style-bubble .pdgbr-review {
    display: flex;
    flex-direction: column;
}

.pdgbr-style-bubble .pdgbr-review__body {
    position: relative;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    flex: 1;
}

.pdgbr-style-bubble .pdgbr-review__body::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 24px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.04);
}

.pdgbr-style-bubble .pdgbr-review__stars {
    color: var(--pdgbr-star);
    font-size: 14px;
    margin-bottom: 8px;
}

.pdgbr-style-bubble .pdgbr-review__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    font-style: italic;
}

.pdgbr-style-bubble .pdgbr-review__text::before {
    content: '\201C';
    font-size: 24px;
    color: var(--pdgbr-accent);
    font-weight: 700;
    line-height: 0;
    position: relative;
    top: 8px;
    margin-right: 2px;
}

.pdgbr-style-bubble .pdgbr-review__author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 4px;
}

.pdgbr-style-bubble .pdgbr-review__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.pdgbr-style-bubble .pdgbr-review__name {
    font-weight: 700;
    font-size: 13px;
}

.pdgbr-style-bubble .pdgbr-review__date {
    display: block;
    font-size: 11px;
    color: #999;
}

.pdgbr-style-bubble .pdgbr-review__source {
    display: none;
}

/* ============================================================
   STYLE 4: COMPACT — Horizontal layout, badge rating, 2-line clamp
   ============================================================ */
.pdgbr-style-compact {
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.pdgbr-style-compact .pdgbr-widget__head {
    margin-bottom: 14px;
}

.pdgbr-style-compact .pdgbr-review {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #fafbfc;
    border: 1px solid #eee;
    transition: background .15s;
}

.pdgbr-style-compact .pdgbr-review:hover {
    background: #f4f6f9;
}

.pdgbr-style-compact .pdgbr-review__avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #e8e8e8;
    flex-shrink: 0;
}

.pdgbr-style-compact .pdgbr-review__content {
    flex: 1;
    min-width: 0;
}

.pdgbr-style-compact .pdgbr-review__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.pdgbr-style-compact .pdgbr-review__name {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdgbr-style-compact .pdgbr-review__badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    background: var(--pdgbr-accent-light);
    color: var(--pdgbr-accent);
    flex-shrink: 0;
}

.pdgbr-style-compact .pdgbr-review__badge-star {
    color: var(--pdgbr-star);
    font-size: 11px;
}

.pdgbr-style-compact .pdgbr-review__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #555;
}

.pdgbr-style-compact .pdgbr-review__date {
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
    display: block;
}

.pdgbr-style-compact .pdgbr-review__stars,
.pdgbr-style-compact .pdgbr-review__source,
.pdgbr-style-compact .pdgbr-review__author {
    display: none;
}

/* In grid: narrower minmax for compact cards */
.pdgbr-layout-grid.pdgbr-style-compact .pdgbr-widget__reviews {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ============================================================
   STYLE 5: ELEGANT — Dark gradient, frosted glass, gold stars
   ============================================================ */
.pdgbr-style-elegant {
    padding: 28px;
    border-radius: 18px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
}

.pdgbr-style-elegant .pdgbr-widget__title {
    color: #fff;
}

.pdgbr-style-elegant .pdgbr-widget__rating {
    color: #f4b400;
}

.pdgbr-style-elegant .pdgbr-widget__count {
    color: #8899aa;
}

.pdgbr-style-elegant .pdgbr-widget__provider {
    color: #667788;
}

.pdgbr-style-elegant .pdgbr-widget__link {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.pdgbr-style-elegant .pdgbr-widget__link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pdgbr-style-elegant .pdgbr-review {
    padding: 20px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
    transition: background .2s, border-color .2s;
}

.pdgbr-style-elegant .pdgbr-review:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.pdgbr-style-elegant .pdgbr-review__author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pdgbr-style-elegant .pdgbr-review__avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(244, 180, 0, 0.3);
    flex-shrink: 0;
}

.pdgbr-style-elegant .pdgbr-review__name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
}

.pdgbr-style-elegant .pdgbr-review__date {
    display: block;
    font-size: 11px;
    color: #6b7d93;
    margin-top: 2px;
}

.pdgbr-style-elegant .pdgbr-review__stars {
    color: var(--pdgbr-star);
    font-size: 15px;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.pdgbr-style-elegant .pdgbr-review__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #c0ccd8;
}

.pdgbr-style-elegant .pdgbr-review__source {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    color: #5a8ac0;
    text-decoration: none;
}

.pdgbr-style-elegant .pdgbr-review__source:hover {
    color: #7db4e8;
    text-decoration: underline;
}

/* Elegant slider overrides */
.pdgbr-style-elegant .pdgbr-slider-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ccc;
}

.pdgbr-style-elegant .pdgbr-slider-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pdgbr-style-elegant .pdgbr-slider-dot {
    background: rgba(255, 255, 255, 0.2);
}

.pdgbr-style-elegant .pdgbr-slider-dot.active {
    background: var(--pdgbr-star);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .pdgbr-layout-slider .pdgbr-review {
        flex: 0 0 85vw;
    }

    .pdgbr-slider-btn {
        display: none;
    }

    .pdgbr-widget__title {
        font-size: 18px;
    }

    .pdgbr-widget__rating {
        font-size: 24px;
    }
}

/* ---- Read-more collapsible review text (CSS-only, all layouts & styles) ---- */
.pdgbr-review__text-wrap {
    position: relative;
}

/* The toggle checkbox is a hidden state-holder, driven via its <label>. */
.pdgbr-review__more-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    pointer-events: none;
}

/* Never let compact's box behaviour re-clamp the collapsible text. */
.pdgbr-widget .pdgbr-review__text-wrap .pdgbr-review__text {
    display: block;
    -webkit-line-clamp: none;
    overflow: visible;
}

.pdgbr-review__text-full {
    display: none;
}

.pdgbr-review__more {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--pdgbr-accent);
    cursor: pointer;
    user-select: none;
}

.pdgbr-review__more:hover {
    text-decoration: underline;
}

.pdgbr-review__more-close {
    display: none;
}

/* Expanded state: swap short<->full text and the label wording. */
.pdgbr-review__more-toggle:checked ~ .pdgbr-review__text .pdgbr-review__text-short {
    display: none;
}

.pdgbr-review__more-toggle:checked ~ .pdgbr-review__text .pdgbr-review__text-full {
    display: inline;
}

.pdgbr-review__more-toggle:checked ~ .pdgbr-review__more .pdgbr-review__more-open {
    display: none;
}

.pdgbr-review__more-toggle:checked ~ .pdgbr-review__more .pdgbr-review__more-close {
    display: inline;
}

/* Keyboard focus visibility for the toggle label. */
.pdgbr-review__more-toggle:focus ~ .pdgbr-review__more {
    outline: 2px solid var(--pdgbr-accent);
    outline-offset: 2px;
}

/* ---- Homepage placement only (displayHome hook): narrower centered container, 3 reviews per slide ---- */
.pdgbr-hook-displayhome {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* From tablet up: exactly 3 cards fit the visible track (2 gaps of 16px). Mobile keeps its own 85vw rule. */
@media (min-width: 768px) {
    .pdgbr-hook-displayhome.pdgbr-layout-slider .pdgbr-review {
        flex-basis: calc((100% - 32px) / 3);
    }
}
