/* AMB SELLS / VillaTheme WooCommerce Photo Reviews
   V3: true empty rating, early validation and responsive layout. Loaded after shortcode-review-form.min.css.
   Kept under .woocommerce-photo-reviews-form-popup so review grids are unaffected.
*/
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup {
  --amb-form-bg: #10141B;
  --amb-form-surface: #222B38;
  --amb-form-field: #191F2A;
  --amb-form-border: #303B4B;
  --amb-form-text: #FFFFFF;
  --amb-form-muted: #AAB7C8;
  --amb-form-star: #FF5722;
}

/* Overlay + centered card */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main {
  background: rgba(3, 7, 12, .84) !important;
  backdrop-filter: blur(5px);
  padding: 16px !important;
  overflow-y: auto;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-inner {
  width: 600px !important;
  max-width: min(600px, 100%) !important;
  max-height: calc(100dvh - 32px);
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--amb-form-bg) !important;
  color: var(--amb-form-text) !important;
  border: 1px solid var(--amb-form-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55) !important;
}

/* Header / title / close */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top {
  position: relative !important;
  min-height: 65px !important;
  height: auto !important;
  padding: 17px 62px 17px 22px !important;
  justify-content: flex-start !important;
  background: var(--amb-form-surface) !important;
  border-bottom: 1px solid var(--amb-form-border) !important;
  text-align: left !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top .popup-title {
  color: var(--amb-form-text) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: .01em;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top .woocommerce-photo-reviews-form-main-close {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  height: 39px !important;
  width: 39px !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--amb-form-text) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top .woocommerce-photo-reviews-form-main-close:hover,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top .woocommerce-photo-reviews-form-main-close:focus-visible {
  background: #303B4B !important;
}

/* Body */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 18px !important;
  background: var(--amb-form-bg) !important;
  padding: 24px !important;
  max-height: calc(100dvh - 114px) !important;
  overflow-y: auto !important;
  color: var(--amb-form-text) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_review_form_wrapper,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_review_form {
  width: 100% !important;
  max-width: 100% !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-content,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form {
  color: var(--amb-form-text) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form label {
  display: block;
  color: #E6EDF6 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  margin-bottom: 8px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form .required {
  color: var(--amb-form-star) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form .comment-form-rating,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form .comment-form-comment,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form .comment-form-author,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form .comment-form-email {
  margin: 0 0 20px !important;
  width: 100% !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form input:not([type="submit"]):not([type="file"]):not([type="checkbox"]),
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form textarea,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form select:not(.wcpr-rating) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  background: var(--amb-form-field) !important;
  border: 1px solid var(--amb-form-border) !important;
  border-radius: 10px !important;
  color: var(--amb-form-text) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  padding: 12px 14px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form textarea {
  min-height: 148px !important;
  height: 148px !important;
  resize: vertical !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form input::placeholder,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form textarea::placeholder {
  color: var(--amb-form-muted) !important;
  opacity: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form input:focus,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form textarea:focus {
  outline: 2px solid rgba(255,87,34,.26) !important;
  outline-offset: 0 !important;
  border-color: var(--amb-form-star) !important;
}

/* Rating — NO auto-selected stars. JavaScript files in V2 remove the
   plugin's forced .star-5 click. Grey = not rated; orange = selected. */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars {
  margin: 4px 0 0 !important;
  line-height: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars > span {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars a {
  display: inline-flex !important;
  flex: 0 0 46px !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  min-width: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  font-size: 30px !important;
  line-height: 46px !important;
  text-indent: -9999px !important;
  text-decoration: none !important;
  touch-action: manipulation;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars a::before {
  position: absolute !important;
  display: block !important;
  top: 50% !important;
  left: 50% !important;
  width: 1em !important;
  height: 1em !important;
  transform: translate(-50%, -50%) !important;
  font-family: star !important;
  font-size: 30px !important;
  content: "S" !important;
  color: #626D7D !important;
  opacity: 1 !important;
  text-indent: 0 !important;
  line-height: 1 !important;
}
/* Once the visitor clicks a star, color all stars up to that choice. */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars.selected a.active::before,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars.selected a:not(.active)::before {
  color: var(--amb-form-star) !important;
  opacity: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars.selected a.active ~ a::before {
  color: #626D7D !important;
  opacity: 1 !important;
}
/* Preview on mouse devices. Never prefill the actual rating. */
@media (hover: hover) and (pointer: fine) {
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars:hover a::before {
    color: var(--amb-form-star) !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars:hover a:hover ~ a::before {
    color: #626D7D !important;
  }
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars a:focus-visible {
  outline: 2px solid var(--amb-form-star) !important;
  outline-offset: 1px !important;
  background: #222B38 !important;
}

/* Photo uploader — label stays above, no duplicate button text and
   no full-width dashed rectangle. Only the compact, left-aligned tile. */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-images {
  margin: 3px 0 20px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-input-file-container .wcpr-input-file-wrap {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_image_upload_button.icon_with_text {
  display: inline-flex !important;
  flex: 0 0 78px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important; /* Hides duplicate visible text; DOM label stays readable to screen readers */
  line-height: 0 !important;
  text-align: left !important;
  cursor: pointer !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_image_upload_button.icon_with_text::before {
  content: "" !important;
  display: block !important;
  flex: 0 0 78px !important;
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  min-height: 78px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--amb-form-border) !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  background-color: var(--amb-form-field) !important;
  background-image: url(../images/add-photo-bigger.svg) !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 44px 44px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_image_upload_button.icon_with_text:hover::before,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_image_upload_button.icon_with_text:focus-visible::before {
  background-color: #222B38 !important;
  border-color: var(--amb-form-star) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr_image_upload_button.icon_with_text:focus-visible {
  outline: 2px solid var(--amb-form-star) !important;
  outline-offset: 3px !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-input-file-container .wcpr-selected-image-container {
  display: flex !important;
  flex: 1 1 170px;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-images .wcpr-selected-image-name {
  color: var(--amb-form-muted) !important;
}

/* Submit, and popup opener */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .form-submit {
  margin: 18px 0 0 !important;
  position: static !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .form-submit input[type="submit"],
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-submit {
  display: block !important;
  width: 100% !important;
  min-height: 46px !important;
  padding: 11px 16px !important;
  background: var(--amb-form-star) !important;
  color: #10141B !important;
  border: 1px solid var(--amb-form-star) !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  text-transform: none !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .form-submit input[type="submit"]:hover,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-submit:hover {
  background: #FF7046 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-button-add-review {
  background: var(--amb-form-surface) !important;
  border: 1px solid var(--amb-form-border) !important;
  border-radius: 9px !important;
  color: var(--amb-form-text) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-button-add-review:hover {
  border-color: var(--amb-form-star) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-gdpr-policy,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-notify {
  color: var(--amb-form-muted) !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-content::-webkit-scrollbar-thumb {
  background: #303B4B !important;
}

@media (max-width: 600px) {
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main {
    padding: 10px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-inner {
    width: 100% !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 13px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top {
    min-height: 58px !important;
    padding: 14px 56px 14px 16px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main-top .popup-title {
    font-size: 18px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-content {
    padding: 17px !important;
    max-height: calc(100dvh - 87px) !important;
  }
}


/* ===== AMB SELLS V3: rating and validation fixes ===== */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating .amb-required-marker {
  color: #FF5722 !important;
  font-weight: 700 !important;
  padding-left: 3px !important;
}

/* Even if the plugin adds an old selected class, never show a rating
   until the visitor has actually touched a star. */
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-unselected p.stars a::before,
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-unselected p.stars.selected a::before {
  color: #8290A3 !important;
  opacity: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-selected p.stars.selected a::before {
  color: #FF5722 !important;
  opacity: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-selected p.stars.selected a.active ~ a::before {
  color: #8290A3 !important;
  opacity: 1 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .amb-form-field-error {
  display: block !important;
  margin: 8px 0 0 !important;
  color: #FF9777 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-comment.amb-field-invalid textarea {
  border-color: #FF5722 !important;
}
.woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-notify-wraps.wcpr-hidden {
  display: none !important;
}

/* WooCommerce/Revopic styles have their own 768px breakpoint. Match it. */
@media (max-width: 768px) {
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main {
    padding: 12px !important;
    background: rgba(3, 7, 12, .88) !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-inner {
    width: 100% !important;
    max-width: 600px !important;
    max-height: calc(100dvh - 24px) !important;
    background: #10141B !important;
    border: 1px solid #303B4B !important;
    border-radius: 14px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form-main .woocommerce-photo-reviews-form-main-content {
    padding: 18px !important;
    background: #10141B !important;
    max-height: calc(100dvh - 96px) !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars a {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    flex-basis: 46px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .wcpr-comment-form-submit {
    background: #FF5722 !important;
    border-color: #FF5722 !important;
    color: #10141B !important;
  }
}
@media (max-width: 360px) {
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars > span {
    gap: 1px !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .woocommerce-photo-reviews-form p.stars a {
    width: 43px !important;
    height: 44px !important;
    min-width: 43px !important;
    min-height: 44px !important;
    flex-basis: 43px !important;
  }
}


/* Mouse-hover preview is temporary; it does not set a rating value. */
@media (hover: hover) and (pointer: fine) {
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-unselected p.stars:hover a::before {
    color: #FF5722 !important;
  }
  .woocommerce-photo-reviews-form-container.woocommerce-photo-reviews-form-popup .comment-form-rating.amb-rating-unselected p.stars:hover a:hover ~ a::before {
    color: #8290A3 !important;
  }
}