/* RFQ STYLES */
a,
button {
  font-family: inherit;
}

.loading {
  text-align: center;
  color: #666;
  padding: 40px;
  font-style: italic;
  display: block;
}

.loading.hidden {
  display: none;
}

.error-message {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  color: #c53030;
}

.error-message strong {
  display: block;
  margin-bottom: 5px;
}

.rfq-config {
  @media (min-width: 1024px) {
    width: 70%;
  }
}

/* Option Buttons Styles */
.options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  @media (min-width: 1024px) {
    gap: 8px;
  }
}

.option-button {
  border: 1px solid #cac8bc;
  display: flex;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 450;
  cursor: pointer;
  color: #fff;
  flex-direction: row;
  gap: 4px;
  justify-content: center;
  align-items: center;
  background: transparent;

  &:hover {
    background: #eddebe;
    color: #000;

    .option-price {
      color: #0c6b08;
    }
  }

  &.active {
    background: #eddebe;
    color: #000;

    .option-price {
      color: #0c6b08;
    }
  }
}

.option-price {
  display: block;
  font-size: 12px;
  line-height: calc(1.25 / 0.875);
  font-weight: 600;
  margin-top: 2px;
  color: #18a203;
}

/* Sidebar Styles */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;

  @media (min-width: 1024px) {
    position: sticky;
    top: 120px;
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
  }
}

.hidden {
  display: none !important;
}

#content {
  display: none;
  flex-direction: column;
  gap: 20px;
  padding: 0 12px;

  @media (min-width: 1024px) {
    flex-direction: row;
  }
}

#content:not(.hidden) {
  display: flex;
}

/* NEW STYLES */
.rfq-config {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rqf-config-group {
  color: #fff;
  background: #101010;
  padding: 16px;
  border-radius: 16px;

  @media (min-width: 64rem) {
    padding: 24px;
  }
}

/* Ensure containers are hidden until populated */
#rfq-config--slider:empty,
#rfq-config--others:empty,
#rfq-config--addons:empty {
  display: none;
}

.rqf-config-group-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.rqf-config-group-item {
  /* margin-bottom: 8px; */
}

.rqf-config-group-divider {
  height: 1px;
  width: 100%;
  background: #202020;
  margin: 16px 0;

  @media (min-width: 64rem) {
    margin: 20px 0 12px 0;
  }
}

.rqf-config-group-item-title {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: 8px;
}

/* Custom Slider Component */
.custom-slider {
  position: relative;
  padding-top: 65px;
  padding-bottom: 0;
  user-select: none;
}

.slider-bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  color: #000;

  @media (min-width: 1024px) {
    padding: 8px 16px;
  }
}

.slider-bubble::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.slider-bubble--free {
  background: #e8a955;
}

.slider-bubble--free::after {
  border-top: 6px solid #e8a955;
}

.slider-bubble--paid {
  background: #718863;
  color: #fff;
}

.slider-bubble--paid::after {
  border-top: 6px solid #718863;
}

.bubble-value {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
}

.bubble-price {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 2px;
}

.slider-track-wrapper {
  position: relative;
  height: 16px;
}

.slider-track {
  position: absolute;
  inset: 0;
  height: 16px;
  border-radius: 9999px;
  overflow: hidden;
  cursor: pointer;
  background: #8b8b8b;
  margin-top: 3.5px;
}

.track-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 9999px 0 0 9999px;
  pointer-events: none;
}

.track-fill--free {
  background: #e8a955;
}

.track-fill--paid {
  background: linear-gradient(to right, #e8a955 var(--free-percent), #718863 var(--free-percent));
}

.track-paid-zone {
  position: absolute;
  top: 0;
  height: 100%;
  background: #93ab85;
  pointer-events: none;
}

.track-locked-zone {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  background: #6b6b6b;
  border-radius: 0 9999px 9999px 0;
  pointer-events: none;
}

.track-marker {
  position: absolute;
  top: 0;
  width: 3px;
  height: 100%;
  background: black;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

/* Native range input styling */
.slider-native-input {
  position: absolute;
  /* Extend width by thumb size and offset to align thumb with track edges */
  width: calc(100% + 24px);
  height: 100%;
  top: 0;
  left: -12px;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  z-index: 10;
}

.slider-native-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--thumb-color, #e8a955);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: grab;
  border: none;
  transition: transform 0.1s ease;
}

.slider-native-input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.slider-native-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--thumb-color, #e8a955);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  cursor: grab;
  border: none;
  transition: transform 0.1s ease;
}

.slider-native-input::-moz-range-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.slider-native-input::-webkit-slider-runnable-track {
  height: 16px;
  background: transparent;
  border-radius: 9999px;
}

.slider-native-input::-moz-range-track {
  height: 16px;
  background: transparent;
  border-radius: 9999px;
}

.slider-native-input:focus {
  outline: none;
}

.slider-native-input:focus::-webkit-slider-thumb {
  /* box-shadow: 0 0 0 3px rgba(232, 169, 85, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3); */
}

.slider-native-input:focus::-moz-range-thumb {
  /* box-shadow: 0 0 0 3px rgba(232, 169, 85, 0.3), 0 2px 4px rgba(0, 0, 0, 0.3); */
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 14px;
  color: #888;
}

/* Summary Styles */
.rfq-summary {
  color: #000;
  padding: 16px;
  background: #ffffff;
  width: 100%;
  border-radius: 16px;

  @media (min-width: 64rem) {
    padding: 24px;
  }
}

.rfq-summary-title {
  font-weight: 600;
  font-size: 20px;
  line-height: calc(1.75 / 1.25);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rfq-summary-title-badge {
  display: inline-flex;
  margin-left: 4px;
  font-size: 14px;
  line-height: calc(1.25 / 0.875);
  border-radius: 20px;
  gap: 4px;
  padding-right: 4px;
  align-items: center;
  font-weight: 600;
  background: #eddebe;
}

.rfq-summary-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: space-between;
  font-weight: 500;
  line-height: 1.5;
  font-size: 16px;

  .label {
    color: #363636;
  }

  .value {
    font-weight: 600;
    /* color: #000; */
    text-wrap: nowrap;
  }
}

.rfq-summary-price {
    margin-top: 16px;

  .value {
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
  }

  .installments {
    font-size: 16px;
    line-height: 1.5;
  }
}

.rfq-summary-cta a,
.rfq-button {
  margin-top: 16px;
  height: 48px;
  cursor: pointer;
  border: none;
  font-size: 18px;
  line-height: calc(1.75 / 1.125);
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #2a7b9b, #55c486, #ed903f 0%, #f50);
  border-radius: 3.40282e38px;
  justify-content: center;
  text-decoration: none;
  align-items: center;
  display: flex;
}

.rfq-summary-divider {
  background-color: #cdcdcd;
  height: 1px;
  margin: 12px 0;
}

/* Paywall Modal Styles */
.paywall-overlay {
  /* position: fixed; */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* background: rgba(0, 0, 0, 0.7); */
  backdrop-filter: blur(4px);
  display: none;
  /* align-items: center; */
  /* justify-content: center; */
  z-index: 10000;
  padding: 20px;
}

.paywall-overlay:not(.hidden) {
  display: flex;
}

.paywall-overlay.hidden {
  display: none !important;
}

.paywall-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 800px;
  width: 100%;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);

  @media (max-width: 768px) {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 24px;
  }
}

.paywall-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paywall-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  color: #000;
  margin: 0;
}

.paywall-description {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  margin: 0;
}

.paywall-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.paywall-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paywall-input-label {
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

.paywall-input {
  border: none;
  border-bottom: 1px solid #cac8bc;
  padding: 8px 0;
  font-size: 16px;
  font-family: inherit;
  background: transparent;
  color: #000;
  outline: none;
  transition: border-color 0.2s;
}

.paywall-input:focus {
  border-bottom-color: #f50;
}

.paywall-input::placeholder {
  color: #999;
}

/* Floating summary - bottom bar on mobile */
.rfq-floating-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  display: block;
  transform: translateY(0);
  transition: transform 0.3s ease-in-out;

  @media (min-width: 1024px) {
    display: none;
  }
}

.rfq-floating-summary--collapsed {
  transform: translateY(100%);
  pointer-events: none;
}

.rfq-floating-summary.hidden {
  display: none !important;
}

.rfq-floating-summary-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rfq-floating-summary-price {
  display: flex;
  flex-direction: column;
  gap: 2px;

  .value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: #000;
  }

  .installments {
    font-size: 14px;
    line-height: 1.3;
    color: #666;
  }
}

.rfq-floating-summary-cta {
  flex-shrink: 0;
  height: 44px;
  padding: 0 24px;
  cursor: pointer;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(90deg, #2a7b9b, #55c486, #ed903f 0%, #f50);
  border-radius: 3.40282e38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Prevent content from being obscured by floating bar on mobile */
@media (max-width: 1023px) {
  body.has-floating-summary {
    padding-bottom: 80px;
  }
}
