/**
 * Google Reviews Widget Styles
 * Beautiful, modern, and responsive
 */

/* Reset & Base */
.gre-widget {
    display: inline-flex;
    text-decoration: none !important;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gre-widget * {
    box-sizing: border-box;
}

/* Google Logo */
.gre-google-logo {
    flex-shrink: 0;
}

/* Stars Base */
.gre-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    direction: ltr;
}

.gre-star {
    font-size: 18px;
    line-height: 1;
}

.gre-star-full {
    color: #FBBC05;
}

.gre-star-half {
    color: #FBBC05;
    position: relative;
}

.gre-star-empty {
    color: #dadce0;
}

.gre-stars-large .gre-star {
    font-size: 24px;
}

/* ===============================
   STYLE: MODERN
   =============================== */
.gre-style-modern {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gre-style-modern:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #4285f4;
}

.gre-modern-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gre-logo-section {
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gre-logo-section .gre-google-logo {
    width: 32px;
    height: 32px;
    display: block;
}

.gre-content-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gre-business-name {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.gre-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gre-rating-number {
    font-size: 28px;
    font-weight: 700;
    color: #202124;
    line-height: 1;
}

.gre-reviews-count {
    font-size: 13px;
    color: #5f6368;
}

/* ===============================
   STYLE: MINIMAL
   =============================== */
.gre-style-minimal {
    padding: 8px 16px;
    background: transparent;
}

.gre-minimal-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gre-style-minimal .gre-google-logo {
    width: 20px;
    height: 20px;
}

.gre-style-minimal .gre-rating-number {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
}

.gre-style-minimal .gre-star {
    font-size: 14px;
}

.gre-style-minimal .gre-reviews-count {
    font-size: 13px;
    color: #5f6368;
}

.gre-style-minimal:hover {
    background: #f1f3f4;
    border-radius: 8px;
}

/* ===============================
   STYLE: CARD
   =============================== */
.gre-style-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-width: 220px;
}

.gre-card-wrapper {
    display: flex;
    flex-direction: column;
}

.gre-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 100%);
}

.gre-card-header .gre-google-logo {
    width: 28px;
    height: 28px;
}

.gre-card-header .gre-google-logo path {
    fill: white;
}

.gre-card-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.gre-card-body {
    padding: 24px 20px;
    text-align: center;
}

.gre-big-rating {
    font-size: 48px;
    font-weight: 800;
    color: #202124;
    line-height: 1;
    margin-bottom: 8px;
}

.gre-card-body .gre-stars {
    justify-content: center;
    margin-bottom: 12px;
}

.gre-card-body .gre-star {
    font-size: 24px;
}

.gre-card-body .gre-reviews-count {
    font-size: 14px;
    color: #5f6368;
}

.gre-card-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    text-align: center;
    border-top: 1px solid #e8eaed;
}

.gre-card-footer .gre-business-name {
    font-size: 13px;
    color: #5f6368;
}

.gre-style-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* ===============================
   STYLE: BADGE
   =============================== */
.gre-style-badge {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    border-radius: 50px;
    padding: 10px 20px;
    color: white;
}

.gre-badge-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gre-style-badge .gre-google-logo {
    width: 24px;
    height: 24px;
}

.gre-style-badge .gre-google-logo path {
    fill: white;
}

.gre-badge-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gre-style-badge .gre-star {
    font-size: 14px;
    color: #FFD700;
}

.gre-style-badge .gre-star-empty {
    color: rgba(255, 255, 255, 0.4);
}

.gre-badge-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.gre-style-badge .gre-rating-number {
    font-weight: 700;
    color: white;
    font-size: 15px;
}

.gre-separator {
    opacity: 0.5;
}

.gre-style-badge .gre-reviews-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
}

.gre-style-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.4);
}

/* ===============================
   STYLE: FLOATING
   =============================== */
.gre-style-floating {
    position: relative;
    background: white;
    border-radius: 60px;
    padding: 8px 20px 8px 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.gre-style-floating::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 60px;
    background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335);
    z-index: -1;
}

.gre-floating-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gre-floating-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.gre-floating-icon .gre-google-logo {
    width: 24px;
    height: 24px;
}

.gre-floating-icon .gre-google-logo path {
    fill: white;
}

.gre-floating-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gre-floating-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gre-style-floating .gre-rating-number {
    font-size: 18px;
    font-weight: 700;
    color: #202124;
}

.gre-style-floating .gre-reviews-count {
    font-size: 13px;
    color: #5f6368;
}

.gre-style-floating:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ===============================
   ANIMATIONS
   =============================== */
.gre-hover {
    cursor: pointer;
}

.gre-pulse {
    animation: gre-pulse-animation 2s infinite;
}

@keyframes gre-pulse-animation {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(66, 133, 244, 0);
    }
}

/* Star shine animation on hover */
.gre-hover:hover .gre-star-full {
    animation: gre-star-shine 0.6s ease-out;
}

@keyframes gre-star-shine {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.gre-hover:hover .gre-star-full:nth-child(1) { animation-delay: 0s; }
.gre-hover:hover .gre-star-full:nth-child(2) { animation-delay: 0.1s; }
.gre-hover:hover .gre-star-full:nth-child(3) { animation-delay: 0.2s; }
.gre-hover:hover .gre-star-full:nth-child(4) { animation-delay: 0.3s; }
.gre-hover:hover .gre-star-full:nth-child(5) { animation-delay: 0.4s; }

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 480px) {
    .gre-style-modern {
        padding: 12px 16px;
    }
    
    .gre-logo-section {
        padding: 8px;
    }
    
    .gre-logo-section .gre-google-logo {
        width: 24px;
        height: 24px;
    }
    
    .gre-rating-number {
        font-size: 22px;
    }
    
    .gre-star {
        font-size: 14px;
    }
    
    .gre-big-rating {
        font-size: 36px;
    }
    
    .gre-card-body .gre-star {
        font-size: 20px;
    }
}

/* ===============================
   RTL SUPPORT
   =============================== */
[dir="rtl"] .gre-widget,
.rtl .gre-widget {
    direction: rtl;
}

[dir="rtl"] .gre-stars,
.rtl .gre-stars {
    direction: ltr;
}

/* ===============================
   DARK MODE SUPPORT
   =============================== */
@media (prefers-color-scheme: dark) {
    .gre-style-modern {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        border-color: #2a2a4a;
    }
    
    .gre-style-modern .gre-rating-number,
    .gre-style-minimal .gre-rating-number {
        color: #e8eaed;
    }
    
    .gre-business-name,
    .gre-reviews-count {
        color: #9aa0a6;
    }
    
    .gre-logo-section {
        background: #2a2a4a;
    }
    
    .gre-style-card {
        background: #1a1a2e;
    }
    
    .gre-big-rating {
        color: #e8eaed;
    }
    
    .gre-card-footer {
        background: #16213e;
        border-color: #2a2a4a;
    }
    
    .gre-style-floating {
        background: #1a1a2e;
    }
    
    .gre-style-floating .gre-rating-number {
        color: #e8eaed;
    }
}
