/* Feedback Modal Windows */
.real-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 10, 22, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  overflow-y: auto;
  padding: 40px 0;
}

.real-modal.active {
  opacity: 1;
  visibility: visible;
}

.real-modal-container {
  background: #152537;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 36px;
  width: 90%;
  max-width: 500px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(-20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}

.real-modal.active .real-modal-container {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: var(--transition-fast);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.modal-close-btn:hover {
  color: var(--text-white);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: 8px;
  color: var(--text-white);
  text-align: center;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-light-blue);
  margin-bottom: 24px;
  text-align: center;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper.conditional-field {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-top: -14px !important;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-wrapper.conditional-field.show {
  max-height: 120px;
  opacity: 1;
  pointer-events: auto;
  margin-top: 0 !important;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transition: var(--transition-fast);
}

.input-icon.telegram-icon {
  fill: var(--text-muted);
  stroke: none;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  padding-left: 46px;
  background: rgba(6, 23, 48, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.input-field::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.input-field:focus {
  border-color: var(--accent-cyan);
  background: rgba(6, 23, 48, 0.8);
  box-shadow: 0 0 12px rgba(97, 117, 162, 0.15);
}

.input-field:focus + .input-icon {
  stroke: var(--accent-cyan);
}

.input-field:focus + .input-icon.telegram-icon {
  fill: var(--accent-cyan);
  stroke: none;
}

.input-wrapper.is-error .input-field {
  border-color: var(--color-error) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.1) !important;
  padding-right: 46px !important;
}
.input-wrapper.is-error .input-icon {
  stroke: var(--color-error) !important;
}
.input-wrapper.is-error .input-icon.telegram-icon {
  fill: var(--color-error) !important;
  stroke: none !important;
}

.input-wrapper.is-error .phone-input-group {
  border-color: var(--color-error) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.1) !important;
}
.input-wrapper.is-error .phone-number-input {
  padding-right: 46px !important;
}

.custom-select-wrapper.is-error .custom-select-trigger {
  border-color: var(--color-error) !important;
  background: rgba(239, 68, 68, 0.05) !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.1) !important;
}
.custom-select-wrapper.is-error .custom-select-text {
  color: var(--color-error) !important;
}

.checkbox-wrapper.is-error .checkmark {
  border-color: var(--color-error) !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4) !important;
}

.input-error-msg {
  font-size: 0.8rem;
  color: var(--color-error);
  margin-top: 6px;
  display: block;
  text-align: left;
}

/* Custom Phone Input Flag Selector */
.phone-input-group {
  display: flex;
  background: rgba(6, 23, 48, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: visible;
  position: relative;
  width: 100%;
}

.phone-input-group:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(97, 117, 162, 0.15);
}

.phone-flag-select {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  user-select: none;
  transition: var(--transition-fast);
}
@media (min-width: 1024px) {
  .phone-flag-select {
    min-width: 115px;
  }
}
.phone-flag-select:hover {
  background: rgba(255, 255, 255, 0.02);
}

.phone-flag-select img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}

.phone-flag-select svg {
  width: 14px;
  height: 14px;
  fill: var(--text-muted);
}

.phone-input-group input {
  border: none;
  background: transparent;
  padding: 14px 16px;
  flex: 1;
  outline: none;
  color: var(--text-white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  width: 100%;
}

.phone-input-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.phone-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  background: #152537;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  margin-top: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  
  /* Animation properties */
  opacity: 0;
  visibility: hidden;
  max-height: 42px; /* Starts at one item height */
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.phone-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  max-height: 220px; /* Full size */
  pointer-events: auto;
}

.phone-dropdown-search {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  background: #152537;
}
.phone-dropdown-search input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text-white);
  font-size: 0.85rem;
  outline: none;
}

.phone-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  font-size: 0.9rem;
  color: var(--text-white);
}
.phone-dropdown-item:hover {
  background: rgba(97, 117, 162, 0.15);
}
.phone-dropdown-item img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
}
.phone-dropdown-item span {
  margin-left: auto;
  color: var(--text-muted);
  text-align: right;
}
.phone-dropdown-item.selected {
  color: var(--text-white);
  background: rgba(97, 117, 162, 0.25);
}

/* Checkboxes, Radios, Toggles */
.checkbox-container, .radio-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  font-size: 0.95rem;
  user-select: none;
  color: var(--text-light-blue);
  gap: 10px;
  margin-right: 16px;
}

.checkbox-container input, .radio-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  height: 20px;
  width: 20px;
  background: rgba(6, 23, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.radio-container .checkmark {
  border-radius: 50%;
}

.checkbox-container:hover input ~ .checkmark,
.radio-container:hover input ~ .checkmark {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

.checkbox-container input:checked ~ .checkmark,
.radio-container input:checked ~ .checkmark {
  background: var(--accent-gradient);
  border-color: transparent;
}

.checkmark::after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
  display: block;
  width: 5px;
  height: 10px;
  border: solid var(--bg-main);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.radio-container input:checked ~ .checkmark::after {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-main);
}

/* Custom select dropdown styling (In site theme) */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.custom-select-text {
  flex-grow: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select-arrow {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
  transition: transform 0.2s ease;
  margin-left: 10px;
}

.custom-select-wrapper.active .custom-select-arrow {
  transform: rotate(180deg);
  stroke: var(--accent-cyan);
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background: #152537;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  z-index: 110;
  display: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  margin-top: 4px;
}

.custom-select-wrapper.active .custom-select-options {
  display: block;
}

.custom-select-option {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-light-blue);
  transition: var(--transition-fast);
  text-align: left;
}

.custom-select-option:hover {
  background: rgba(97, 117, 162, 0.15);
  color: var(--text-white);
}

.custom-select-option.selected {
  background: rgba(97, 117, 162, 0.25);
  color: var(--text-white);
  font-weight: 600;
}

/* Multi-select styling */
.custom-select-wrapper.multi-select .custom-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}

.custom-select-wrapper.multi-select .custom-select-option::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.custom-select-wrapper.multi-select .custom-select-option:hover::before {
  border-color: rgba(255, 255, 255, 0.4);
}

.custom-select-wrapper.multi-select .custom-select-option.selected::before {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1120' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 70% 70%;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}



/* Range Slider styles */
.range-slider-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0;
}

.range-slider-title,
.radio-group-title {
  font-size: 0.8rem;
  color: var(--text-light-blue);
  margin-bottom: 0;
  line-height: 1.25;
  width: 130px;
  flex-shrink: 0;
  white-space: normal;
  text-align: left;
}

.range-slider-wrapper {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 14px; /* Space for absolute-positioned labels */
}


    /* Empty circles on the slider track */
.slider-track-ticks {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 10px;
  height: 0;
  pointer-events: none;
  z-index: 1;
}

.slider-track-ticks::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px; /* Exactly 4px thickness */
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  z-index: -1;
  transform: translateY(-50%);
}

.slider-track-ticks::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--slider-fill-pct, 0%);
  height: 4px; /* Exactly 4px thickness */
  background: var(--accent-cyan);
  border-radius: 2px;
  z-index: -1;
  transform: translateY(-50%);
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tick-circle {
  position: absolute;
  top: 0;
  width: 16px;
  height: 16px;
  background: var(--bg-main);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.tick-circle[data-index="0"] { left: 0%; }
.tick-circle[data-index="1"] { left: 33.333%; }
.tick-circle[data-index="2"] { left: 66.667%; }
.tick-circle[data-index="3"] { left: 100%; }

.tick-circle.active {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  background: var(--bg-main);
}

.slider-active-thumb {
  position: absolute;
  top: 0;
  left: 0%;
  width: 16px;
  height: 16px;
  background: var(--text-white);
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
  z-index: 2;
  pointer-events: none;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.range-slider-wrapper:hover .slider-active-thumb {
  transform: translate(-50%, -50%) scale(1.2);
}

.design-range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 20px;
  background: transparent;
  outline: none;
  margin: 0;
  padding: 0;
  border: none;
  position: relative;
  z-index: 3;
}

.design-range-slider::-webkit-slider-runnable-track {
  background: transparent;
  height: 20px;
}

.design-range-slider::-moz-range-track {
  background: transparent;
  height: 20px;
}

.design-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.design-range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
}

.range-slider-labels {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -4px; /* Pull labels closer to the track */
  height: 14px;
}

.range-slider-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.range-slider-label.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

.range-slider-label[data-index="0"] { left: 0%; }
.range-slider-label[data-index="1"] { left: 33.33%; }
.range-slider-label[data-index="2"] { left: 66.66%; }
.range-slider-label[data-index="3"] { left: 100%; }

/* Radio button groups (In one line, close to options) */
.radio-group-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px 16px;
  margin: 10px 0;
}

.radio-group-title {
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.radio-group-options {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  flex-grow: 0;
  width: auto;
  justify-content: flex-start;
}

.radio-group-options .radio-container {
  font-size: 0.8rem;
  gap: 6px;
  margin-right: 0;
  white-space: nowrap;
}

.radio-group-options .checkmark {
  height: 14px;
  width: 14px;
  flex-shrink: 0;
}

.radio-group-options input:checked ~ .checkmark::after {
  width: 6px;
  height: 6px;
}

.agreement-link {
  color: var(--accent-cyan);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.agreement-link:hover {
  color: var(--text-white);
}

/* Mobile overrides for layout side-by-side fields */
@media (max-width: 480px) {
  .real-modal-container {
    padding: 28px 20px;
  }
  .radio-group-container,
  .range-slider-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .radio-group-title,
  .range-slider-title {
    width: auto;
    max-width: none;
  }
  .radio-group-options {
    justify-content: flex-start;
    width: 100%;
    gap: 12px;
  }
  .range-slider-wrapper {
    width: 100%;
  }
  .desktop-br {
    display: none;
  }
}

.phone-dropdown-item,
.custom-select-trigger,
.custom-select-option,
.range-slider-label,
.tick-circle {
  -webkit-tap-highlight-color: transparent;
}