/* Referral Network — built to match the main Winer Clinics site */

.req{color: var(--accent); font-weight: 900}

/* ---------------------------------------------------------------------------
 * Form-control normalization (referrals page only)
 * Safari/WebKit otherwise draws NATIVE search + select controls on top of the
 * custom styling, which clips text against the rounded corners and produces
 * bezel/strikethrough artifacts. Force a consistent look here without touching
 * the rest of the site.
 * ------------------------------------------------------------------------- */
.ref-find input.field__input,
.ref-find select.field__input,
.ref-panel input.field__input,
.ref-panel select.field__input,
[data-ref-modal] input.field__input,
[data-ref-modal] select.field__input {
  -webkit-appearance: none;
  appearance: none;
  min-height: 48px;
  line-height: 1.4;
}
.ref-find textarea.field__input,
.ref-panel textarea.field__input,
[data-ref-modal] textarea.field__input {
  -webkit-appearance: none;
  appearance: none;
}

/* Remove native search decorations (magnifier/clear) that clip text in Safari */
.ref-find input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}
.ref-find input[type="search"]::-webkit-search-decoration,
.ref-find input[type="search"]::-webkit-search-cancel-button,
.ref-find input[type="search"]::-webkit-search-results-button,
.ref-find input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

/* Custom chevron for selects (native arrow is removed by appearance:none) */
.ref-find select.field__input,
.ref-panel select.field__input,
[data-ref-modal] select.field__input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%236EE7FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px 18px;
  padding-right: 42px;
}

/* Find a specialist */
.ref-find{padding: 16px; display:grid; gap: 14px}
.ref-find__controls{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.ref-chips{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}
.ref-chip{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.ref-chip:hover{transform: translateY(-1px); border-color: rgba(110,231,255,.30)}
.ref-chip:active{transform: translateY(0) scale(.99)}
.ref-chip.is-active{
  border-color: rgba(110,231,255,.55);
  background: rgba(110,231,255,.14);
}
.ref-chip--clear{
  color: var(--muted);
  border-style: dashed;
}

.ref-results{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
.ref-empty{
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed var(--stroke);
  background: var(--panel);
  font-size: 14px;
}

.ref-card{
  padding: 16px;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background: var(--panel);
  box-shadow: var(--shadow2);
  display:grid;
  gap: 10px;
}
.ref-card__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.ref-card__name{font-weight: 850; letter-spacing: -0.2px; font-size: 16px}
.ref-card__specialty{
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}
.ref-card__badge{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .3px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(110,231,255,.28);
  background: rgba(110,231,255,.10);
  color: var(--text);
  white-space:nowrap;
}
.ref-card__meta{
  display:flex;
  flex-wrap:wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--muted);
}
.ref-card__focus{font-size: 14px; line-height: 1.55; margin: 0}
.ref-card__tags{display:flex; flex-wrap:wrap; gap:6px}
.ref-tag{
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--panel2);
  color: var(--muted);
}
.ref-card__actions{display:flex; flex-wrap:wrap; gap:10px; margin-top: 4px}

/* For professionals */
.ref-grid{
  display:grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}
.ref-panel{padding: 18px}
.ref-panel__kicker{
  font-size: 12px;
  font-weight: 860;
  letter-spacing: .55px;
  text-transform: uppercase;
  color: var(--muted);
}
.ref-panel__grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

/* Honeypot */
.ref-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}

/* Success state reuse */
.form__success[hidden]{display:none}

@media (min-width: 720px){
  .ref-find__controls{grid-template-columns: 1.4fr .9fr}
  .ref-panel__grid{grid-template-columns: 1fr 1fr}
  .ref-panel__grid .field--full{grid-column: 1 / -1}
}

@media (min-width: 900px){
  .ref-results{grid-template-columns: 1fr 1fr}
  .ref-grid{grid-template-columns: 1fr 1fr}
}
