/**
 * Google Reviews — stylesheet ported from the Joomla `mod_google_reviews`
 * module (tmpl/grid.php + slider). The original module used the CSS variables
 * --clr-bg-alt and --clr-light, which this theme does not define; the alias
 * block below maps them onto the theme's own light/dark variables so the
 * cards follow the active [data-theme]. Everything below the alias block is a
 * faithful copy of the module's assets/css/style.css.
 */

/* ---- Theme variable aliases (light/dark aware) ---- */
:root {
    --clr-bg-alt: var(--clr-bg-surface, #151a23);
    --clr-light:  var(--clr-text, #ffffff);
}

/* ==========================================================================
   1. GLOBAL CONTAINER
   ========================================================================== */
.google-reviews-wrapper {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 30px 0;
    width: 100%;
}

/* ==========================================================================
   2. MODULE HEADER (SUMMARY)
   ========================================================================== */
.gr-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    background: var(--clr-bg-alt, #151a23);
    padding: 20px 30px;
    border-radius: 12px;
    border: 1px solid var(--clr-border, #1f2937);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gr-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.gr-rating-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--clr-light, #fff);
    line-height: 1;
}

.gr-stars-summary i, .gr-stars i {
    color: #fbbc04;
    font-size: 1.1rem;
    margin-right: 3px;
}

.gr-total {
    color: var(--clr-text-muted, #9ca3af);
    font-size: 1rem;
    margin-left: 10px;
}

/* ==========================================================================
   3. GRID LAYOUT
   ========================================================================== */
.gr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.gr-card {
    background: var(--clr-bg-alt, #151a23);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--clr-border, #1f2937);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gr-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-color: var(--clr-primary, #4285F4);
}

.gr-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    position: relative;
}

.gr-author img {
    border-radius: 50%;
    object-fit: cover;
}

.gr-author-info strong {
    display: block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.05rem;
    color: var(--clr-light, #fff);
    margin-bottom: 2px;
}

.gr-google-badge {
    position: absolute;
    right: 0;
    top: 5px;
    color: #9ca3af;
    font-size: 1.2rem;
    opacity: 0.5;
}

.gr-date {
    font-size: 0.85rem;
    color: var(--clr-text-muted, #9ca3af);
}

.gr-stars {
    margin-bottom: 12px;
}

.gr-stars i {
    font-size: 0.95rem;
}

.gr-text {
    font-family: 'Arimo', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--clr-text, #d1d5db);
    font-style: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.gr-text.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
}

/* ==========================================================================
   5. LIGHTBOX MODAL
   ========================================================================== */
.gr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gr-modal-overlay.gr-modal-active {
    opacity: 1;
    visibility: visible;
}

.gr-modal-content {
    background: var(--clr-bg-surface, #151a23);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--clr-border, #1f2937);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.gr-modal-overlay.gr-modal-active .gr-modal-content {
    transform: translateY(0);
}

.gr-modal-content .gr-card {
    border: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    cursor: default;
    min-width: unset;
}

.gr-modal-content .gr-card:hover {
    transform: none;
}

.gr-modal-content .gr-text {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    cursor: default;
    display: block;
    white-space: normal;
}

/* ==========================================================================
   6. TRANSLATION UI
   ========================================================================== */
.gr-translation-info {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed var(--clr-border, #1f2937);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gr-translation-attribution {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.gr-translation-text {
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.gr-translation-logo {
    height: 14px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.gr-translation-info--color .gr-translation-text {
    color: var(--clr-text-muted, #5f6368);
}
.gr-translation-info--color .gr-translation-logo {
    filter: none;
    opacity: 1;
}

.gr-translation-info--gray .gr-translation-text {
    color: #202124;
}
.gr-translation-info--gray .gr-translation-logo {
    filter: grayscale(1) brightness(0) contrast(1);
}

.gr-translation-info--white {
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.25);
}
.gr-translation-info--white .gr-translation-text {
    color: #ffffff;
}
.gr-translation-info--white .gr-translation-logo {
    filter: brightness(0) invert(1);
}

.gr-toggle-langs {
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.3);
    color: var(--clr-primary, #4285F4);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-left: auto;
}

.gr-toggle-langs:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: var(--clr-primary, #4285F4);
}

.gr-modal-content .gr-translation-info {
    border-top: 1px solid var(--clr-border, #1f2937);
    padding-top: 15px;
    margin-top: 20px;
}

.gr-empty {
    color: var(--clr-text-muted, #9ca3af);
    font-family: 'Arimo', sans-serif;
}
