/* =========================================================================
 * Reviews Form  Section 10: Leave a Review form + Star widget
 * NovaMed brand: teal brand accent, clean inputs, accessible star rating.
 * ========================================================================= */

/* ---- Wrap -------------------------------------------------------------- */
.aic-review-form-wrap {
  max-width: 720px;
  margin: 0 auto;
  background: #f4f6f9;
  padding: 36px 40px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
}

@media (max-width: 599px) {
  .aic-review-form-wrap {
    padding: 24px 18px;
    border-radius: 14px;
  }
}

/* ---- Success state ----------------------------------------------------- */
.aic-review-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  gap: 16px;
}
.aic-review-form__success[hidden] { display: none; }

.aic-review-form__success-icon {
  width: 64px;
  height: 64px;
  color: var(--primary-dark, #067A55);
}

.aic-review-form__success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ds-text-primary, #1d1d1f);
  margin: 0;
}

.aic-review-form__success-text {
  font-size: 15px;
  color: var(--ds-text-muted, #6e6e73);
  max-width: 420px;
  line-height: 1.6;
  margin: 0;
}

/* ---- Form stack (single column per mrt69.ru reference) ---------------- */
.aic-review-form__stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.aic-form-field { display: flex; flex-direction: column; gap: 6px; }
.aic-form-field--full { width: 100%; }

/* ---- Labels ------------------------------------------------------------ */
.aic-form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  line-height: 1.4;
  margin-bottom: 2px;
}

.aic-form-required {
  color: #ef4444;
  font-size: 14px;
  line-height: 1;
}

.aic-form-hint {
  font-weight: 400;
  color: var(--ds-text-muted, #6e6e73);
  font-size: 12px;
}

/* ---- Inputs ------------------------------------------------------------ */
.aic-form-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  color: #1d1d1f;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

.aic-form-input:focus {
  border-color: var(--primary-color, #09ca8f);
  box-shadow: 0 0 0 3px rgba(9, 202, 143, 0.15);
}

.aic-form-input[aria-invalid="true"] {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.aic-form-textarea {
  resize: vertical;
  min-height: 120px;
}

select.aic-form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ---- Char counter ------------------------------------------------------ */
.aic-form-char-count {
  font-size: 11px;
  color: var(--ds-text-mute2, #8e8e93);
  text-align: right;
  margin-top: -2px;
}
.aic-form-char-count--warn {
  color: #f59e0b;
}

/* ---- Error messages ---------------------------------------------------- */
.aic-form-error {
  font-size: 12px;
  color: #ef4444;
  line-height: 1.4;
  min-height: 16px;
}

.aic-form-error--global {
  font-size: 13px;
  color: #b3361a;
  background: #fdecea;
  border: 1px solid #f5c6c6;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  min-height: auto;
  font-weight: 500;
}
.aic-form-error--global[hidden] { display: none; }

/* ---- Checkboxes -------------------------------------------------------- */
.aic-form-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 6px;
}

.aic-form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ds-text-primary, #1d1d1f);
  cursor: pointer;
  line-height: 1.5;
}

.aic-form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  border: 1.5px solid #d1d5db;
  border-radius: 4px;
  accent-color: var(--primary-color, #09ca8f);
  cursor: pointer;
}

.aic-form-check--required { align-items: flex-start; }

.aic-form-fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

/* ---- Star widget ------------------------------------------------------- */
/*
 * CSS-only reverse-order star hack.
 * Stars rendered 5..1 in HTML, reversed with flex-direction:row-reverse.
 * Hover + selected logic via ~ sibling selector.
 */
.aic-star-widget {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
  margin-top: 4px;
}

.aic-star-widget__input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0,0,0,0);
  overflow: hidden;
  white-space: nowrap;
}

.aic-star-widget__label {
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.12s, transform 0.12s;
  display: flex;
}

.aic-star-widget__label svg {
  width: 36px;
  height: 36px;
  fill: currentColor;
}

/* Hover: color current + all previous (visually right of hovered because row-reverse) */
.aic-star-widget__label:hover,
.aic-star-widget__label:hover ~ .aic-star-widget__label {
  color: #fbbc04;
  transform: scale(1.1);
}

/* Checked state */
.aic-star-widget__input:checked ~ .aic-star-widget__label {
  color: #fbbc04;
}

/* Focus ring on keyboard nav */
.aic-star-widget__input:focus-visible + .aic-star-widget__label {
  outline: 2px solid var(--primary-color, #09ca8f);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- Form footer ------------------------------------------------------- */
.aic-review-form__footer {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.aic-review-form__submit {
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.aic-review-form__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.aic-review-form__disclaimer {
  font-size: 12px;
  color: var(--ds-text-muted, #6e6e73);
  margin: 0;
  line-height: 1.5;
}

/* ---- Page layout: /zalishyty-vidguk/ ---------------------------------- */
.page-review-submit .page-hero {
  padding-bottom: 32px;
}

.review-submit-section {
  padding: 40px 0 72px;
}

/* ---- Source badges in card (moderation list) --------------------------- */
.aic-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 20px;
}
.aic-source-badge--novamed {
  background: rgba(9, 202, 143, 0.12);
  color: #0aa674;
}
.aic-source-badge--mobile {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}
.aic-source-badge--google {
  background: rgba(66, 133, 244, 0.1);
  color: #4285F4;
}

.aic-source-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---- Doctor reviews section on single-doctor.php ---------------------- */
.doctor-reviews-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--ds-line, rgba(15,38,60,.08));
}

.doctor-reviews-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.doctor-reviews-section__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ds-text-primary, #1d1d1f);
  margin: 0;
}

.doctor-reviews-section__link {
  font-size: 13px;
  color: var(--primary-dark, #067A55);
  text-decoration: none;
  font-weight: 500;
}
.doctor-reviews-section__link:hover {
  text-decoration: underline;
}

.doctor-reviews-section__empty {
  background: #f9fafb;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
}

.doctor-reviews-section__empty-text {
  font-size: 14px;
  color: var(--ds-text-muted, #6e6e73);
  margin: 0 0 14px;
}

.doctor-reviews-section__empty-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-dark, #067A55);
  text-decoration: none;
}
.doctor-reviews-section__empty-cta:hover {
  text-decoration: underline;
}

/* ---- Reviews archive filters ------------------------------------------ */
.aic-reviews-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  align-items: flex-end;
}

.aic-reviews-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aic-reviews-filter-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ds-text-muted, #6e6e73);
}

.aic-reviews-filter-group select {
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: var(--ds-text-primary, #1d1d1f);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236e6e73' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.aic-reviews-filter-group select:focus {
  border-color: var(--primary-color, #09ca8f);
}

.aic-reviews-filters__reset {
  align-self: flex-end;
  font-size: 13px;
  color: var(--ds-text-muted, #6e6e73);
  text-decoration: none;
  padding: 8px 4px;
  transition: color 0.15s;
}
.aic-reviews-filters__reset:hover {
  color: var(--primary-dark, #067A55);
}

/* ---- Filter tabs: All / Google / NovaMed ------------------------------ */
.aic-reviews-source-tabs {
  display: flex;
  gap: 0;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 28px;
  width: fit-content;
}

.aic-reviews-source-tab {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ds-text-muted, #6e6e73);
  background: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
  border-right: 1px solid #d1d5db;
}
.aic-reviews-source-tab:last-child { border-right: none; }
.aic-reviews-source-tab:hover {
  background: #f9fafb;
  color: var(--ds-text-primary, #1d1d1f);
}
.aic-reviews-source-tab.is-active {
  background: var(--primary-color, #09ca8f);
  color: #fff;
}
.aic-reviews-source-tab svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---- File upload (drop zone) ------------------------------------------ */
.aic-file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  background: #fff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: #6b7280;
  font-size: 14px;
}
.aic-file-drop:hover,
.aic-file-drop.is-dragover {
  border-color: var(--primary-color, #09ca8f);
  background: #f6fbf9;
  color: #1d1d1f;
}
.aic-file-drop.is-filled {
  border-style: solid;
  border-color: var(--primary-color, #09ca8f);
  background: #f6fbf9;
  color: #1d1d1f;
}
.aic-file-drop__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: inherit;
}
.aic-file-drop__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aic-file-drop__input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0,0,0,0);
  overflow: hidden;
  white-space: nowrap;
}

/* ---- Submit button (pill, brand teal) ---------------------------------- */
.aic-review-form__footer {
  margin-top: 8px;
}
.aic-review-form__submit {
  background: var(--primary-color, #09ca8f);
  color: #fff;
  border: none;
  padding: 13px 36px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(9, 202, 143, 0.18);
}
.aic-review-form__submit:hover {
  background: #08b07c;
  box-shadow: 0 4px 12px rgba(9, 202, 143, 0.25);
}
.aic-review-form__submit:active {
  transform: translateY(1px);
}
