/* ============================================
   GET QUOTE SECTION STYLES
   ============================================ */

/* Section Container */
.get-quote-section {
  position: relative;
  padding: 80px 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  overflow: hidden;
}

/* Main Container */
.get-quote-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   SECTION HEADER
   ============================================ */

.quote-header {
  text-align: center;
  margin-bottom: 40px;
}

/* Header Label */
.header-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
}

.label-icon {
  font-size: 18px;
}

.label-text {
  color: #f5a524;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Section Title */
.section-title {
  color: #1a1d2e;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

/* ============================================
   INSURANCE TABS
   ============================================ */

.insurance-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.tab-button {
  padding: 14px 32px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  color: #6b7280;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;

  display: inline-flex; /* ✅ centers content and ensures hover area */
  align-items: center;
  justify-content: center;
}

.tab-button:hover {
  border-color: #f5a524;
  color: #f5a524;
  background: #fff9f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 165, 36, 0.2);
}

.tab-button.active {
  background: linear-gradient(90deg, #1e3a8a, #facc15);
  border-color: #f5a524;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(245, 165, 36, 0.3);
}

.tab-button:focus {
  outline: 2px solid #f5a524;
  outline-offset: 2px;
}

/* ============================================
   QUOTE CONTENT LAYOUT
   ============================================ */

.quote-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

/* ============================================
   FORM WRAPPER & CARD
   ============================================ */

.quote-form-wrapper {
  position: relative;
}

.quote-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.quote-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
}

/* ============================================
   FORM STYLES
   ============================================ */

.insurance-quote-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form Group */
.form-group {
  position: relative;
}

.form-group.focused .form-input,
.form-group.focused .form-select {
  border-color: #f5a524;
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.1);
}

/* Form Inputs */
.form-input,
.form-select {
  width: 100%;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  color: #1a1d2e;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #f5a524;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(245, 165, 36, 0.1);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  padding-right: 50px;
}

.form-select option {
  padding: 10px;
}

/* ============================================
   RANGE SLIDER
   ============================================ */

/* ============================================
   RANGE SLIDER (UPDATED FOR CENTERING)
   ============================================ */

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%; /* Ensure full width usage */
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: #1a1d2e;
  font-weight: 500;
}

.slider-value {
  color: #f5a524;
  font-size: 18px;
  font-weight: 700;
}

/* --- UPDATED WRAPPER --- */
.slider-wrapper {
  position: relative;
  height: 8px;
  width: 100%; /* Force wrapper to fill available space */
  display: flex; /* Helps alignment */
  align-items: center; /* Centers the track vertically */
}

/* --- UPDATED TRACK --- */
.slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  z-index: 1;
}

/* --- UPDATED PROGRESS --- */
.slider-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #1e3a8a, #facc15);
  border-radius: 10px;
  transition: width 0.1s ease;
  z-index: 2; /* Sit on top of the track */
}

/* --- UPDATED INPUT --- */
.range-slider {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%); /* Centers the input on top of the track */
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  z-index: 3; /* Highest z-index to capture clicks */
  cursor: pointer;
  margin: 0; /* Reset any default browser margins */
}

/* Webkit (Chrome, Safari, Edge) */
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: linear-gradient(90deg, #1e3a8a, #facc15);
  border: 4px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 165, 36, 0.4);
  transition: all 0.3s ease;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(245, 165, 36, 0.6);
}

.range-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

/* Firefox */
.range-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #f5a524;
  border: 4px solid #ffffff;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 165, 36, 0.4);
  transition: all 0.3s ease;
}

.range-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 6px 16px rgba(245, 165, 36, 0.6);
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.submit-button {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(90deg, #1e3a8a, #facc15);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(245, 165, 36, 0.3);
  margin-top: 10px;
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 165, 36, 0.4);
  background: linear-gradient(135deg, #363430 0%, #8b8273 100%);
}

.submit-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(245, 165, 36, 0.3);
}

.submit-button:focus {
  outline: 2px solid #f5a524;
  outline-offset: 2px;
}

/* ============================================
   IMAGE SECTION
   ============================================ */

.quote-image-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.image-container {
  position: relative;
  width: 100%;
  height: 400px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  z-index: 1;
  pointer-events: none;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 0.5s ease,
    opacity 0.3s ease;
  opacity: 1;
}

.image-container:hover img {
  transform: scale(1.05);
}

/* Image Loading State */
.image-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  z-index: 10;
}

.image-container.loading .image-loading {
  opacity: 1;
  visibility: visible;
}

/* Loading Spinner */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(245, 165, 36, 0.2);
  border-top-color: #f5a524;
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* Image Description */
.image-description {
  padding: 0 10px;
}

.image-description p {
  color: #6b7280;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  transition: opacity 0.3s ease;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Tablets */
@media (max-width: 1200px) {
  .section-title {
    font-size: 42px;
  }

  .quote-content {
    gap: 40px;
  }

  .quote-card {
    padding: 35px;
  }
}

/* Tablets */
@media (max-width: 992px) {
  .quote-content {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .section-title {
    font-size: 38px;
  }

  .insurance-tabs {
    gap: 10px;
  }

  .tab-button {
    padding: 12px 24px;
    font-size: 15px;
  }

  .image-container {
    height: 350px;
  }
}

/* Mobile Landscape */
@media (max-width: 768px) {
  .get-quote-section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .insurance-tabs {
    gap: 8px;
  }

  .tab-button {
    padding: 10px 20px;
    font-size: 14px;
  }

  .quote-card {
    padding: 30px 25px;
  }

  .form-input,
  .form-select {
    padding: 14px 18px;
    font-size: 14px;
  }

  .submit-button {
    padding: 16px 28px;
    font-size: 15px;
  }

  .image-container {
    height: 300px;
  }
}

/* Mobile Portrait */
@media (max-width: 576px) {
  .get-quote-section {
    padding: 40px 0;
  }

  .get-quote-container {
    padding: 0 15px;
  }

  .section-title {
    font-size: 28px;
  }

  .section-title br {
    display: none;
  }

  .insurance-tabs {
    flex-direction: column;
    gap: 10px;
  }

  .tab-button {
    width: 100%;
    padding: 12px 24px;
  }

  .quote-card {
    padding: 25px 20px;
    border-radius: 15px;
  }

  .insurance-quote-form {
    gap: 15px;
  }

  .form-input,
  .form-select {
    padding: 12px 16px;
  }

  .slider-label {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .image-container {
    height: 250px;
  }

  .image-description p {
    font-size: 14px;
  }
}

/* Extra Small Mobile */
@media (max-width: 400px) {
  .section-title {
    font-size: 24px;
  }

  .quote-card {
    padding: 20px 15px;
  }

  .form-input,
  .form-select {
    font-size: 13px;
  }

  .submit-button {
    padding: 14px 24px;
    font-size: 14px;
  }

  .image-container {
    height: 220px;
  }
}

/* ============================================
   LOADING & DISABLED STATES
   ============================================ */

.submit-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.submit-button.loading {
  position: relative;
  color: transparent;
}

.submit-button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   VALIDATION STYLES
   ============================================ */

.form-input:invalid:not(:placeholder-shown),
.form-select:invalid:not(:placeholder-shown) {
  border-color: #ef4444;
}

.form-input:valid:not(:placeholder-shown),
.form-select:valid {
  border-color: #10b981;
}

/* Error Message */
.error-message {
  color: #ef4444;
  font-size: 13px;
  margin-top: 5px;
  display: none;
}

.form-group.error .error-message {
  display: block;
}

.form-group.error .form-input,
.form-group.error .form-select {
  border-color: #ef4444;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Visible */
.tab-button:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.submit-button:focus-visible {
  outline: 2px solid #f5a524;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .tab-button,
  .quote-card,
  .form-input,
  .form-select,
  .submit-button,
  .image-container img,
  .range-slider::-webkit-slider-thumb,
  .range-slider::-moz-range-thumb {
    transition: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .tab-button {
    border-width: 3px;
  }

  .form-input,
  .form-select {
    border-width: 3px;
  }

  .submit-button {
    border: 3px solid #000000;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .get-quote-section {
    background: white;
    padding: 20px 0;
  }

  .tab-button,
  .submit-button {
    border: 1px solid #000000;
  }

  .image-container {
    page-break-inside: avoid;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.no-scroll {
  overflow: hidden;
}
