/* ========================================
   Orbit Google Reviews — Frontend Widget (Base)
   Prefix: og-
   ======================================== */
.og-widget {
    --og-accent: #2563eb;
    --og-star: #f59e0b;
    --og-radius: 12px;
    --og-widget-bg: transparent;
    --og-card-bg: #ffffff;
    --og-text-color: #1e293b;
    --og-border-color: #e2e8f0;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--og-text-color);
    max-width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
    padding: 26px;
    background: #f8fafc;
    border: none;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.og-widget *,
.og-widget *::before,
.og-widget *::after {
    box-sizing: border-box;
}

/* Alignment */
.og-widget.og-align-center { text-align: center; }
.og-widget.og-align-right { text-align: right; }

.og-widget-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0;
    text-align: center;
}

.og-summary-brand,
.og-summary-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 0;
}

.og-summary-brand {
    flex-direction: column;
    gap: 10px;
}

.og-summary-brand .og-google-logo,
.og-review-header .og-google-logo {
    position: static;
    flex: 0 0 auto;
}

.og-summary-brand .og-google-logo {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.og-summary-title {
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--og-text-color);
}

.og-summary-subtitle,
.og-summary-count {
    color: var(--og-text-color);
    opacity: 0.62;
    font-size: 0.86rem;
}

.og-summary-rating {
    flex-wrap: wrap;
    justify-content: center;
}

.og-summary-rating strong {
    font-size: 1.6rem;
    line-height: 1;
    color: var(--og-text-color);
    white-space: nowrap;
}

.og-summary-stars {
    display: inline-flex;
    gap: 2px;
    white-space: nowrap;
}

/* ========================================
   Layout containers
   ======================================== */
.og-reviews-container {
    display: grid;
    gap: 20px;
}

/* ========================================
   Review Card (shared)
   ======================================== */
.og-review-card {
    background: var(--og-card-bg);
    border: none;
    border-radius: 8px;
    padding: 28px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 0;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-word;
    overflow: hidden;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    position: relative;
}

.og-review-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--og-accent), var(--og-star));
    opacity: 0.9;
}

/* Hover animation — only when enabled */
.og-hover-enabled .og-review-card,
.og-review-card.og-hover-enabled {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.og-hover-enabled .og-review-card:hover,
.og-review-card.og-hover-enabled:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.og-review-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
    position: relative;
    padding-right: 34px;
}

.og-avatar,
.og-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: none;
}

.og-avatar-placeholder {
    background: linear-gradient(135deg, var(--og-accent), #0f766e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.28rem;
}

.og-reviewer-info { flex: 1; }
.og-reviewer-info,
.og-summary-brand > div {
    min-width: 0;
    text-align: center;
}

.og-reviewer-name {
    font-weight: 800;
    font-size: 1.06rem;
    line-height: 1.25;
    margin-bottom: 6px;
    color: var(--og-text-color);
}

.og-review-body {
    line-height: 1.7;
}

.og-review-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.og-review-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.96rem;
    line-height: 1;
}

.og-star { color: #cbd5e1; }
.og-star.filled { color: var(--og-star); }

.og-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.og-review-date {
    color: var(--og-text-color);
    opacity: 0.6;
    font-size: 0.86rem;
    margin-top: 8px;
}

.og-google-logo {
    position: absolute;
    top: 2px;
    right: 0;
    line-height: 0;
}

.og-review-body {
    font-size: 0.95rem;
    line-height: 1.68;
    color: var(--og-text-color);
    margin-top: 0;
    flex-grow: 1;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

/* Keep slider cards compact (no super-long text blocks) */
.og-slider .og-review-body {
    max-height: 10.2em;
}

.og-review-body p,
.og-review-body .og-text-short,
.og-review-body .og-text-full {
    margin: 0;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100%;
}

.og-review-body p {
    margin: 0;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Read more — initial hide is done via inline style in PHP */

.og-read-more-btn {
    display: inline-block;
    border: none !important;
    background: none !important;
    padding: 0 !important;
    margin-top: 12px !important;
    font-size: 0.92rem !important;
    color: var(--og-accent) !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transition: opacity 0.2s !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.og-read-more-btn:hover {
    text-decoration: underline !important;
    opacity: 0.8 !important;
}

.og-read-more-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.og-widget-footer {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.og-google-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: none;
    border-radius: 8px;
    background: var(--og-button-color, var(--og-accent));
    color: #fff;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.og-google-more:hover,
.og-google-more:focus {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(0.96);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

/* Reply */
.og-review-reply {
    margin-top: 16px;
    padding: 12px;
    border-top: 1px solid var(--og-border-color);
    font-size: 0.9rem;
    color: var(--og-text-color);
    opacity: 0.75;
    background: var(--og-widget-bg);
    border-radius: 8px;
}

.og-reply-label {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: var(--og-text-color);
}


/* Shadow card */
.og-shadow-card {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* ========================================
   Responsive (shared)
   ======================================== */
@media (max-width: 640px) {
    .og-widget { padding: 16px; }
    .og-widget-summary {
        align-items: center;
    }
    .og-summary-rating {
        justify-content: center;
    }
    .og-review-card {
        padding: 22px 18px;
    }
    .og-review-header {
        gap: 12px;
        padding-right: 28px;
    }
    .og-avatar,
    .og-avatar-placeholder {
        width: 46px;
        height: 46px;
    }
    .og-google-more {
        width: 100%;
    }
}
