/* ==========================================================================
   Terminix 2025 UI Kit - Design System Foundation
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - Terminix 2025 UI Kit */
  --color-primary-dark: #1a8a40;
  /* Darker shade of Terminix green */
  --color-primary-light: #4db370;
  /* Lighter shade of Terminix green */

  --color-secondary: #F7D008;
  /* Sunlight */

  --color-night-sky: #0D2640;
  /* Night sky - for dark text/headers */
  --color-moss: #DBDFCC;
  /* Moss - for subtle backgrounds */
  --color-cloud: #F2F2F3;
  /* Cloud - for light backgrounds */
  --color-white: #FFFFFF;
  /* White */
  /* Semantic color mappings */
  --color-text-primary: #0D2640;
  /* Night sky for primary text */
  --color-text-secondary: #525252;
  /* Medium gray for secondary text */
  --color-text-muted: #737373;
  /* Light gray for muted text */

  --color-background-secondary: #F2F2F3;
  /* Cloud for secondary backgrounds */
  --color-background-subtle: #DBDFCC;
  /* Moss for subtle backgrounds */

  --color-warning: #F7D008;
  /* Use sunlight for warnings */

  /* Spacing - To be updated with Figma specifications */
  --spacing-0: 0;
  --spacing-1: 0.25rem;
  /* 4px */
  --spacing-2: 0.5rem;
  /* 8px */
  --spacing-3: 0.75rem;
  /* 12px */
  --spacing-4: 1rem;
  /* 16px */
  --spacing-5: 1.25rem;
  /* 20px */
  --spacing-6: 1.5rem;
  /* 24px */
  --spacing-8: 2rem;
  /* 32px */
  --spacing-10: 2.5rem;
  /* 40px */
  --spacing-12: 3rem;
  /* 48px */
  --spacing-16: 4rem;
  /* 64px */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.25s ease-in-out;
  --transition-slow: 0.3s ease-in-out;
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-panel: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Typography Components - Gibson Font Specifications
   ========================================================================== */

/* Body Text - Mobile */
p,
.text-body {
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 22px;
  color: #0D2640;
  margin-bottom: var(--spacing-4);
}

/* Testimonial/Quote Text - Mobile */
.testimonial,
.quote {
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #0D2640;
  margin-bottom: var(--spacing-4);
}

.text-small {
  font-size: 12px;
  line-height: 18px;
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

/* Desktop Typography Overrides */
@media (min-width: 768px) {

  p,
  .text-body {
    font-size: 16px;
    line-height: 24px;
  }

  .testimonial,
  .quote {
    font-size: 18px;
    line-height: 26px;
  }
}

/* Apply panel styling to Bootstrap cards when using new design */
.migrating-to-new-design .card.panel-style {
  background-color: var(--color-white);
  border: none;
  box-shadow: var(--shadow-panel);
  border-left: 4px solid var(--color-secondary);
  margin-bottom: var(--spacing-4);
}

  .migrating-to-new-design .card.panel-style .card-body {
    padding: var(--spacing-8) var(--spacing-6);
  }

/* ==========================================================================
   Component Migration Helpers - Terminix 2025 UI Kit
   ========================================================================== */

/* These classes help transition from old to new design system */

/* Update existing .btn-callout to match new primary button style */
.migrating-to-new-design .btn-callout {
  background-color: var(--color-white);
  border: 2px solid var(--color-terminix-green);
  color: var(--color-terminix-green);
  border-radius: 9001px;
  /* Fully rounded - pill shaped */
  text-transform: none;
  min-height: 36px;
  /* Reduced height to match UI Kit */
  padding: var(--spacing-2) var(--spacing-5);
  /* Reduced padding */
  transition: all var(--transition-base);
}

  .migrating-to-new-design .btn-callout:hover {
    background-color: var(--color-terminix-green);
    border-color: var(--color-terminix-green);
    color: var(--color-white);
  }

.migrating-to-new-design .form-group {
  margin-bottom: 1rem;
  position: relative;
}

  /* Temporarily show labels above inputs with reduced styling until we can update HTML structure */
  .migrating-to-new-design .form-group label.control-label {
    display: block;
    margin-bottom: var(--spacing-2);
    color: var(--color-text-primary);
  }

/* Style placeholders for inputs that do have them */
.migrating-to-new-design .form-control::placeholder {
  color: var(--color-text-muted);
}

.migrating-to-new-design .form-control:focus::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* For new components, we can use the floating label approach */
.migrating-to-new-design .form-group.floating-labels {
  position: relative;
}

  .migrating-to-new-design .form-group.floating-labels label.control-label {
    position: absolute;
    left: var(--spacing-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    background-color: var(--color-white);
    padding: 0 var(--spacing-1);
    transition: all var(--transition-base);
    pointer-events: none;
    z-index: 1;
    margin-bottom: 0;
  }

  .migrating-to-new-design .form-group.floating-labels .form-control:focus ~ label.control-label,
  .migrating-to-new-design .form-group.floating-labels .form-control:not(:placeholder-shown) ~ label.control-label,
  .migrating-to-new-design .form-group.floating-labels.has-value label.control-label {
    top: 0;
    transform: translateY(-50%);
    color: var(--color-terminix-green);
  }

  .migrating-to-new-design .form-group.floating-labels .form-control::placeholder {
    color: transparent;
  }

.migrating-to-new-design select.form-control {
  background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'><path fill='%23666' d='m0 0 2 2 2-2z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  appearance: none;
}

.migrating-to-new-design textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Update validation error text styling */
.migrating-to-new-design .field-validation-error {
  color: var(--color-error);
  margin-top: var(--spacing-1);
}

/* JavaScript helper classes for dynamic placeholder management */
.migrating-to-new-design .form-control[data-placeholder] {
  /* Placeholder will be set via JavaScript using data-placeholder attribute */
}

/* For forms that need to maintain labels, provide floating label option */
.migrating-to-new-design .form-group.floating-label {
  position: relative;
}

  .migrating-to-new-design .form-group.floating-label label.control-label {
    display: block;
    position: absolute;
    left: var(--spacing-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    background-color: var(--color-white);
    padding: 0 var(--spacing-1);
    transition: all var(--transition-base);
    pointer-events: none;
    z-index: 1;
  }

  .migrating-to-new-design .form-group.floating-label .form-control:focus + label.control-label,
  .migrating-to-new-design .form-group.floating-label .form-control:not(:placeholder-shown) + label.control-label,
  .migrating-to-new-design .form-group.floating-label.has-value label.control-label {
    top: 0;
    transform: translateY(-50%);
    color: var(--color-terminix-green);
  }

.migrating-to-new-design .quicklinks .card-header {
  background-color: var(--color-cloud);
  color: var(--color-night-sky);
}