/**
 * Google Reviews Widget Styles
 * 
 * @package GoogleReviewsWidget
 * @version 1.0.0
 */

/* Main widget container */
.google-reviews-widget {
  position: fixed;
  bottom: 74px;
  left: 20px;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
}

/* Widget content container */
.google-reviews-widget .widget-container {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 16px;
  min-width: 240px;
  max-width: 320px;
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.3s ease-in-out;
  position: relative;
}

/* Slide-in animation */
.google-reviews-widget .widget-container.slide-in {
  transform: translateX(0);
  opacity: 1;
}

/* Footer visibility handling - slide out to left like appearance */
/* This class overrides slide-in when user is near footer */
.google-reviews-widget .widget-container.slide-in.hidden-for-footer {
  transform: translateX(-100%) !important;
  opacity: 0 !important;
}

/* Widget header */
.google-reviews-widget .widget-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

/* Google icon link */
.google-reviews-widget .google-icon-link {
  display: inline-block;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.google-reviews-widget .google-icon-link:hover {
  transform: scale(1.1);
}

.google-reviews-widget .google-icon-link:active {
  transform: scale(0.95);
}

/* Google icon */
.google-reviews-widget .google-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  flex-shrink: 0;
  cursor: pointer;
}

/* Business name */
.google-reviews-widget .business-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
}

/* Rating section */
.google-reviews-widget .rating-section {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* Rating value */
.google-reviews-widget .rating-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-right: 8px;
}

/* Stars container */
.google-reviews-widget .stars {
  display: flex;
  margin-right: 8px;
}

/* Individual star */
.google-reviews-widget .star {
  width: 16px;
  height: 16px;
  margin-right: 2px;
}

.google-reviews-widget .star svg {
  width: 100%;
  height: 100%;
  fill: #fbbf24;
}

/* Reviews count */
.google-reviews-widget .reviews-count {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 12px;
}

/* CTA button */
.google-reviews-widget .cta-button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #c4d327;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.google-reviews-widget .cta-button:hover {
  background: #93a122;
  color: #ffffff;
  text-decoration: none;
}

/* Close button */
.google-reviews-widget .close-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.google-reviews-widget .close-button:hover {
  background: #f3f4f6;
  color: #6b7280;
}

/* Responsive Design */

/* Tablet */
@media screen and (max-width: 1024px) {
  .google-reviews-widget {
    left: 15px;
    bottom: 15px;
  }
}

/* Mobile Portrait */
@media screen and (max-width: 768px) {
  .google-reviews-widget {
    left: 10px;
    bottom: 70px;
  }
  
  .google-reviews-widget .widget-container {
    min-width: 260px;
    max-width: 280px;
    padding: 14px;
  }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
  .google-reviews-widget .widget-container {
    min-width: 240px;
    max-width: 260px;
    padding: 12px;
  }
  
  .google-reviews-widget .rating-value {
    font-size: 20px;
  }
  
  .google-reviews-widget .business-name {
    font-size: 14px;
  }
  
  .google-reviews-widget .cta-button {
    font-size: 13px;
    padding: 8px 12px;
  }
}

/* Mobile Condensed Version - Hide title and button, make logo clickable */
@media screen and (max-width: 767px) {
  /* Hide business name on mobile */
  .google-reviews-widget .business-name {
    display: none !important;
  }
  
  /* Hide CTA button on mobile */
  .google-reviews-widget .cta-button {
    display: none !important;
  }
  
  /* Adjust header for mobile - center the logo */
  .google-reviews-widget .widget-header {
    justify-content: center;
    margin-bottom: 8px;
  }
  
  /* Make logo larger and more prominent on mobile */
  .google-reviews-widget .google-icon {
    width: 40px;
    height: 40px;
    margin-right: 0;
  }
  
  /* Compact widget container on mobile */
  .google-reviews-widget .widget-container {
    padding: 12px 10px;
    min-width: auto;
    max-width: 160px;
    text-align: center;
  }
  
  /* Center rating section on mobile */
  .google-reviews-widget .rating-section {
    justify-content: center;
    margin-bottom: 4px;
  }
  
  /* Center reviews count on mobile */
  .google-reviews-widget .reviews-count {
    text-align: center;
    margin-bottom: 0;
    font-size: 12px;
  }
  
  /* Adjust close button position for compact version */
  .google-reviews-widget .close-button {
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    font-size: 16px;
  }
  
  /* Ensure logo link is clickable and has proper cursor */
  .google-reviews-widget .google-icon-link {
    display: inline-block;
    cursor: pointer;
  }
  
  /* Adjust rating value size for mobile */
  .google-reviews-widget .rating-value {
    font-size: 18px;
  }
  
  /* Adjust stars size for mobile */
  .google-reviews-widget .star {
    width: 14px;
    height: 14px;
  }
}

/* Very Small Mobile */
@media screen and (max-width: 350px) {
  .google-reviews-widget {
    left: 5px;
    bottom: 5px;
  }
  
  .google-reviews-widget .widget-container {
    min-width: 220px;
    max-width: 240px;
    padding: 10px;
  }
  
  .google-reviews-widget .google-icon {
    width: 28px;
    height: 28px;
  }
  
  .google-reviews-widget .business-name {
    font-size: 13px;
  }
  
  .google-reviews-widget .rating-value {
    font-size: 18px;
  }
  
  .google-reviews-widget .star {
    width: 14px;
    height: 14px;
  }
}

/* Animation for better UX */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.google-reviews-widget .widget-container.animate-in {
  animation: slideInFromLeft 0.3s ease-out forwards;
}

/* Focus states for accessibility */
.google-reviews-widget .close-button:focus,
.google-reviews-widget .cta-button:focus {
  outline: 2px solid #c4d327;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .google-reviews-widget .widget-container {
    border: 2px solid #000000;
  }
  
  .google-reviews-widget .cta-button {
    border: 2px solid #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .google-reviews-widget .widget-container {
    transition: none;
  }
  
  .google-reviews-widget .widget-container.animate-in {
    animation: none;
  }
}
