@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&family=Marcellus&display=swap');

/* Survey container and general styles */
.adoree-survey-wrapper {
  background-color: #F9F4F5;
  color: #3D3536;
  font-family: 'Jost', sans-serif;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2.5rem 1.5rem;
  border-radius: 8px;
  box-sizing: border-box;
}

.adoree-survey-logo-container {
  text-align: center;
  margin-bottom: 2rem;
}

.adoree-survey-logo {
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

.adoree-survey-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.adoree-survey-intro h1 {
  font-family: 'Marcellus', serif;
  font-size: 2.25rem;
  color: #3D3536;
  margin-bottom: 1rem;
  font-weight: normal;
}

.adoree-survey-intro p {
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0.5rem 0;
  color: #3D3536;
}

.adoree-survey-intro .adoree-bias-counter {
  font-weight: 500;
  color: #8a7d7e;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* Respondent Information */
.adoree-respondent-fields {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(181, 149, 139, 0.2);
  margin-bottom: 2.5rem;
}

.adoree-field-group {
  margin-bottom: 1.5rem;
}

.adoree-field-group:last-child {
  margin-bottom: 0;
}

.adoree-field-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  color: #3D3536;
}

.adoree-field-group label .required {
  color: #B5958B;
}

.adoree-field-group input[type="text"],
.adoree-field-group input[type="email"],
.adoree-field-group input[type="tel"],
.adoree-field-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #DDD0CB;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  color: #3D3536;
  background-color: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.adoree-field-group input:focus,
.adoree-field-group textarea:focus {
  border-color: #B5958B;
  outline: none;
}

/* Grid of Product Cards */
.adoree-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 600px) {
  .adoree-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .adoree-product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 2rem;
  }
}

.adoree-product-card {
  background-color: #ffffff;
  border: 1px solid rgba(181, 149, 139, 0.3);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* Multiple Image Carousel styling */
.adoree-product-image-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: #F9F4F5;
  touch-action: pan-y;
}

.adoree-carousel-slides {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  padding: 0;
}

.adoree-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.adoree-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #F9F4F5;
  display: block;
}

/* Carousel Buttons */
.adoree-carousel-prev,
.adoree-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(181, 149, 139, 0.2);
  color: #B5958B;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: bold;
  z-index: 10;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  opacity: 0; /* hidden by default, visible on hover/focus */
  outline: none;
}

.adoree-product-image-carousel:hover .adoree-carousel-prev,
.adoree-product-image-carousel:hover .adoree-carousel-next,
.adoree-carousel-prev:focus-visible,
.adoree-carousel-next:focus-visible {
  opacity: 1;
}

.adoree-carousel-prev {
  left: 10px;
}

.adoree-carousel-next {
  right: 10px;
}

.adoree-carousel-prev:hover,
.adoree-carousel-next:hover {
  background-color: #ffffff;
  color: #a08076;
}

/* Carousel dots navigation */
.adoree-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 8px;
  border-radius: 10px;
}

.adoree-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #DDD0CB;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.adoree-carousel-dot.active {
  background-color: #B5958B;
}

.adoree-product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.adoree-product-name {
  font-family: 'Marcellus', serif;
  font-size: 1.4rem;
  color: #3D3536;
  margin: 0 0 0.5rem 0;
  font-weight: normal;
}

.adoree-product-tagline {
  font-size: 0.95rem;
  color: #8a7d7e;
  margin: 0 0 1.5rem 0;
  min-height: 2.4rem;
}

/* Star Rating Control */
.adoree-rating-section {
  margin-top: auto;
  border-top: 1px solid rgba(181, 149, 139, 0.1);
  padding-top: 1rem;
}

.adoree-rating-label {
  display: block;
  font-size: 0.95rem;
  color: #3D3536;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.adoree-star-group {
  display: inline-flex;
  gap: 0.25rem;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Visual Stars Accessibility */
.adoree-star-label {
  cursor: pointer;
  padding: 2px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adoree-star-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.adoree-star-icon {
  font-size: 2rem;
  color: #DDD0CB; /* Inactive star color */
  transition: color 0.2s ease, transform 0.1s ease;
}

/* Accessible focus ring on the icon when input has focus */
.adoree-star-input:focus-visible + .adoree-star-icon {
  outline: 2px solid #B5958B;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Hover and checked states utilizing CSS :has() */
.adoree-star-group:hover .adoree-star-label:has(~ .adoree-star-label:hover) .adoree-star-icon,
.adoree-star-group .adoree-star-label:hover .adoree-star-icon {
  color: #B5958B; /* Active star color on hover */
}

.adoree-star-group:has(.adoree-star-input:checked) .adoree-star-label:has(~ .adoree-star-label .adoree-star-input:checked) .adoree-star-icon,
.adoree-star-group .adoree-star-label:has(.adoree-star-input:checked) .adoree-star-icon {
  color: #B5958B; /* Active star color when checked */
}

/* Keyboard focus highlighting checked and preceding stars */
.adoree-star-group:has(.adoree-star-input:focus-visible) .adoree-star-label:has(~ .adoree-star-label .adoree-star-input:focus-visible) .adoree-star-icon,
.adoree-star-group .adoree-star-label:has(.adoree-star-input:focus-visible) .adoree-star-icon {
  color: #B5958B;
}

/* No Strong Opinion */
.adoree-no-opinion-wrapper {
  margin-top: 0.5rem;
}

.adoree-no-opinion-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
  color: #8a7d7e;
  cursor: pointer;
  user-select: none;
}

.adoree-no-opinion-input {
  margin-right: 0.5rem;
  accent-color: #B5958B;
}

/* Form submission block */
.adoree-comment-section {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(181, 149, 139, 0.2);
  margin-bottom: 2.5rem;
}

.adoree-submit-container {
  text-align: center;
}

.adoree-submit-button {
  background-color: #B5958B;
  color: #ffffff;
  border: none;
  padding: 1rem 3rem;
  font-family: 'Jost', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 600px) {
  .adoree-submit-button {
    width: auto;
  }
}

.adoree-submit-button:hover {
  background-color: #a08076;
}

.adoree-submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Messaging states */
.adoree-response-message {
  padding: 1.5rem;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-align: center;
}

.adoree-response-message.success {
  background-color: #ffffff;
  border: 1px solid #B5958B;
  color: #3D3536;
}

.adoree-response-message.error {
  background-color: #fdf2f2;
  border: 1px solid #f8b4b4;
  color: #9b1c1c;
}

/* Thank You screen details */
.adoree-thank-you {
  text-align: center;
  padding: 4rem 2rem;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid rgba(181, 149, 139, 0.3);
}

.adoree-thank-you h2 {
  font-family: 'Marcellus', serif;
  font-size: 2rem;
  color: #3D3536;
  margin-bottom: 1rem;
  font-weight: normal;
}

.adoree-thank-you p {
  font-size: 1.1rem;
  color: #8a7d7e;
  margin: 0;
}

/* Visually Hidden */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
