/**
 * Google Reviews Badge Pro - Frontend Styles
 * Version: 1.0.0
 */

/* Main badge container */
.google-reviews-badge {
    position: fixed;
    bottom: 30px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 2px 10px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 999999;
    min-width: 145px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Position variants */
.google-reviews-badge.position-right {
    right: 30px;
}

.google-reviews-badge.position-left {
    left: 30px;
    right: auto;
}

/* Hover effect */
.google-reviews-badge:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(66, 133, 244, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Style: Gradient */
.google-reviews-badge.style-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.google-reviews-badge.style-gradient .badge-text,
.google-reviews-badge.style-gradient .rating-number {
    color: white !important;
    -webkit-text-fill-color: white !important;
}

.google-reviews-badge.style-gradient .google-g {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Style: Dark */
.google-reviews-badge.style-dark {
    background: linear-gradient(145deg, #2d2d2d, #1a1a1a);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.google-reviews-badge.style-dark .badge-text {
    color: #a0a0a0;
}

.google-reviews-badge.style-dark .rating-number {
    color: white;
    -webkit-text-fill-color: white !important;
}

.google-reviews-badge.style-dark .google-g {
    background: rgba(255, 255, 255, 0.1);
}

/* Style: Minimal */
.google-reviews-badge.style-minimal {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.google-reviews-badge.style-minimal:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Badge header */
.badge-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Google logo container */
.google-g {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.3s ease;
}

.google-reviews-badge:hover .google-g {
    transform: rotate(-5deg) scale(1.1);
}

.google-g svg {
    width: 24px;
    height: 24px;
}

/* Badge text */
.badge-text {
    font-size: 12px;
    color: #5f6368;
    font-weight: 600;
    letter-spacing: 0.3px;
    position: relative;
}

/* Rating section */
.rating-section {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Rating number */
.rating-number {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
    line-height: 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

/* Stars container */
.stars-container {
    display: flex;
    gap: 3px;
}

/* Star styling */
.star {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.star.filled {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2ZiYmMwNCI+PHBhdGggZD0iTTEyIDE3LjI3TDE4LjE4IDIxbC0xLjY0LTcuMDNMMjIgOS4yNGwtNy4xOS0uNjFMMTIgMiA5LjE5IDguNjMgMiA5LjI0bDUuNDYgNC43M0w1LjgyIDIxeiIvPjwvc3ZnPg==');
    animation: starPop 0.3s ease forwards;
}

.star.half {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIj48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImhhbGYiPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmJiYzA0Ii8+PHN0b3Agb2Zmc2V0PSI1MCUiIHN0b3AtY29sb3I9IiNlMGUwZTAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cGF0aCBmaWxsPSJ1cmwoI2hhbGYpIiBkPSJNMTIgMTcuMjdMMTguMTggMjFsLTEuNjQtNy4wM0wyMiA5LjI0bC03LjE5LS42MUwxMiAyIDkuMTkgOC42MyAyIDkuMjRsNS40NiA0LjczTDUuODIgMjF6Ii8+PC9zdmc+');
}

.star.empty {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iI2UwZTBlMCI+PHBhdGggZD0iTTEyIDE3LjI3TDE4LjE4IDIxbC0xLjY0LTcuMDNMMjIgOS4yNGwtNy4xOS0uNjFMMTIgMiA5LjE5IDguNjMgMiA5LjI0bDUuNDYgNC43M0w1LjgyIDIFeiIvPjwvc3ZnPg==');
    opacity: 0.3;
}

/* Hover effect on stars */
.google-reviews-badge:hover .star {
    transform: translateY(-2px);
}

.google-reviews-badge:hover .star:nth-child(1) { transition-delay: 0ms; }
.google-reviews-badge:hover .star:nth-child(2) { transition-delay: 50ms; }
.google-reviews-badge:hover .star:nth-child(3) { transition-delay: 100ms; }
.google-reviews-badge:hover .star:nth-child(4) { transition-delay: 150ms; }
.google-reviews-badge:hover .star:nth-child(5) { transition-delay: 200ms; }

/* Trust indicator badge - Smaller and more subtle */
.trust-indicator {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #1a73e8;
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Review count (optional) */
.review-count {
    font-size: 11px;
    color: #70757a;
    margin-top: 6px;
    opacity: 0.9;
}

/* Loading spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.google-reviews-badge.loading .loading-spinner {
    display: block;
}

.google-reviews-badge.loading .badge-header,
.google-reviews-badge.loading .rating-section {
    opacity: 0.3;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Animations */
@keyframes starPop {
    0% { 
        transform: scale(0.8) rotate(-45deg);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2) rotate(10deg);
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 2px 12px rgba(16, 185, 129, 0.5);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Entrance animation */
.google-reviews-badge {
    animation: slideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .google-reviews-badge {
        bottom: 12px;
        right: 12px;
        min-width: auto;
        padding: 8px 10px;
        border-radius: 50px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .google-reviews-badge.position-right {
        right: 12px;
    }
    
    .google-reviews-badge.position-left {
        left: 12px;
    }
    
    /* Verberg Google tekst */
    .badge-text {
        display: none;
    }
    
    .badge-header {
        margin-bottom: 0;
        gap: 6px;
    }
    
    .google-g {
        width: 18px;
        height: 18px;
        border-radius: 4px;
        box-shadow: none;
        background: transparent;
    }
    
    .google-g svg {
        width: 15px;
        height: 15px;
    }
    
    .rating-section {
        gap: 4px;
        align-items: center;
    }
    
    .rating-number {
        font-size: 14px;
        font-weight: 600;
    }
    
    /* Verberg alle sterren behalve de eerste */
    .star {
        width: 12px;
        height: 12px;
    }
    
    .star:not(:first-child) {
        display: none;
    }
    
    /* Verberg verified badge */
    .trust-indicator {
        display: none;
    }
    
    /* Horizontale layout */
    .google-reviews-badge {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    .google-reviews-badge .badge-header,
    .google-reviews-badge .rating-section {
        display: inline-flex;
        margin: 0;
    }
}

/* WordPress admin bar adjustment */
body.admin-bar .google-reviews-badge {
    bottom: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .google-reviews-badge {
        bottom: 46px;
    }
}

/* Print styles */
@media print {
    .google-reviews-badge {
        display: none !important;
    }
}





/* Main badge container - Horizontale layout */
.google-reviews-badge {
    position: fixed;
    bottom: 30px;
    background: #ffffff;
    border-radius: 50px;  /* Pill vorm */
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999999;
    min-width: auto;
    border: 1px solid #e8e8e8;
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Horizontale layout */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Badge header - inline */
.badge-header {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    gap: 8px;
    position: relative;
    z-index: 1;
}

/* Google logo container - kleiner */
.google-g {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.google-g svg {
    width: 18px;
    height: 18px;
}

/* Badge text */
.badge-text {
    font-size: 13px;
    color: #5f6368;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Rating section - inline */
.rating-section {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

/* Rating number - kleiner */
.rating-number {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
    line-height: 1;
}

/* Stars container */
.stars-container {
    display: inline-flex;
    gap: 2px;
}

/* Star styling - kleiner */
.star {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Trust indicator - rechtsboven */
.trust-indicator {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #1a73e8;
    color: white;
    font-size: 7px;
    padding: 2px 5px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Hover effect - subtieler */
.google-reviews-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}
.badge-text {
    display: none;
}