/* stalo_photo_reviews — invite form, product reviews, dark mode */

/* —— Token form —— */
.stalo-rf { max-width: 720px; margin: 0 auto 48px; padding: 0 0 24px; }
.stalo-rf h1.stalo-rf-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111;
  margin: 8px 0 8px;
  line-height: 1.25;
}
.stalo-rf-lead { color: #6C757D; font-size: 14px; margin: 0 0 20px; line-height: 1.5; }
.stalo-rf-card {
  background: #fff;
  border: 1px solid #E9ECEF;
  border-radius: 16px;
  padding: 22px 24px 24px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  margin: 0 0 20px;
}
.stalo-rf-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid #F3F4F6;
}
.stalo-rf-product img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #E9ECEF;
  background: #fff;
}
.stalo-rf-product .name { font-weight: 700; font-size: 15px; color: #111; line-height: 1.35; margin: 0 0 4px; }
.stalo-rf-product .meta { font-size: 13px; color: #6C757D; margin: 0; }

.stalo-rf-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #212529;
  margin: 0 0 8px;
}
.stalo-rf-label .req { color: #D22C31; margin-left: 2px; }
.stalo-rf-field { margin: 0 0 20px; }
.stalo-rf-stars { display: flex; gap: 6px; align-items: center; }
.stalo-rf-stars svg { width: 36px; height: 36px; display: block; pointer-events: none; }
.stalo-rf-star { cursor: pointer; display: inline-flex; margin: 0; }
.stalo-rf-star input.hidden { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.stalo-rf-stars-hint { margin-left: 8px; font-size: 13px; color: #6C757D; font-weight: 600; }

.stalo-rf textarea,
#ls-modal-review .stalo-modal-photos textarea {
  width: 100%;
  min-height: 128px;
  border: 1px solid #DEE2E6;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #212529;
  resize: vertical;
  box-sizing: border-box;
  background: #fff;
}
.stalo-rf textarea:focus { outline: none; border-color: #7543E3; box-shadow: 0 0 0 3px rgba(117,67,227,.15); }

.stalo-rf-hint { font-size: 12px; color: #6C757D; margin: 0 0 10px; }
.stalo-rf-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stalo-rf-slot {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px dashed #CED4DA;
  background: #F8F9FA;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #6C757D;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  gap: 6px;
  cursor: pointer;
}
.stalo-rf-slot.has-img { border-style: solid; border-color: #E9ECEF; background: #fff; cursor: default; }
.stalo-rf-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stalo-rf-slot .remove {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(17,17,17,.72); color: #fff;
  font-size: 16px; line-height: 20px; text-align: center;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.stalo-rf-slot.empty svg { width: 28px; height: 28px; color: #7543E3; }
.stalo-rf-slots input[type=file] { display: none; }

.stalo-rf-note {
  background: #F8F9FA;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #495057;
  line-height: 1.45;
  margin: 4px 0 18px;
}
.stalo-rf-submit {
  appearance: none;
  border: 0;
  width: 100%;
  background: #7543E3;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 10px;
  cursor: pointer;
}
.stalo-rf-submit:disabled { opacity: .65; cursor: default; }
.stalo-rf-secure { margin-top: 12px; font-size: 12px; color: #6C757D; text-align: center; }
.stalo-rf-alert {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.stalo-rf-alert.is-error { background: #FDECEC; color: #A31B1B; }
.stalo-rf-alert.is-ok { background: #E8F8EE; color: #0A7A38; }

@media (max-width: 767px) {
  .stalo-rf h1.stalo-rf-title { font-size: 22px; }
  .stalo-rf-card { padding: 16px; border-radius: 14px; }
  .stalo-rf-stars svg { width: 32px; height: 32px; }
  .stalo-rf-slots { gap: 8px; }
}

/* modal photo field */
#ls-modal-review .stalo-modal-photos,
#form-review .stalo-modal-photos { margin: 12px 0 16px; }
#ls-modal-review .stalo-rf-slots { max-width: 360px; }

/* —— Product reviews —— */
.stalo-rev-tools { margin: 0 0 8px; }
.stalo-rev-gallery {
  margin: 0 0 22px;
  padding: 18px 18px 16px;
  background: #F8F9FA;
  border-radius: 12px;
  border: 1px solid #EEF0F2;
}
.stalo-rev-gallery__title {
  font-weight: 600;
  font-size: 14px;
  color: #212529;
  margin: 0 0 12px;
}
.stalo-rev-gallery__row { display: flex; gap: 10px; flex-wrap: wrap; }
.stalo-rev-gallery__row a {
  display: block;
  width: 92px; height: 92px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E9ECEF;
  background: #fff;
}
.stalo-rev-gallery__row img { width: 100%; height: 100%; object-fit: cover; display: block; }

.stalo-rev-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}
.stalo-rev-filters button {
  appearance: none;
  border: 1px solid #E3E3E3;
  background: #fff;
  color: #333;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.stalo-rev-filters button.active {
  background: #7543E3;
  border-color: #7543E3;
  color: #fff;
}

.stalo-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #E8F8EE;
  color: #0A7A38;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.3;
  white-space: nowrap;
  margin-left: 8px;
}
.stalo-verified svg { width: 12px; height: 12px; flex: 0 0 12px; }
.review-item .block-author svg.purchased { display: none; }

.stalo-rev-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.stalo-rev-photos a {
  display: block;
  width: 92px; height: 92px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #E9ECEF;
  background: #fff;
}
.stalo-rev-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stalo-rev-wrap .block-author { flex-wrap: wrap; }

@media (max-width: 767px) {
  .stalo-rev-gallery { padding: 14px; }
  .stalo-rev-gallery__row a,
  .stalo-rev-photos a { width: 76px; height: 76px; }
}

/* Dark mode */
html.dark-theme .stalo-rf-title { color: #F2F2F2; }
html.dark-theme .stalo-rf-lead,
html.dark-theme .stalo-rf-product .meta,
html.dark-theme .stalo-rf-hint,
html.dark-theme .stalo-rf-secure,
html.dark-theme .stalo-rf-stars-hint { color: #A0A0A0; }
html.dark-theme .stalo-rf-card {
  background: #1A1A1A;
  border-color: #2A2A2A;
  box-shadow: none;
}
html.dark-theme .stalo-rf-product { border-bottom-color: #2A2A2A; }
html.dark-theme .stalo-rf-product .name,
html.dark-theme .stalo-rf-label { color: #F2F2F2; }
html.dark-theme .stalo-rf-product img { border-color: #333; background: #111; }
html.dark-theme .stalo-rf textarea,
html.dark-theme #ls-modal-review textarea {
  background: #111;
  border-color: #333;
  color: #E8E8E8;
}
html.dark-theme .stalo-rf textarea:focus { border-color: #7543E3; }
html.dark-theme .stalo-rf-slot {
  background: #111;
  border-color: #444;
  color: #A0A0A0;
}
html.dark-theme .stalo-rf-slot.has-img { background: #1A1A1A; border-color: #333; }
html.dark-theme .stalo-rf-note { background: #222; color: #E8E8E8; }
html.dark-theme .stalo-rf-alert.is-error { background: #3A1515; color: #F5B0B0; }
html.dark-theme .stalo-rf-alert.is-ok { background: #163524; color: #6EE7A0; }

html.dark-theme .stalo-rev-gallery {
  background: #1A1A1A;
  border-color: #2A2A2A;
}
html.dark-theme .stalo-rev-gallery__title { color: #F2F2F2; }
html.dark-theme .stalo-rev-gallery__row a,
html.dark-theme .stalo-rev-photos a { border-color: #333; background: #111; }
html.dark-theme .stalo-rev-filters button {
  background: #1A1A1A;
  border-color: #333;
  color: #E8E8E8;
}
html.dark-theme .stalo-rev-filters button.active {
  background: #7543E3;
  border-color: #7543E3;
  color: #fff;
}
html.dark-theme .stalo-verified {
  background: #163524;
  color: #6EE7A0;
}
html.dark-theme .review-item .comment { color: #E4E4E4; }
html.dark-theme .review-heading .block-date { background: #222; color: #A0A0A0; }
html.dark-theme .review-item + .review-item { border-top-color: #2A2A2A; }
html.dark-theme .admin_reply { background: #1A1A1A; color: #E4E4E4; }
html.dark-theme .admin_reply div { color: #F5F5F5; }
