/* ============================================================
   TulBrand CMS – Google Reviews – Frontend Styles
   Diseño tipo tarjeta real de Google Reviews
   ============================================================ */

/* ── Variables del bloque ───────────────────────────────────── */
.tbl-gr-wrapper {
    --tbl-accent: #F5A623;
    --tbl-card-bg: #ffffff;
    --tbl-text: #222222;
    --tbl-radius: 16px;
    --tbl-shadow: 0 2px 16px rgba(0, 0, 0, 0.10);

    width: 100%;
    box-sizing: border-box;
    font-family: 'Google Sans', Roboto, -apple-system, sans-serif;
}

/* ============================================================
   SUMMARY BAR
   ============================================================ */
.tbl-gr-summary {
    margin-bottom: 28px;
}

.tbl-gr-summary-inner {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    padding: 16px 24px;
    background: #fff;
    border-radius: var(--tbl-radius);
    box-shadow: var(--tbl-shadow);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    border: 1px solid #f0f0f0;
}

.tbl-gr-summary-inner:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14);
    transform: translateY(-2px);
}

.tbl-gr-google-logo svg {
    display: block;
    height: 24px;
    width: auto;
}

.tbl-gr-summary-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbl-gr-big-rating {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--tbl-text);
    line-height: 1;
}

.tbl-gr-sum-stars {
    display: flex;
    gap: 2px;
}

.tbl-gr-sum-count {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.tbl-gr-summary-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--tbl-text);
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   CARRUSEL
   ============================================================ */
.tbl-gr-carousel {
    position: relative;
    overflow: hidden;
    padding-bottom: 56px;
    /* espacio para dots */
}

.tbl-gr-track {
    display: flex;
    gap: 16px;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    align-items: stretch;
}

/* ============================================================
   TARJETA DE RESEÑA
   Diseño idéntico al de la imagen de referencia
   ============================================================ */
.tbl-gr-card {
    flex: 0 0 auto;
    width: 340px;
    background: var(--tbl-card-bg);
    color: var(--tbl-text);
    border-radius: var(--tbl-radius);
    box-shadow: var(--tbl-shadow);
    border: 1px solid #ebebeb;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tbl-gr-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
}

/* ── Cabecera de la tarjeta ─────────────────────────────────── */
.tbl-gr-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tbl-gr-avatar-wrap {
    flex-shrink: 0;
}

.tbl-gr-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #f0f0f0;
}

.tbl-gr-avatar-fallback {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4, #34A853);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
}

.tbl-gr-author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tbl-gr-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tbl-text);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.tbl-gr-author-name:hover {
    text-decoration: underline;
    color: #4285F4;
}

.tbl-gr-author-badges {
    font-size: 11px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tbl-gr-card-menu {
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbl-gr-card-menu:hover {
    background: #f5f5f5;
}

/* ── Estrellas + fecha ──────────────────────────────────────── */
.tbl-gr-card-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbl-gr-card-stars svg {
    display: block;
}

.tbl-gr-date {
    font-size: 12px;
    color: #888;
}

/* ── Texto de la reseña ─────────────────────────────────────── */
.tbl-gr-card-text {
    flex: 1;
}

.tbl-gr-review-text {
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--tbl-text);
    margin: 0;
}

.tbl-gr-read-more {
    background: none;
    border: none;
    padding: 0;
    color: #4285F4;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
}

/* ── Fotos de la reseña ─────────────────────────────────────── */
.tbl-gr-card-photos {
    display: flex;
    gap: 6px;
    overflow: hidden;
    border-radius: 8px;
}

.tbl-gr-photo {
    width: calc(33.33% - 4px);
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* ── Footer de la tarjeta ───────────────────────────────────── */
.tbl-gr-card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.tbl-gr-google-g {
    display: block;
    flex-shrink: 0;
}

.tbl-gr-verified {
    font-size: 11px;
    color: #888;
}

/* ============================================================
   FLECHAS
   ============================================================ */
.tbl-gr-arrow {
    position: absolute;
    top: calc(50% - 28px);
    transform: translateY(-50%);
    z-index: 10;
    background: #ffffff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    outline: none;
}

.tbl-gr-arrow:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transform: translateY(-50%) scale(1.08);
}

.tbl-gr-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.tbl-gr-prev {
    left: 0;
}

.tbl-gr-next {
    right: 0;
}

.tbl-gr-arrow svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}

/* ============================================================
   DOTS
   ============================================================ */
.tbl-gr-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.tbl-gr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, width 0.3s, border-radius 0.3s;
    outline: none;
}

.tbl-gr-dot.active {
    background: var(--tbl-accent);
    width: 22px;
    border-radius: 4px;
}

/* ============================================================
   DRAG
   ============================================================ */
.tbl-gr-carousel.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.tbl-gr-carousel.is-dragging .tbl-gr-track {
    transition: none !important;
}

/* ============================================================
   MODAL "Leer más"
   ============================================================ */
.tbl-gr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99998;
    animation: tblGrFadeIn 0.2s ease;
}

.tbl-gr-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    max-width: 520px;
    width: 90%;
    z-index: 99999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: tblGrSlideUp 0.25s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.tbl-gr-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tbl-gr-modal-close:hover {
    background: #e0e0e0;
}

@keyframes tblGrFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes tblGrSlideUp {
    from {
        transform: translate(-50%, -44%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .tbl-gr-card {
        width: 300px;
    }
}

@media (max-width: 600px) {
    .tbl-gr-card {
        width: calc(100vw - 48px);
    }

    .tbl-gr-summary-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tbl-gr-summary-name {
        max-width: 100%;
        white-space: normal;
    }

    .tbl-gr-arrow {
        width: 36px;
        height: 36px;
    }
}