/* Harris "Text Us" widget. All classes are prefixed hf- so theme styles cannot collide. */

.hf-gf-hidden {
  position: absolute;
  left: -9999px;
  top: 0;
  opacity: 0;
  pointer-events: none;
}

.hf-widget-container {
  max-width: 600px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  transition: all 0.3s ease;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}
.hf-widget-container.hf-minimal {
  background: transparent;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
}
.hf-widget-container:not(.hf-minimal) {
  max-width: 400px;
  background: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  overflow: visible;
}
.hf-widget-container * { margin: 0; padding: 0; box-sizing: border-box; }

.hf-widget-header {
  background-color: #113643;
  color: white;
  padding: 1.25rem 3.5rem 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 12px 12px 0 0;
}
.hf-widget-header.hf-hidden { display: none; }
.hf-widget-close-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 4px;
}
.hf-widget-close-btn:hover { background-color: rgba(255,255,255,0.1); }
.hf-widget-close-btn:active { background-color: rgba(255,255,255,0.2); }
.hf-chat-icon { width: 36px; height: 32px; position: relative; }
.hf-chat-icon svg { width: 100%; height: 100%; }
.hf-header-text { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.hf-widget-content {
  background-color: #f3f4f6;
  padding: 2rem 1.75rem;
  min-height: 0px;
  transition: all 0.3s ease;
  border-radius: 0 0 12px 12px;
}
.hf-minimal .hf-widget-content { min-height: auto; padding: 0; background-color: transparent; }
.hf-widget-prescreen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: auto;
  padding: 0;
  background-color: transparent;
}

.hf-text-us-button {
  background-color: #2aa5DE;
  color: white;
  border: none;
  padding: 0.875rem 2rem;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(32,133,168,0.3);
}
.hf-text-us-button:hover {
  background-color: #1a6f8e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(32,133,168,0.4);
}
.hf-text-us-button:active { transform: translateY(0); }
.hf-text-us-icon { width: 20px; height: 20px; }

.hf-step-message {
  background-color: #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  color: #374151;
}
.hf-step-message p { font-size: 15px; color: #374151; line-height: 1.6; font-weight: 400; }
.hf-step-title { font-weight: 600; font-size: 16px; margin-bottom: 0.5rem; color: #111827; }
.hf-widget-form-group { margin-bottom: 1.5rem; }
.hf-widget-name-row { display: flex; gap: 1.25rem; margin-bottom: 1.5rem; }
.hf-widget-name-row .hf-widget-form-group { flex: 1; margin-bottom: 0; }
.hf-widget-form-label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 0.5rem; }
.hf-mt-lg { margin-top: 1.5rem !important; }
.hf-mt-md { margin-top: 1rem !important; }

/* Input resets: scoped tightly so WordPress theme styles can't win.
   font-size stays 16px at every breakpoint: iOS Safari zooms the page on
   focus for inputs smaller than 16px, which breaks the fixed-position widget. */
.hf-widget-container .hf-widget-form-input {
  width: 100% !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 2px solid #113643 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0.5rem 0 !important;
  font-size: 16px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: #111827 !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.hf-widget-container .hf-widget-form-input:focus {
  border-bottom-color: #2563eb !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}
.hf-widget-container .hf-widget-form-input::placeholder { color: #9ca3af !important; }

.hf-widget-radio-group { display: flex; gap: 2rem; margin-top: 0.75rem; }
.hf-widget-radio-item { display: flex; align-items: center; gap: 0.5rem; }
.hf-widget-container .hf-widget-radio-input {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  border: 2px solid #374151 !important;
  border-radius: 50% !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  position: relative !important;
  cursor: pointer !important;
  background: white !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.hf-widget-container .hf-widget-radio-input:checked {
  background-color: #113643 !important;
  border-color: #113643 !important;
}
.hf-widget-container .hf-widget-radio-input:checked::after {
  content: "";
  width: 6px;
  height: 6px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.hf-widget-radio-label { font-size: 15px; font-weight: 500; cursor: pointer; color: #374151; }

.hf-widget-select-wrapper { position: relative; }
.hf-widget-container .hf-widget-select-field {
  width: 100% !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 2px solid #113643 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0.5rem 1.5rem 0.5rem 0 !important;
  font-size: 16px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: #111827 !important;
  cursor: pointer !important;
  outline: none !important;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hf-widget-select-field::after {
  content: "\25BC";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #6b7280;
}
.hf-widget-container .hf-widget-select-field.hf-placeholder { color: #6b7280 !important; font-weight: 400 !important; }
.hf-widget-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 100;
  display: none;
  overflow: hidden;
}
.hf-widget-dropdown-menu.hf-show { display: block; }
.hf-widget-dropdown-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-size: 15px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  user-select: none;
}
.hf-widget-dropdown-option:last-child { border-bottom: none; }
.hf-widget-dropdown-option:hover { background-color: #f9fafb; }
.hf-widget-dropdown-option::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 4px;
  flex-shrink: 0;
  transition: background-color 0.15s, border-color 0.15s;
}
.hf-widget-dropdown-option.hf-selected::before {
  background-color: #113643;
  border-color: #113643;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 8px;
}

.hf-widget-agency-wrapper { position: relative; }
.hf-widget-agency-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 100;
  display: none;
  overflow-y: auto;
  max-height: 210px;
}
.hf-widget-agency-dropdown.hf-show { display: block; }
.hf-widget-agency-option {
  padding: 0.875rem 1rem;
  cursor: pointer;
  font-size: 15px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}
.hf-widget-agency-option:last-child { border-bottom: none; }
.hf-widget-agency-option:hover { background-color: #f9fafb; }
.hf-widget-agency-option--other {
  color: #6b7280;
  font-style: italic;
  border-top: 1px solid #e5e7eb;
}
.hf-widget-agency-option--other:hover { color: #111827; }

.hf-widget-disclaimer {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  margin: 2rem 0 1.5rem 0;
}
.hf-widget-btn-primary {
  width: 100%;
  background-color: #2aa5DE;
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
  letter-spacing: -0.01em;
}
.hf-widget-btn-primary:hover { background-color: #1a6f8e; }
.hf-widget-btn-primary:disabled { background-color: #94a3b8; cursor: not-allowed; }
.hf-widget-screen { display: none; }
.hf-widget-screen.hf-active { display: block; }
.hf-widget-prescreen.hf-active { display: flex; }

@media (max-width: 768px) {
  .hf-widget-container:not(.hf-minimal) { max-width: 380px; }
  .hf-widget-header { padding: 1rem 3.25rem 1rem 1.25rem; }
  .hf-header-text { font-size: 15px; }
  .hf-widget-content { padding: 1.5rem 1.25rem; }
  .hf-step-message p { font-size: 14px; }
  .hf-text-us-button { padding: 0.75rem 1.75rem; font-size: 15px; }
}
@media (max-width: 480px) {
  .hf-widget-container { right: 10px; bottom: 10px; }
  .hf-widget-container:not(.hf-minimal) { max-width: calc(100% - 20px); border-radius: 8px; }
  .hf-widget-close-btn { right: 0.75rem; width: 28px; height: 28px; font-size: 22px; }
  .hf-widget-header { padding: 0.875rem 3rem 0.875rem 1rem; border-radius: 8px 8px 0 0; }
  .hf-chat-icon { width: 30px; height: 26px; }
  .hf-header-text { font-size: 14px; }
  .hf-widget-content { padding: 1.25rem 1rem; border-radius: 0 0 8px 8px; }
  .hf-step-message { padding: 1rem; margin-bottom: 1.5rem; }
  .hf-step-message p { font-size: 13px; }
  .hf-step-title { font-size: 15px; }
  .hf-text-us-button { padding: 0.75rem 1.5rem; font-size: 14px; gap: 0.5rem; }
  .hf-widget-name-row { gap: 0.875rem; }
  .hf-widget-form-group { margin-bottom: 1.25rem; }
  .hf-widget-form-label { font-size: 13px; }
  .hf-widget-radio-group { gap: 1.5rem; }
  .hf-widget-radio-label { font-size: 14px; }
  .hf-widget-btn-primary { padding: 0.75rem; font-size: 15px; }
  .hf-widget-disclaimer { font-size: 11px; margin: 1.5rem 0 1rem 0; }
}
@media (max-width: 360px) {
  .hf-widget-header { padding: 0.75rem 2.75rem 0.75rem 0.875rem; }
  .hf-header-text { font-size: 13px; }
  .hf-widget-content { padding: 1rem 0.875rem; }
  .hf-widget-name-row { flex-direction: column; gap: 1.25rem; }
  .hf-widget-radio-group { flex-direction: column; gap: 0.75rem; }
}
