/* ==========================================
   MODERN FLEXBOX REFACTOR
   Same look, better responsiveness
   ========================================== */

body,
html {
  box-sizing: border-box;
  font-family: "Source Sans 3", sans-serif;
  width: 100%;
  margin: 0;
  padding: 0;
  color: var(--tenant-secondary, #0d2545);
  overflow-x: hidden;
}

html {
  height: 100%; /* Safari flexbox fix */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: -webkit-fill-available; /* Safari iOS fix - accounts for browser chrome */
}

* {
  box-sizing: border-box;
}

/* ==========================================
   MODERN CONTAINER - FLEXBOX BASED
   ========================================== */

.container,
.dashboard-container,
.offer-container,
.index-container,
.hiw-background-container {
  /* Clean white background */
  background: #ffffff;

  /* Modern flexbox approach - content grows naturally! */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  flex: 1; /* Allow natural growth and shrinking */
  width: 100%;
  padding: 0 20px;
  padding-top: 80px;
  padding-bottom: 80px;
  position: relative;
  margin: 0;
  overflow: hidden;
}

/* Animated grid pattern */
.container::before,
.dashboard-container::before,
.offer-container::before,
.index-container::before,
.hiw-background-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(31, 196, 176, 0.12) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 196, 176, 0.12) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridSlide 10s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* Gradient accent lines */
.container::after,
.dashboard-container::after,
.offer-container::after,
.index-container::after,
.hiw-background-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(31, 196, 176, 0.2) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(29, 101, 209, 0.2) 50%, transparent 100%);
  background-size: 200% 100%, 100% 200%;
  background-position: -100% 0%, 0% -100%;
  animation: accentLineHorizontal 8s ease-in-out infinite, accentLineVertical 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/* Grid slide animation */
@keyframes gridSlide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Horizontal accent line animation */
@keyframes accentLineHorizontal {
  0%, 100% {
    background-position: -100% 0%, 0% -100%;
  }
  50% {
    background-position: 200% 0%, 0% -100%;
  }
}

/* Vertical accent line animation */
@keyframes accentLineVertical {
  0%, 100% {
    background-position: -100% 0%, 0% -100%;
  }
  50% {
    background-position: -100% 0%, 0% 200%;
  }
}

/* ==========================================
   MODERN FORM PANEL - NO ABSOLUTE POSITIONING
   ========================================== */

.form-panel {
  /* Remove absolute positioning entirely! */
  position: relative;
  z-index: 10;

  /* Keep the same visual styling */
  background: white;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  border-radius: 15px;

  /* Fluid responsive width using modern CSS */
  width: 400px;
  max-width: min(400px, calc(100vw - 40px));
  padding: 30px 20px;
  margin: 0 auto;

  /* NO MORE: position: absolute, top: calc(...), left: 50%, transform: translate(-50%, 0) */
}

/* Simplify form variants - remove offset calculations */
.form-panel.form,
.form2,
.form3,
.form4,
.form5 {
  /* All use the same base styles now */
  height: auto;
}

.hiw {
  padding: 30px 20px;
}

.agreementLabel {
  width: 300px;
}

/* ==========================================
   FOOTER CONTAINER (unchanged)
   ========================================== */

.footer-container {
  background: linear-gradient(
    to right,
    var(--tenant-primary, #1FC4B0),
    var(--tenant-gradient, #1D65D1)
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  margin-top: auto;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  text-align: center;
}

.footer-links a {
  color: var(--tenant-secondary, #0d2545);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.footer-links a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.footer-separator {
  color: var(--tenant-secondary, #0d2545);
  opacity: 0.5;
  font-size: 16px;
}

.footer-copyright {
  color: var(--tenant-secondary, #0d2545);
  font-size: 13px;
  text-align: center;
}

.footer-text {
  color: var(--tenant-secondary, #0d2545);
  margin: auto;
  text-align: center;
}

/* ==========================================
   TYPOGRAPHY & LAYOUT (unchanged)
   ========================================== */

a:link {
  color: var(--tenant-secondary, #0d2545);
  background-color: transparent;
  text-decoration: none;
}

.index-header {
  padding: 20px 5px;
  padding-top: 5px;
  text-align: center;
  color: var(--tenant-secondary, #0d2545);
}

.index-footer {
  text-align: center;
  color: var(--tenant-secondary, #0d2545);
}

.header {
  padding: 10px 5px;
  padding-top: 5px;
  text-align: center;
  color: var(--tenant-secondary, #0d2545);
}

.header h1 {
  margin-bottom: 0px;
  font-weight: bolder;
  color: var(--tenant-secondary, #0d2545);
}

.bodyText {
  color: var(--tenant-secondary, #0d2545);
}

.sign-in-text {
  font-size: 13px;
}

.sign-in-text span {
  color: #b8b8b8;
}

.sign-in-text a {
  text-decoration: none;
  font-weight: bold;
  color: var(--tenant-secondary, #0d2545);
}

.body {
  padding: 0px 0px;
  width: 100%;
}

/* ==========================================
   FORM CONTROLS (unchanged)
   ========================================== */

.form-control-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.body .form-control {
  margin-bottom: 15px;
}

.body .form-control label {
  color: var(--tenant-secondary, #0d2545);
  font-weight: bold;
  font-size: 13px;
  display: block;
  padding-bottom: 5px;
}

.body .form-control input {
  display: block;
  border: none;
  border-radius: 4px;
  background: #eff7ff;
  padding: 15px;
  width: 100%;
  margin: auto;
}

.form-control label.required::after {
  content: " *";
  color: red;
}

.property-type-section {
  display: none;
}

.property-type-section.active {
  display: block;
}

/* Legacy footer styling - kept for compatibility */
.footer {
  position: absolute;
  top: 75%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 400px;
  padding: 30px 20px;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  margin-top: 25px;
  margin-bottom: 25px;
}

/* ==========================================
   BUTTONS (unchanged)
   ========================================== */

.footer-button {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--tenant-primary, #1FC4B0) 0%,
    var(--tenant-gradient, #1D65D1) 100%
  );
  border-radius: 4px;
  border: none;
  color: var(--tenant-secondary, #0d2545);
  text-align: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  font-weight: bolder;
  padding: 15px 20px;
  width: 100%;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 5px;
  letter-spacing: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.footer-button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  filter: brightness(0.95);
}

button {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--tenant-primary, #1FC4B0) 0%,
    var(--tenant-gradient, #1D65D1) 100%
  );
  border-radius: 4px;
  border: none;
  color: var(--tenant-secondary, #0d2545);
  text-align: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  font-weight: bolder;
  padding: 15px 20px;
  width: 100%;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  filter: brightness(0.95);
}

button:disabled {
  background: #d3d3d3;
  color: #888;
  cursor: not-allowed;
  opacity: 0.6;
}

button:disabled:hover {
  background: #d3d3d3;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: none;
  filter: none;
}

.g-recaptcha {
  display: flex;
  justify-content: center;
}

.forgot-password {
  align-items: center;
}

.forgot-password-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--tenant-secondary, #0d2545);
  font-weight: 500;
  padding: 10px 0;
  width: 100%;
  text-align: center;
  transition: opacity 0.2s ease;
}

.forgot-password-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.terms-agreement {
  font-size: 12px;
  text-align: center;
  color: var(--tenant-secondary, #0d2545);
  margin-top: 15px;
}

.terms-agreement a {
  color: var(--tenant-secondary, #0d2545);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.terms-agreement a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* ==========================================
   MODERN RESPONSIVE - SIMPLIFIED!
   NO MORE HARDCODED HEIGHTS!
   ========================================== */

/* Tablet and small desktop */
@media (max-width: 768px) {
  .form-panel {
    width: 340px;
    max-width: calc(100vw - 40px);
    padding: 25px 15px;
  }

  .index-container,
  .container,
  .dashboard-container,
  .offer-container,
  .hiw-background-container {
    padding: 0 15px;
    padding-top: 60px;
    padding-bottom: 30px;
  }

  .logo {
    width: 85px;
    max-width: 85%;
  }
}

/* Mobile portrait */
@media (max-width: 500px) {
  .form-panel {
    width: 300px;
    max-width: calc(100vw - 40px);
    padding: 25px 15px;
  }

  .index-container,
  .container,
  .dashboard-container,
  .offer-container,
  .hiw-background-container {
    padding: 0 15px;
    padding-top: 50px;
    padding-bottom: 25px;
  }

  .logo {
    width: 75px;
    max-width: 80%;
  }

  .watch-tutorial-button {
    width: 252px !important;
    max-width: 100% !important;
  }
}

/* Small mobile */
@media (max-width: 350px) {
  .form-panel {
    width: 275px;
    max-width: calc(100vw - 30px);
    padding: 20px 15px;
  }

  .logo {
    width: 65px;
    max-width: 75%;
  }

  .watch-tutorial-button {
    width: 227px !important;
    max-width: 100% !important;
  }
}

/* Landscape orientation */
@media (max-width: 1200px) and (orientation: landscape) {
  .form-panel {
    width: 340px;
    max-width: calc(100vw - 40px);
    padding: 25px 15px;
  }

  .index-container,
  .container,
  .dashboard-container,
  .offer-container,
  .hiw-background-container {
    padding: 0 20px;
    padding-top: 60px;
    padding-bottom: 30px;
  }

  .logo {
    width: 75px;
    max-width: 80%;
  }
}

/* ==========================================
   UTILITY CLASSES (unchanged)
   ========================================== */

.cash-offer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 400px;
  padding: 30px 20px;
  box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  margin-top: 25px;
  margin-bottom: 25px;
  text-align: center;
  color: var(--tenant-secondary, #0d2545);
}

.required:after {
  content: " *";
  color: red;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
}

.agreement-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  font-style: italic;
}

.information-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hr-line {
  width: 60%;
  margin: auto;
}

.hiw-page {
  color: var(--tenant-secondary, #0d2545);
  padding: 30px 0px;
  width: 60%;
  text-align: center;
  border: none;
  outline: none;
  margin: auto;
}

.hiw-body {
  color: var(--tenant-secondary, #0d2545);
  text-align: center;
}

.video-container {
  margin-top: 20px;
  text-align: center;
}

.highlighted-link {
  text-align: center;
  margin: 20px 0;
  font-size: 18px;
  font-weight: bold;
}

.highlighted-link a {
  color: #ff6600;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

.highlighted-link a:hover {
  color: #cc5500;
}

.watch-tutorial-button {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--tenant-primary, #1FC4B0) 0%,
    var(--tenant-gradient, #1D65D1) 100%
  );
  border-radius: 4px;
  border: none;
  color: var(--tenant-secondary, #0d2545);
  text-align: center;
  font-family: "Source Sans 3", sans-serif;
  font-size: 15px;
  font-weight: bolder;
  padding: 15px 20px;
  width: 352px;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1px;
  text-decoration: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.watch-tutorial-button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* Google Maps Place Picker Styling */
gmpx-place-picker {
  display: block;
  border: none;
  border-radius: 4px;
  background: #eff7ff;
  padding: 15px;
  width: 90%;
  margin: auto;
  font-family: "Source Sans 3", sans-serif;
}

gmpx-place-picker::part(input) {
  border: none;
  background: transparent;
  font-family: "Source Sans 3", sans-serif;
  font-size: 14px;
  color: var(--tenant-secondary, #0d2545);
}

gmpx-place-picker::part(input)::placeholder {
  color: #999;
}

/* Header Navigation Styles */
.header-nav-container {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.header-nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

/* Logo Styles */
.header-nav-container .header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.header-nav-container .logo-image {
  height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Desktop Navigation - Hidden on all screen sizes */
.header-nav-text {
  display: none;
}

/* Hamburger Menu - Visible on all screen sizes */
.header-nav-hamburger {
  display: block;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.header-nav-hamburger:hover {
  background-color: #f0f0f0;
}

.header-nav-hamburger i {
  font-size: 28px;
  color: var(--tenant-secondary, #0d2545);
}

/* Dropdown Menu - Available on all screen sizes */
.header-nav-mobile-menu {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-top: 1px solid #e5e7eb;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.header-nav-mobile-menu.active {
  max-height: 400px;
  padding: 10px 0;
}

.header-nav-mobile-menu a {
  color: var(--tenant-secondary, #0d2545);
  text-decoration: none;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.header-nav-mobile-menu a:hover {
  background-color: #f8f9fa;
}

.header-nav-mobile-menu a:last-child {
  border-bottom: none;
}

/* Responsive Styles for Header Nav */
@media screen and (max-width: 768px) {
  .header-nav-content {
    padding: 10px 15px;
  }

  .header-nav-container .logo-image {
    height: 55px;
  }

  .header-nav-hamburger i {
    font-size: 26px;
  }
}

@media screen and (max-width: 480px) {
  .header-nav-content {
    padding: 8px 12px;
  }

  .header-nav-container .logo-image {
    height: 45px;
  }

  .header-nav-hamburger i {
    font-size: 24px;
  }
}

/* ── Header Usage Indicators ── */
.header-usage-indicators {
  display: flex;
  align-items: center;
  gap: 8px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.usage-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f0f4f8;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.usage-pill i {
  font-size: 14px;
  color: #64748b;
  flex-shrink: 0;
}

.usage-pill.usage-warning {
  background: #fef9c3;
  border-color: #facc15;
  color: #854d0e;
}

.usage-pill.usage-warning i {
  color: #a16207;
}

.usage-pill.usage-depleted {
  background: #fecaca;
  border-color: #ef4444;
  color: #991b1b;
}

.usage-pill.usage-depleted i {
  color: #dc2626;
}

a.payment-failed-pill {
  text-decoration: none;
  cursor: pointer;
}

a.payment-failed-pill:hover {
  opacity: 0.85;
}

/* Dropdown usage summary — pill style */
.mobile-usage-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}

@media screen and (max-width: 480px) {
  .mobile-usage-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

.mobile-usage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f4f8;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.mobile-usage-pill i {
  font-size: 14px;
  color: #64748b;
  flex-shrink: 0;
}

.mobile-usage-pill.usage-warning {
  background: #fef9c3;
  border-color: #facc15;
  color: #854d0e;
}
.mobile-usage-pill.usage-warning i {
  color: #a16207;
}

.mobile-usage-pill.usage-depleted {
  background: #fecaca;
  border-color: #ef4444;
  color: #991b1b;
}
.mobile-usage-pill.usage-depleted i {
  color: #dc2626;
}

/* Responsive: tablet */
@media screen and (max-width: 768px) {
  .header-usage-indicators {
    gap: 5px;
  }

  .usage-pill {
    padding: 3px 8px;
    font-size: 11px;
    gap: 4px;
  }

  .usage-pill i {
    font-size: 13px;
  }
}

/* Responsive: small mobile — hide header pills, usage info in dropdown instead */
@media screen and (max-width: 480px) {
  .header-usage-indicators {
    display: none !important;
  }

  .usage-pill i {
    font-size: 15px;
  }
}

.logo {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100px;
  max-width: 90%;
  height: auto;
}

/* Offer Analysis Page */
.offer-summary {
  margin: 30px 0;
  padding: 25px;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid var(--tenant-secondary, #0d2545);
}

.offer-summary h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  color: var(--tenant-secondary, #0d2545);
}

.offer-summary p {
  margin: 8px 0 0 0;
  color: #6b7280;
  font-size: 16px;
}

/* Settings Page Styles */
.settings-group {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.settings-group h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--tenant-secondary, #0d2545);
}

.slider-control {
  margin-bottom: 20px;
}

.slider-control label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.slider-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.slider-wrapper input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #d3d3d3;
  outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tenant-primary, #1FC4B0);
  cursor: pointer;
}

.slider-wrapper input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tenant-primary, #1FC4B0);
  cursor: pointer;
  border: none;
}

.slider-value {
  min-width: 60px;
  text-align: right;
  font-weight: 600;
  color: var(--tenant-primary, #1FC4B0);
}

.input-control {
  margin-bottom: 20px;
}

.input-control label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.input-control input[type="number"],
.input-control input[type="text"] {
  max-width: 300px;
  display: block;
  border: none;
  border-radius: 4px;
  background: #eff7ff;
  padding: 15px;
  width: 100%;
  margin: auto;
}

#settings-message {
  margin-bottom: 15px;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 12px 20px;
  border-radius: 4px;
  font-weight: 500;
}

.resend-verification-btn {
  background: none;
  border: none;
  color: #721c24;
  text-decoration: underline;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  font-family: inherit;
  font-weight: 600;
}
.resend-verification-btn:hover {
  opacity: 0.7;
}

/* Dropdown Styling */
select {
    width: 100%;
    padding: 10px 40px 10px 12px;
    font-size: 14px;
    font-family: 'Source Sans 3', sans-serif;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select:hover {
    border-color: #bbb;
    background-color: #f9f9f9;
}

select:focus {
    outline: none;
    border-color: #1FC4B0;
    box-shadow: 0 0 0 3px rgba(31, 196, 176, 0.1);
    background-color: #fff;
}

select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

select option {
    padding: 10px;
    font-size: 14px;
}

/* Comparables Section - Shared Styling */
.comps-section {
    margin-top: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.comps-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.comps-header {
    background: #f8f9fa;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #dee2e6;
}

.comps-header:hover {
    background: #e9ecef;
}

.comps-toggle {
    font-size: 12px;
    transition: transform 0.2s;
}

.comps-title {
    font-weight: 600;
    flex: 1;
}

.comps-badge,
.comps-count {
    font-size: 13px;
    color: #6c757d;
}

.comps-content {
    padding: 16px;
}

.comps-table-wrapper {
    overflow-x: auto;
}

.comps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comps-table th {
    background: #f8f9fa;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.comps-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
}

.comps-table tr:last-child td {
    border-bottom: none;
}

.comps-table tr:hover {
    background: #f8f9fa;
}

.comp-address {
    min-width: 200px;
    max-width: 350px;
}

/* Export Button */
.comps-export-wrapper {
    text-align: center;
    padding: 16px;
    border-top: 1px solid #dee2e6;
}

.export-comps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1FC4B0 0%, #1D65D1 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: fit-content;
}

.export-comps-btn:hover {
    background: linear-gradient(135deg, #1BB09F 0%, #1850A8 100%);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.export-comps-btn i {
    font-size: 18px;
}

/* Export gating — disabled state */
.export-comps-btn.export-gated {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.export-gated-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

.export-gated-notice i {
    font-size: 14px;
    color: #94a3b8;
}

.export-gated-notice a {
    color: #1850A8;
    font-weight: 600;
    text-decoration: none;
}

.export-gated-notice a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .comps-table {
        font-size: 12px;
    }

    .comps-table th,
    .comps-table td {
        padding: 6px 8px;
    }
}

/* ===== Tooltip Components ===== */
/* Shared tooltip styles used across Propera pages (settings, property details, etc.) */

.info-icon {
    cursor: help;
    margin-left: 6px;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

.info-icon i {
    font-size: 18px;
    color: #1FC4B0;
    transition: color 0.2s ease;
}

.info-icon:hover i {
    color: #1BB09F;
}

.info-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    padding: 12px 16px;
    background: #333;
    color: white;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    width: 300px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.info-icon::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: calc(100% - 2px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
}

.info-icon:hover::after,
.info-icon:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Clickable info icon links (anchor elements) */
.info-icon.info-link {
    cursor: pointer;
    text-decoration: none;
}

/* Disable tooltip for clickable links (they navigate instead) */
.info-icon.info-link::after,
.info-icon.info-link::before {
    display: none;
}

/* Label with tooltip wrapper */
.label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 8px;
}

.label-with-tooltip label {
    margin-bottom: 0;
}

/* ========================================
   AI Rehab Analysis Component Styles
   ======================================== */

/* AI Analysis Results Section */
.ai-analysis-section {
    margin: 20px 0;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    background: #f8f9fa;
    overflow: hidden;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    cursor: pointer;
    transition: background 0.2s ease;
}

.ai-analysis-header:hover {
    background: linear-gradient(135deg, #e0f2fe 0%, #d0ebfd 100%);
}

.ai-analysis-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
    color: #0369a1;
}

.ai-analysis-title i {
    font-size: 20px;
    color: #1FC4B0;
}

#aiAnalysisToggle {
    font-size: 18px;
    color: #64748b;
    transition: transform 0.2s ease;
}

#aiAnalysisToggle.expanded {
    transform: rotate(180deg);
}

.ai-analysis-content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.ai-analysis-content.expanded {
    max-height: 2000px;
    padding: 18px;
}

.ai-analysis-item {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.ai-analysis-item:last-child {
    border-bottom: none;
}

.ai-analysis-item.overridden {
    background: #fffbeb;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #f59e0b;
    margin-bottom: 8px;
}

.ai-analysis-field {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.ai-analysis-field-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.ai-analysis-suggestion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.ai-analysis-suggestion.unknown {
    background: #f3f4f6;
    color: #6b7280;
}

.ai-analysis-confidence {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
}

.ai-analysis-confidence.high {
    background: #d1fae5;
    color: #065f46;
}

.ai-analysis-confidence.medium {
    background: #fef3c7;
    color: #92400e;
}

.ai-analysis-confidence.low {
    background: #fee2e2;
    color: #991b1b;
}

.ai-analysis-evidence {
    margin-top: 6px;
    padding: 8px 12px;
    background: white;
    border-left: 3px solid #1FC4B0;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    font-style: italic;
    line-height: 1.5;
}

/* User Override Indicator */
.ai-user-override {
    margin-top: 10px;
    padding: 10px 12px;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-user-override i {
    color: #f59e0b;
    font-size: 16px;
    flex-shrink: 0;
}

.ai-user-override span {
    font-size: 13px;
    color: #78350f;
    line-height: 1.5;
}

.ai-user-override strong {
    font-weight: 600;
}

/* Original Description Section */
.ai-original-description-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.ai-original-description-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.ai-original-description-header:hover {
    background: #f1f5f9;
}

.ai-original-description-header span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-original-description-header span i.ph-file-text {
    font-size: 18px;
}

.ai-original-description-header > i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.ai-original-description-header i.expanded {
    transform: rotate(180deg);
}

.ai-original-description-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 12px;
}

.ai-original-description-content.expanded {
    max-height: 500px;
    padding: 12px;
}

.ai-original-description-content {
    background: #f9fafb;
    border-left: 3px solid #94a3b8;
    border-radius: 4px;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    margin-top: 8px;
}

/* Mobile responsiveness for AI analysis badges */
@media (max-width: 768px) {
    .ai-analysis-field {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .ai-analysis-field-name {
        font-size: 13px;
        flex-shrink: 0;
        min-width: 0;
    }

    .ai-analysis-field > div {
        display: flex;
        flex-wrap: nowrap;
        gap: 4px;
        align-items: center;
        flex-shrink: 1;
        min-width: 0;
    }

    .ai-analysis-suggestion {
        font-size: 11px;
        padding: 3px 6px;
        white-space: nowrap;
        flex-shrink: 1;
    }

    .ai-analysis-confidence {
        font-size: 10px;
        padding: 2px 5px;
        margin-left: 0;
        white-space: nowrap;
        flex-shrink: 1;
    }

    .ai-analysis-evidence {
        font-size: 12px;
        padding: 6px 10px;
    }

    .ai-user-override {
        font-size: 12px;
        padding: 8px 10px;
    }

    .ai-user-override span {
        font-size: 12px;
    }

    .ai-original-description-header {
        font-size: 13px;
        padding: 8px 10px;
    }

    .ai-original-description-content {
        font-size: 13px;
    }
}

/* Error Page Styles */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.error-content {
    text-align: center;
    max-width: 600px;
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.error-code {
    font-size: 96px;
    font-weight: 600;
    margin: 0;
    color: var(--tenant-primary, #1FC4B0);
    line-height: 1;
}

.error-title {
    font-size: 32px;
    font-weight: 600;
    margin: 20px 0 16px;
    color: var(--tenant-secondary, #0d2545);
}

.error-message {
    font-size: 18px;
    color: #64748b;
    margin: 0 0 40px;
    line-height: 1.6;
}

.error-page .btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: white;
    background: var(--tenant-primary, #1FC4B0);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.error-page .btn:hover {
    background: var(--tenant-gradient, #1D65D1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 120, 4, 0.3);
}
