/* Shared therapist search card (find-therapist + homepage) */
:root {
  --agoda-blue: #2067da;
  --text: #1a1a1a;
  --border: #ccc;
}
/* Search card */
.ah-search-card {
  position: relative;
  z-index: 30;
  margin-top: 32px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

@media (min-width: 640px) {
  .ah-search-card {
    margin-top: 40px;
  }
}

.ah-mode-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 0 8px;
  border-radius: 8px 8px 0 0;
}

.ah-mode-tab {
  position: relative;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}

@media (min-width: 640px) {
  .ah-mode-tab {
    padding: 14px 20px;
    font-size: 14px;
  }
}

.ah-mode-tab:hover {
  color: var(--text);
}

.ah-mode-tab.is-active {
  color: var(--agoda-blue);
}

.ah-mode-tab-underline {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--agoda-blue);
  display: none;
}

.ah-mode-tab.is-active .ah-mode-tab-underline {
  display: block;
}

.ah-mode-tab i {
  margin-right: 6px;
}

.ah-search-form {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  overflow: visible;
}

@media (min-width: 1024px) {
  .ah-search-form {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 16px;
  }
}

.ah-field {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: text;
  position: relative;
}

.ah-field:hover,
.ah-field:focus-within {
  border-color: var(--agoda-blue);
}

/* Mobile / stacked: equal full-width rows */
.ah-field--first,
.ah-field--mid,
.ah-field--age {
  flex: 1 1 auto;
  min-width: 0;
}

@media (min-width: 1024px) {
  .ah-field {
    border-radius: 0;
    border-right-width: 0;
  }
  /* City / keyword — primary field, takes remaining space */
  .ah-field--first {
    flex: 1 1 0;
    min-width: 220px;
    border-radius: 6px 0 0 6px;
  }
  .ah-field--mid {
    flex: 0.9 1 0;
    min-width: 0;
  }
  .ah-field--age {
    width: 150px;
    flex: 0 0 150px;
    position: relative;
    cursor: pointer;
  }
}

.ah-field-icon {
  color: #888;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.ah-field-body {
  flex: 1;
  min-width: 0;
}

.ah-field-label {
  display: block;
  font-size: 11px;
  color: #666;
  line-height: 1;
  margin-bottom: 4px;
}

.ah-field-input {
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.ah-field-input::placeholder {
  color: #999;
  font-weight: 400;
}

.ah-field-select-wrap {
  position: relative;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  flex: 1 1 auto;
}

.ah-field-select-wrap:hover {
  border-color: var(--agoda-blue);
}

.ah-field-select-wrap--specialty {
  /* mobile: full width like other fields */
  flex: 1 1 auto;
  width: 100%;
}

@media (min-width: 1024px) {
  .ah-field-select-wrap {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    border-radius: 0;
    border-right-width: 0;
  }
  /* Specialty: compact fixed width so city/keyword keeps the room */
  .ah-field-select-wrap--specialty {
    flex: 0 0 148px;
    width: 148px;
    min-width: 148px;
    max-width: 148px;
  }
  .ah-field-select-wrap--grow {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

/* Hide br helper on small screens for hero title */
.ah-br-sm {
  display: none;
}

@media (min-width: 640px) {
  .ah-br-sm {
    display: block;
  }
}

.ah-field-select-wrap .ah-field-label {
  position: absolute;
  left: 16px;
  top: 8px;
  z-index: 1;
  pointer-events: none;
  margin: 0;
}

.ah-field-select {
  width: 100%;
  max-width: 100%;
  min-height: 56px;
  padding: 20px 32px 8px 14px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  appearance: none;
  cursor: pointer;
  outline: none;
  border-radius: 6px;
  /* Prevent long option labels from expanding the fixed-width specialty field */
  text-overflow: ellipsis;
}

.ah-field-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  pointer-events: none;
  font-size: 12px;
}

.ah-search-submit {
  min-height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 6px;
  background: var(--agoda-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  flex-shrink: 0;
}

.ah-search-submit:hover {
  opacity: 0.95;
}

@media (min-width: 1024px) {
  .ah-search-submit {
    border-radius: 0 6px 6px 0;
    padding: 0 40px;
  }
}

.ah-search-submit i {
  margin-right: 6px;
}

/* Teletherapy state field (hidden by default) */
.ah-state-field {
  display: none;
}

.dir-place-suggest {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 2px);
  z-index: 80;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  max-height: 280px;
  overflow: auto;
}

.dir-place-suggest button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--text);
}

.dir-place-suggest button strong {
  font-weight: 650;
}

.dir-place-suggest button span {
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

.dir-place-suggest button:hover,
.dir-place-suggest button.is-active {
  background: #f0f6ff;
}

.ah-search-card.is-teletherapy .ah-location-field {
  display: none;
}

.ah-search-card.is-teletherapy .ah-state-field {
  display: flex;
}

@media (min-width: 1024px) {
  .ah-search-card.is-teletherapy .ah-state-field {
    flex: 1.15 1 0;
  }
}


/* On marketing pages, nest under a section with padding */
.tj-search-section {
  padding: 0 0 3rem;
  margin-top: -1.5rem;
  position: relative;
  z-index: 5;
}
.tj-search-section .container {
  max-width: 1100px;
}
.tj-search-section .ah-search-card {
  margin-top: 0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
.tj-search-section .ah-trust {
  margin-top: 1rem;
  justify-content: flex-start;
}
.tj-search-section .ah-trust-chip {
  color: var(--tj-slate, #64748b);
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}
