/* Google Reviews Widget - Premium Edition
   Modern, attractive design matching Google's Material Design
*/

:root {
  --grw-bg: #ffffff;
  --grw-card-bg: #ffffff;
  --grw-text: #132316;
  --grw-text-secondary: #4E5652;
  --grw-border: #E0E7F0;
  --grw-shadow-sm: 0 1px 3px rgba(19, 35, 22, 0.08);
  --grw-shadow-md: 0 4px 12px rgba(19, 35, 22, 0.08);
  --grw-shadow-lg: 0 12px 24px rgba(19, 35, 22, 0.06);
  --grw-star-filled: #fabb05;
  --grw-star-empty: #e0e0e0;
  --grw-primary: #3EA7F3;
  --grw-primary-hover: #132316;
  --grw-accent: #3EA7F3;
  --grw-success: #34a853;
  --grw-border-radius: 20px;
  --grw-border-radius-sm: 12px;
  --grw-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark,
body.dark-mode,
[data-theme="dark"],
.dark-mode {
  --grw-bg: #1a1b1e;
  --grw-card-bg: #25262b;
  --grw-text: #f8f9fa;
  --grw-text-secondary: #909296;
  --grw-border: #373a40;
  --grw-shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --grw-shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --grw-shadow-lg: 0 12px 24px rgba(0,0,0,0.4);
  --grw-star-empty: #373a40;
}

.grw {
  margin: 32px 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.grw-shell {
  background: transparent;
  border-radius: var(--grw-border-radius);
  box-shadow: none;
  overflow: hidden;
  border: none;
  transition: var(--grw-transition);
}

.grw-shell:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Header */
.grw-header {
  background: transparent;
  padding: 24px 28px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

body.dark .grw-header,
body.dark-mode .grw-header,
[data-theme="dark"] .grw-header {
  background: linear-gradient(to right, rgba(46, 211, 145, 0.1), rgba(47, 164, 214, 0.1));
}

.grw-header-content {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.grw-google-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

body.dark .grw-google-logo {
  background: #f8f9fa;
}

/* Mobile Optimizations (High Priority Upgrade) */
@media (max-width: 768px) {
  .grw-shell {
    margin: 0 -15px; /* Neemt volledige breedte op mobiel */
    border-radius: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .grw-header {
    padding: 20px 15px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .grw-header-content {
    flex-direction: column;
    gap: 12px;
  }

  .grw-header-info .grw-title {
    font-size: 1.25rem;
  }

  .grw-rating-summary {
    justify-content: center;
  }

  .grw-header-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .grw-header-actions .grw-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

  /* Review Cards op mobiel */
  .grw-review-card {
    padding: 24px 20px;
    margin: 10px 5px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }

  .grw-review-content {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .grw-review-author {
    margin-bottom: 12px;
  }

  /* Swiper controls op mobiel */
  .grw-swiper-next,
  .grw-swiper-prev {
    display: none !important; /* Verwijder onhandige pijltjes op touch */
  }

  .grw-swiper-pagination {
    bottom: 5px !important;
  }
}

/* Glassmorphism & Modern elevation */
.grw-review-card {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.grw-review-card:hover {
  transform: translateY(-5px);
}

.grw-logo-mobile {
  display: none;
}

.grw-header-info {
  flex: 1;
  min-width: 0;
}

.grw-title {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--grw-text);
  letter-spacing: -0.01em;
}

.grw-rating-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grw-rating-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--grw-text);
  line-height: 1;
}

.grw-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.grw-stars svg {
  width: 20px;
  height: 20px;
}

.grw-review-count {
  font-size: 15px;
  color: var(--grw-text-secondary);
  font-weight: 500;
}

.grw-header-actions {
  display: flex;
  gap: 12px;
}

.grw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--grw-border-radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--grw-transition);
  white-space: nowrap;
}

.grw-btn-primary {
  background: var(--grw-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(46, 211, 145, 0.2);
}

.grw-btn-primary:hover {
  background: var(--grw-primary-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(244, 122, 32, 0.3);
  text-decoration: underline !important;
}

.grw-btn-secondary {
  background: transparent;
  color: var(--grw-text);
  border: 1px solid var(--grw-border);
}

.grw-btn-secondary:hover {
  background: var(--grw-primary-hover) !important;
  color: #fff !important;
  transform: translateY(-2px);
  text-decoration: underline !important;
}

/* Body */
.grw-body {
  padding: 32px 28px;
}

.grw-swiper.swiper {
  height: 100%;
}

.grw-swiper .swiper-wrapper {
  display: flex !important;
  align-items: stretch !important;
}

.grw-swiper .swiper-slide {
  height: auto !important;
  display: flex !important;
}

.grw-review-card {
  background: var(--grw-card-bg);
  border: 1px solid var(--grw-border);
  border-radius: var(--grw-border-radius-sm);
  padding: 24px;
  width: 100%; /* Ensure full width */
  display: flex;
  flex-direction: column;
  flex: 1; /* Stretch to fill slide height */
  gap: 16px;
  transition: var(--grw-transition);
  position: relative;
  margin: 10px 0; /* Ruimte om de kaarten */
}

/* Extra witruimte tussen slides */
.swiper-slide {
  padding: 15px !important;
}

.grw-review-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.grw-review-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grw-text);
  margin: 0;
  flex: 1; /* Pushes "Read more" to the bottom if needed */
}

.grw-review-card::before {
  content: 'Google';
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--grw-text-secondary);
  opacity: 0.3;
  letter-spacing: 0.1em;
}

.grw-review-card:hover {
  border-color: var(--grw-primary);
  transform: translateY(-4px);
  box-shadow: var(--grw-shadow-md);
}

.grw-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grw-review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grw-avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: var(--grw-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden !important;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.grw-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 50% !important;
}

.grw-avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--grw-primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 50% !important;
}

.grw-author-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--grw-text);
  margin: 0;
}

.grw-review-time {
  font-size: 13px;
  color: var(--grw-text-secondary);
}

.grw-review-content {
  font-size: 15px;
  line-height: 1.6;
  color: var(--grw-text);
  margin: 0;
}

.grw-read-more {
  color: var(--grw-primary);
  font-weight: 600;
  font-size: 14px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 4px;
}

.grw-read-more:hover {
  text-decoration: underline;
}

/* Skeleton Loader */
.grw-skeleton {
  animation: grw-pulse 1.5s infinite;
  background: linear-gradient(90deg, var(--grw-border) 25%, var(--grw-bg) 50%, var(--grw-border) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
}

@keyframes grw-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Controls */
.grw-controls {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.grw-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--grw-border);
  background: var(--grw-bg);
  color: var(--grw-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--grw-transition);
}

.grw-nav-btn:hover:not(:disabled) {
  background: var(--grw-primary);
  color: #ffffff;
  border-color: var(--grw-primary);
  box-shadow: 0 4px 12px rgba(46, 211, 145, 0.3);
}

.swiper-pagination,
.grw-pagination {
  display: none !important;
}

.swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  background: var(--grw-border);
  opacity: 1;
  transition: var(--grw-transition);
}

.swiper-pagination-bullet-active {
  background: var(--grw-primary);
  width: 28px;
  border-radius: 5px;
}

@media (max-width: 768px) {
  .grw-header {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }
  .grw-header-content {
    flex-direction: column;
  }
  .grw-header-actions {
    width: 100%;
    flex-direction: column;
  }
  .grw-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Status */
.grw-status {
  padding: 24px;
  text-align: center;
}

.grw-status-content {
  color: var(--grw-text-secondary);
  font-size: 14px;
}

/* Hide static testimonials */
.grw-hide {
  display: none ;
}

/* Responsive */
@media (max-width: 768px) {
  .grw-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .grw-header-content {
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Logo styling voor mobiel */
  .grw-google-logo {
    width: 100%;
    justify-content: center;
    margin-bottom: 0;
  }

  .grw-google-logo img {
    max-width: 100px ;
    height: auto ;
  }

  .grw-logo-desktop {
    display: none !important;
  }

  .grw-logo-mobile {
    display: block !important;
    max-width: 140px !important;
    width: 140px !important;
    height: auto !important;
    margin: 0 auto;
  }

  .grw-google-logo .grw-logo-mobile {
    max-width: 140px !important;
    width: 140px !important;
  }

  /* Mobiele rating sectie */
  .grw-mobile-rating {
    display: flex ;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 0;
    margin-bottom: 0;
  }

  .grw-mobile-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .grw-mobile-stars .grw-stars {
    display: flex;
    gap: 2px;
    align-items: center;
  }

  .grw-mobile-stars svg {
    width: 20px;
    height: 20px;
  }

  .grw-mobile-rating-value {
    font-size: 18px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    line-height: 1;
    margin-right: 4px;
  }

  .grw-mobile-count {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.7);
    font-weight: 500;
    margin-top: 2px;
  }

  /* Verberg header-info op mobiel */
  .grw-header-info {
    display: none ;
  }

  .grw-header-actions {
    width: 100%;
    flex-direction: column;
  }

  .grw-btn {
    width: 100%;
    justify-content: center;
  }

  .grw-body {
    padding: 16px 12px;
  }

  .grw-title {
    font-size: 18px;
  }

  .grw-rating-value {
    font-size: 24px;
  }

  .grw-review-card {
    padding: 14px;
  }
}

@media (max-width: 640px) {
  .grw-header {
    padding: 14px;
  }

  .grw-body {
    padding: 10px 5px;
  }

  .grw-swiper {
    padding: 0 0 25px 0 !important;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grw-review-card {
  animation: fadeIn 0.3s ease;
}

/* Accessibility */
.grw-btn:focus-visible,
.grw-nav-btn:focus-visible,
.grw-read-more:focus-visible {
  outline: 2px solid var(--grw-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .grw-controls,
  .grw-header-actions {
    display: none;
  }

  .grw-review-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}



