.cri-review-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
}

.cri-thumb {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 6px;
  overflow: hidden;
  background: #f3f4f6;
  text-decoration: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
}

.cri-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.cri-thumb--overflow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.cri-thumb-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  pointer-events: none;
  z-index: 1;
}

.cri-thumb--hidden {
  display: none !important;
}

/* Name + email: stacked on mobile (default), side by side on tablet/desktop.
   The theme renders the form as a flex column (.comment-form { display: flex;
   flex-direction: column }), so floats are ignored. At tablet+ we switch the
   container to a wrapping row and give only these two fields a half-width
   basis; every other field keeps its theme width:100% and therefore still
   takes up its own row. The #commentform.comment-form selector (id + class on
   the same element) outranks the theme's .comment-form rules. */
@media (min-width: 768px) {
  #commentform.comment-form {
    flex-flow: row wrap;
    column-gap: 16px;
  }

  #commentform .comment-form-author,
  #commentform .comment-form-email {
    width: calc(50% - 8px);
  }
}

/* Submit button while the review (with images) is sending */
#commentform .form-submit .btn.is-sending {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

/* Keep the label text and the loader on one row, loader to the right. */
#commentform .form-submit .btn.is-sending .btn-text-p {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
}

.cri-btn-spinner {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: cri-btn-spin 0.7s linear infinite;
}

@keyframes cri-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Respect reduced-motion: drop the spin and rely on the "Sending…" text. */
@media (prefers-reduced-motion: reduce) {
  .cri-btn-spinner {
    display: none;
  }
}

/* Review form upload */
.comment-form-cri-images {
  width: 100%;
}

.comment-form-cri-images .cri-images-label {
  display: block;
  margin-bottom: 0.35rem;
}

.cri-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cri-upload-zone {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.cri-upload-zone::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%23E4E4E7' stroke-width='2' stroke-dasharray='10%2c12' stroke-linecap='square'/%3e%3c/svg%3e");
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cri-upload-zone.is-dragover::before,
.cri-upload-zone:hover::before {
  opacity: 0.85;
}

.cri-upload-zone.is-dragover {
  background: rgba(59, 130, 246, 0.04);
}

.cri-upload-zone.has-error::before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%23DC2626' stroke-width='2' stroke-dasharray='10%2c12' stroke-linecap='square'/%3e%3c/svg%3e");
}

.cri-upload-zone__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
/*   padding: 2.5rem 1.5rem; */
  padding: 1.5rem;
  text-align: center;
}

.cri-upload-zone__icon {
  display: flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.75rem;
}

.cri-upload-zone__icon i {
	font-size: 20px;
}

.cri-upload-zone__title {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.cri-upload-zone__title--mobile {
  display: none;
}

.cri-upload-zone__browse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.25rem;
  padding: 0.55rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #1d4ed8;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cri-upload-zone__browse:hover,
.cri-upload-zone__browse:focus-visible {
  background: #1e40af;
  outline: none;
}

.cri-field-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.cri-field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #b91c1c;
}

.cri-preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.cri-preview-item {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}

.cri-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cri-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.cri-preview-remove:hover,
.cri-preview-remove:focus-visible {
  background: rgba(17, 24, 39, 0.95);
  outline: none;
}

/* Lightbox */
html.cri-lightbox-open,
html.cri-lightbox-open body {
  overflow: hidden !important;
}

.cri-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  padding: 1.5rem;
}

.cri-lightbox.is-open {
  display: block;
}

.cri-lightbox__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cri-lightbox__image {
  max-width: min(92vw, 1100px);
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.cri-lightbox__image.is-loading {
  opacity: 0.35;
}

.cri-lightbox__close,
.cri-lightbox__nav {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  z-index: 2;
}

.cri-lightbox__close {
  top: 1rem;
  right: 1rem;
}

.cri-lightbox__nav--prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.cri-lightbox__nav--next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.cri-lightbox__close:hover,
.cri-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}

.cri-lightbox__close:focus-visible,
.cri-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.cri-lightbox__nav[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .cri-thumb,
  .cri-preview-item {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .cri-upload-zone__title--desktop {
    display: none;
  }

  .cri-upload-zone__title--mobile {
    display: block;
  }

  .cri-upload-zone__inner {
    padding: 2rem 1rem;
  }

  .cri-lightbox__nav--prev {
    left: 0.5rem;
  }

  .cri-lightbox__nav--next {
    right: 0.5rem;
  }
}


.form.comment-form textarea {
	min-height: unset !important;
}