/* GC Reviews styles (scoped) */
.gc-reviews-scope * {
  box-sizing: border-box;
}

.gc-reviews-scope .req {
  color: #ef4444;
}

/* Form layout */
.gc-reviews-scope .gc-form-h1 {
  font-size: clamp(1.25rem, 5.5vw, 1.75rem);
  text-align: center;
  margin: .25rem 0 .75rem;
  color: #0f172a;
}

.gc-reviews-scope .gc-review-form {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 1rem;
  padding: 0 12px;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
}

.gc-reviews-scope .gc-review-form label {
  gap: 6px;
  font-weight: 600;
  color: #111827;
}

.gc-reviews-scope .gc-review-form input[type="text"],
.gc-reviews-scope .gc-review-form textarea,
.gc-reviews-scope .gc-review-form input[type="file"] {
  width: 100%;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.35;
  padding: 10px 12px;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  background: #fff;
}

.gc-reviews-scope .gc-review-form input[type="file"] {
  border-style: dashed;
  background: #fafafa;
  padding: 10px;
}

.gc-reviews-scope .gc-review-form textarea {
  min-height: 120px;
  resize: vertical;
}

.gc-reviews-scope .gc-review-form input,
.gc-reviews-scope .gc-review-form textarea {
  margin-bottom: 15px;
}

/* Rating stars aligned */
.gc-reviews-scope .gc-field {
  display: grid;
  gap: 6px;
}

.gc-reviews-scope .gc-label {
  font-weight: 700;
  color: #111827;
}

.gc-reviews-scope .gc-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.gc-reviews-scope .gc-rating input[type="radio"] {
  position: absolute;
  left: -9999px;
}

.gc-reviews-scope .gc-rating .gc-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
  color: #d1d5db;
  /* Gray by default */
  transition: all 0.2s ease;
}

/* Hover & Checked Effects (using flex-direction: row-reverse logic for simpler CSS "previous sibling" selection) */
/* When hovering a star, color it and all following (visually previous) stars */
.gc-reviews-scope .gc-rating .gc-star:hover,
.gc-reviews-scope .gc-rating .gc-star:hover~.gc-star,
.gc-reviews-scope .gc-rating input:checked~.gc-star {
  color: #ffd700;
  /* Gold */
  transform: scale(1.15);
  text-shadow: 0 0 4px rgba(255, 215, 0, 0.4);
}

.gc-reviews-scope .gc-rating .gc-star:hover~.gc-star {
  opacity: 1;
  /* Ensure full opacity on hover */
}

/* Turnstile container */
.gc-reviews-scope .gc-turnstile {
  display: flex;
  justify-content: flex-start;
  /* Left by default (Desktop) */
  margin-top: 1.5rem;
  /* More space from stars */
  padding-top: 0.5rem;
}

.gc-reviews-scope .cf-turnstile {
  margin: 0;
}

@media (max-width: 768px) {
  .gc-reviews-scope .gc-turnstile {
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .gc-reviews-scope .cf-turnstile {
    /* Fixed size is ~300px, so just margin auto to be safe */
    margin: 0 auto !important;
    display: block;
    transform: none;
    /* No scaling needed usually as 300px fits on 320px+ */
  }
}

@media (max-width: 340px) {

  /* Only scale down for VERY small screens (Galaxy Fold outer, older iPhones) */
  .gc-reviews-scope .cf-turnstile {
    transform: scale(0.9);
    transform-origin: center top;
  }
}

@media (max-width: 360px) {
  .gc-reviews-scope .cf-turnstile {
    transform: scale(.9);
    transform-origin: center top;
  }
}

@media (max-width: 330px) {
  .gc-reviews-scope .cf-turnstile {
    transform: scale(.84);
  }
}

/* Submit button */
.gc-reviews-scope .gc-btn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: .9rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
  justify-content: center;
}

.gc-reviews-scope .gc-btn:hover {
  filter: brightness(.98);
  box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
}

.gc-reviews-scope .gc-btn:active {
  transform: translateY(1px) scale(.998);
}

.gc-reviews-scope .gc-form-note {
  font-size: .85rem;
  color: #6b7280;
  text-align: center;
}

.gc-reviews-scope .gc-form-success {
  margin: .5rem auto 1rem;
  padding: .85rem 1rem;
  border-radius: .85rem;
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #065f46;
  font-weight: 600;
  text-align: center;
}

.gc-reviews-scope .gc-form-error {
  margin: .5rem auto 1rem;
  padding: .85rem 1rem;
  border-radius: .85rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-weight: 600;
  text-align: center;
}

.gc-reviews-scope .gc-form-success a {
  color: #0ea5e9;
  font-weight: 700;
  text-decoration: none;
}

.gc-reviews-scope .gc-form-success a:hover {
  text-decoration: underline;
}

/* Success Button using #0082e5 */
.gc-btn-success {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0082e5;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.2s;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.gc-btn-success:hover {
  background-color: #006bbd;
}

/* Cards grid (home + list) */
.gc-reviews-scope .gc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

@media (min-width:640px) {
  .gc-reviews-scope .gc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width:1024px) {
  .gc-reviews-scope .gc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gc-reviews-scope .gc-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .06);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  min-height: 200px;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
  align-self: stretch;
}

.gc-reviews-scope .gc-media-wrap {
  aspect-ratio: 16/9;
  background: #f3f4f6;
}

.gc-reviews-scope img.gc-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gc-reviews-scope .gc-text {
  padding: 1rem;
  color: #0f172a;
  flex: 1;
  font-size: 0.95rem;
}

.gc-reviews-scope .gc-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: 0 1rem 1rem;
  width: 100%;
}

.gc-reviews-scope .gc-author {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 60%;
}

.gc-reviews-scope .gc-stars {
  flex-shrink: 0;
}

.gc-reviews-scope .gc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(2, 6, 23, .1);
}

.gc-reviews-scope .gc-card:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 3px;
}

.gc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .65);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 999999999;
}

.gc-modal-overlay.is-open {
  display: flex;
}

.gc-modal {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 60px rgba(2, 6, 23, .35);
  width: min(640px, 100%);
  max-height: 90vh;
  overflow: hidden;
  position: relative;
}

.gc-modal:focus {
  outline: none;
}

.gc-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  position: relative;
}

.gc-modal-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  width: 40px;
  height: 40px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #64748b;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.gc-modal-close:hover {
  background-color: #f1f5f9;
  color: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

.gc-modal-media {
  width: 100%;
  height: 220px;
  border-radius: .85rem;
  background: #f3f4f6;
  background-size: cover;
  background-position: center;
}

.gc-modal-author {
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.gc-modal-stars {
  color: #f59e0b;
  letter-spacing: 1.25px;
  margin: 0;
}

.gc-modal-content {
  color: #0f172a;
  line-height: 1.6;
  max-height: 45vh;
  overflow: auto;
}

.gc-modal-footer {
  display: flex;
  justify-content: flex-end;
  font-size: .9rem;
  color: #6b7280;
}

.gc-modal-link {
  color: #0ea5e9;
  font-weight: 600;
  text-decoration: none;
}

.gc-modal-link:hover {
  text-decoration: underline;
}

body.gc-modal-open {
  overflow: hidden;
}

.gc-reviews-scope .gc-author {
  color: #3b82f6;
  font-weight: 700;
}

.gc-reviews-scope .gc-stars {
  color: #f59e0b;
}

/* Pagination + optional header (kept minimal) */
/* Pagination: Card/Button Style */
.gc-reviews-scope .gc-pagination {
  margin: 2rem 0 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gc-reviews-scope .gc-pagination ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  background: transparent;
  box-shadow: none;
  border: none;
}

.gc-reviews-scope .gc-pagination a,
.gc-reviews-scope .gc-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Subtle depth */
  line-height: 1;
}

.gc-reviews-scope .gc-pagination a:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-1px);
  color: #0f172a;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.gc-reviews-scope .gc-pagination .current {
  background: #fff;
  color: #0082e5;
  border-color: #0082e5;
  box-shadow: 0 0 0 1px #0082e5;
  /* Thicker look */
  z-index: 1;
}

.gc-reviews-scope .gc-pagination .dots {
  border: none;
  box-shadow: none;
  background: transparent;
  color: #64748b;
  min-width: auto;
}

/* Ensure Next/Prev buttons fit their text */
.gc-reviews-scope .gc-pagination a.next,
.gc-reviews-scope .gc-pagination a.prev {
  width: auto;
  padding: 0 16px;
}

/* Mobile adjustments */
@media (max-width: 480px) {

  .gc-reviews-scope .gc-pagination a,
  .gc-reviews-scope .gc-pagination span {
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    font-size: 14px;
  }
}

.gc-reviews-scope .gc-aggregate {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 0 1rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.gc-reviews-scope .gc-agg-stars {
  color: #f59e0b;
  letter-spacing: 2px;
  font-size: 1.1rem;
}

.gc-reviews-scope .gc-agg-sub {
  color: #6b7280;
  font-size: .9rem;
}

/* —— Form 100% de ancho —— */
.gc-reviews-scope .gc-review-form {
  width: 100%;
  max-width: 680px;
  /* antes: 680px */
  margin: 0 auto 1rem;
  padding: 0 12px;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
}

/* Old star logic removed */

.gc-reviews-scope footer.gc-meta {
  background: #ffffff;
  border-top: 1px solid #ccc;
  padding: 0.8rem 1rem;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
  .gc-modal {
    width: 95%;
    /* More width on mobile to use available space */
    max-height: 95vh;
  }

  .gc-modal-media {
    height: 160px;
    /* Reduce image height on mobile */
  }

  .gc-reviews-scope .gc-form-h1 {
    font-size: 1.5rem;
  }

  .gc-modal-body {
    padding: 1rem;
    /* Slightly less padding on mobile */
  }

  /* Ensure modal content scrolls if screen is very short (landscape) */
  .gc-modal-content {
    max-height: 40vh;
  }
}