/* =========================================================================
   Reviews — feed cards, infinite scroll, write modal
   Used by both index.html and pages/kona-homepage.html
   ========================================================================= */

/* ---- Section header with action button ---- */
.rv-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.rv-header__titles { flex: 1; min-width: 0; }
.rv-write-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #B8702A;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 8px 24px -8px rgba(184,112,42,0.4);
  font-family: inherit;
}
.rv-write-btn:hover {
  background: #C98640;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(184,112,42,0.55);
}
.rv-write-btn:active { transform: translateY(0); }
.rv-write-btn iconify-icon { font-size: 1rem; }

/* ---- Card photo grid ---- */
.rv-photos {
  display: grid;
  gap: 6px;
  margin: 1rem 0 1.25rem;
}
.rv-photos--1 { grid-template-columns: 1fr; }
.rv-photos--2 { grid-template-columns: 1fr 1fr; }
.rv-photos--3 { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; }
.rv-photos--3 > a:first-child { grid-row: span 2; }
.rv-photo {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 1;
  background: #f4f1ec;
  cursor: zoom-in;
}
.rv-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(.2,.6,.2,1);
}
.rv-photo:hover img { transform: scale(1.05); }

/* ---- Empty / loader / sentinel ---- */
.rv-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #92867a;
  font-size: 0.95rem;
}
.rv-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1rem;
  color: #92867a;
  font-size: 0.875rem;
}
.rv-loader__spinner {
  width: 18px; height: 18px;
  border: 2px solid #e8e1d6;
  border-top-color: #B8702A;
  border-radius: 50%;
  animation: rv-spin 0.8s linear infinite;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }
.rv-end {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
  color: #c4baa8;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* =========================================================================
   Modal
   ========================================================================= */
.rv-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 1rem 2rem;
  overflow-y: auto;
  background: rgba(20, 16, 12, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: rv-modal-fade 0.2s ease;
}
.rv-modal.is-open { display: flex; }
@keyframes rv-modal-fade { from { opacity: 0; } to { opacity: 1; } }

.rv-modal__panel {
  width: 100%;
  max-width: 560px;
  background: #FDFBF7;
  border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
  animation: rv-modal-up 0.3s cubic-bezier(.2,.7,.2,1);
  overflow: hidden;
}
@keyframes rv-modal-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.rv-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem 0.75rem;
}
.rv-modal__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2d2418;
  letter-spacing: -0.01em;
}
.rv-modal__close {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #92867a;
  transition: background 0.2s;
}
.rv-modal__close:hover { background: rgba(0,0,0,0.05); color: #2d2418; }

.rv-modal__body {
  padding: 1rem 2rem 2rem;
}

/* ---- Form fields ---- */
.rv-field { margin-bottom: 1.25rem; }
.rv-field__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5b4f3f;
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}
.rv-field__label--required::after {
  content: " *";
  color: #B8702A;
}
.rv-field__hint {
  font-size: 0.75rem;
  color: #a89a86;
  margin-top: 0.25rem;
}
.rv-input,
.rv-textarea,
.rv-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e0d8c8;
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  color: #2d2418;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.rv-input:focus,
.rv-textarea:focus,
.rv-select:focus {
  outline: none;
  border-color: #B8702A;
  box-shadow: 0 0 0 3px rgba(184,112,42,0.12);
}
.rv-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.6;
}
.rv-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a89a86' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Honeypot — hidden from humans */
.rv-honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Display mode radio cards */
.rv-radio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.rv-radio-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 0.5rem;
  border: 1.5px solid #e0d8c8;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.rv-radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.rv-radio-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d2418;
}
.rv-radio-card__example {
  font-size: 0.75rem;
  color: #a89a86;
}
.rv-radio-card.is-active {
  border-color: #B8702A;
  background: rgba(184,112,42,0.05);
  box-shadow: 0 0 0 3px rgba(184,112,42,0.08);
}
.rv-radio-card.is-active .rv-radio-card__example { color: #B8702A; }

/* Star rating */
.rv-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.rv-star-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #d8d0c0;
  transition: color 0.15s, transform 0.1s;
}
.rv-star-btn iconify-icon { font-size: 1.75rem; display: block; }
.rv-star-btn:hover { transform: scale(1.1); }
.rv-star-btn.is-on { color: #E8A547; }
.rv-stars-label {
  margin-left: 0.75rem;
  font-size: 0.875rem;
  color: #92867a;
  font-weight: 600;
}

/* Photo upload */
.rv-photo-upload {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.rv-photo-slot {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px dashed #d8cdb8;
  border-radius: 12px;
  background: #fafaf6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}
.rv-photo-slot:hover { border-color: #B8702A; background: rgba(184,112,42,0.04); }
.rv-photo-slot iconify-icon { font-size: 1.5rem; color: #a89a86; }
.rv-photo-slot__preview {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.rv-photo-slot__remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(20,16,12,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.75rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.rv-photo-slot.has-image { border-style: solid; border-color: transparent; }
.rv-photo-slot.has-image .rv-photo-slot__remove { display: inline-flex; }
.rv-photo-slot.has-image > iconify-icon { display: none; }

/* Char counter */
.rv-counter {
  font-size: 0.75rem;
  color: #a89a86;
  text-align: right;
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.rv-counter.is-min { color: #B8702A; }
.rv-counter.is-over { color: #c44; }

/* Submit row */
.rv-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
}
.rv-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: #2d2418;
  color: #fff;
  border: none;
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.rv-submit-btn:hover:not(:disabled) { background: #B8702A; }
.rv-submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.rv-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #5b4f3f;
  cursor: pointer;
  user-select: none;
}
.rv-consent input { margin-top: 2px; flex-shrink: 0; accent-color: #B8702A; }

/* Error / toast */
.rv-error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fef0ed;
  color: #b13520;
  border-radius: 10px;
  font-size: 0.8125rem;
  display: none;
}
.rv-error.is-shown { display: block; }

.rv-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 100px);
  background: #2d2418;
  color: #fff;
  padding: 0.875rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 12px 36px -8px rgba(0,0,0,0.35);
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.rv-toast.is-shown { transform: translate(-50%, 0); }
.rv-toast.is-error { background: #b13520; }

/* =========================================================================
   Mobile
   ========================================================================= */
@media (max-width: 640px) {
  .rv-header { flex-direction: column; align-items: flex-start; }
  .rv-modal { padding: 0; align-items: stretch; }
  .rv-modal__panel { border-radius: 0; min-height: 100vh; max-width: 100%; }
  .rv-modal__head { padding: 1rem 1.5rem 0.5rem; }
  .rv-modal__body { padding: 0.75rem 1.5rem 2rem; }
  .rv-radio-grid { grid-template-columns: 1fr; }
}
