/* loan-form.css */
/* Калькулятор - Start */
/* ===================== */
.loan__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(0.75rem, 2vh, 1.25rem);
}

.nebula-input {
  position: relative;
  width: auto;
  margin: clamp(1.25rem, 4vh, 1.875rem) auto;
}

.nebula-input .input {
  width: 100%;
  padding: clamp(0.75rem, 2vh, 0.9375rem);
  border: max(0.5px, 0.0625rem) solid #0066ff2d;
  background: #ffffff;
  color: var(--text);
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  outline: none;
  border-radius: clamp(0.5rem, 1.2vw, 0.75rem);
  transition: all 0.4s ease-out;
}

.nebula-input .user-label {
  position: absolute;
  font-family: var(--fir);
  left: clamp(0.75rem, 2vh, 0.9375rem);
  top: clamp(0.75rem, 2vh, 0.9375rem);
  pointer-events: none;
  color: #6a6a8a;
  transition: all 0.4s ease-out;
  background: #ffffff;
  padding: 0 clamp(0.25rem, 0.8vw, 0.5rem);
  font-size: clamp(0.75rem, 1.6vw, 0.875rem);
}

.nebula-input .input:focus {
  border-color: var(--primary);
  box-shadow:
    0 clamp(0.25rem, 0.8vw, 0.3125rem) clamp(0.5rem, 1.2vw, 0.625rem) rgba(106, 133, 255, 0.3),
    0 clamp(0.5rem, 1.6vw, 0.625rem) clamp(1.25rem, 3vw, 1.5625rem) rgba(106, 146, 255, 0.2),
    0 clamp(0.75rem, 2.4vw, 0.9375rem) clamp(2.5rem, 5vw, 3.125rem) rgba(106, 153, 255, 0.15),
    0 clamp(1.25rem, 3.2vw, 1.5625rem) clamp(3.75rem, 7vw, 4.6875rem) rgba(106, 168, 255, 0.1);
}

.nebula-input .input:focus ~ .user-label,
.nebula-input .input:valid ~ .user-label {
  transform: translateY(clamp(-1.25rem, -4vh, -1.5625rem));
  font-size: clamp(0.625rem, 1.4vw, 0.75rem);
  color: var(--text);
  left: clamp(0.5rem, 1.6vw, 0.625rem);
}

.nebula-particle {
  position: absolute;
  width: clamp(0.25rem, 1vw, 0.375rem);
  height: clamp(0.25rem, 1vw, 0.375rem);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  top: 50%;
  left: clamp(0.5rem, 1.6vw, 0.625rem);
  filter: blur(0.8px);
  transition: opacity 0.3s ease;
}

.nebula-input .input:focus ~ .nebula-particle {
  animation: nebula-float 2s forwards ease-out;
}

@keyframes nebula-float {
  0% {
    transform: translate(0, -50%) scale(0.8);
    opacity: 0;
    background: var(--primary);
  }
  20% {
    opacity: 0.8;
  }
  100% {
    transform: translate(calc(var(--x) * clamp(7.5rem, 20vw, 10rem)), calc(var(--y) * clamp(1.25rem, 5vh, 2.1875rem))) scale(1.1);
    opacity: 0;
    background: var(--secondary);
  }
}

.amount-input-wrapper {
  position: relative;
  padding-bottom: clamp(1.75rem, 6vh, 2.1875rem);
}

.amount-input-wrapper .user-label {
  transform: translateY(clamp(-1.25rem, -4vh, -1.5625rem));
  font-size: clamp(0.625rem, 1.4vw, 0.75rem);
  color: var(--text);
  left: clamp(0.5rem, 1.6vw, 0.625rem);
}

.amount-input-wrapper .input {
  font-weight: var(--bold);
  text-align: center;
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  font-size: clamp(1.125rem, 2.8vw, 1.5rem);
  color: var(--primary);
  padding: clamp(0.875rem, 2.5vh, 1rem) clamp(0.75rem, 2vh, 0.9375rem);
}

.range-slider-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 0px clamp(0.25rem, 1vh, 0.3125rem) 0px;
}

.slider {
  appearance: none;
  width: 100%;
  height: clamp(0.25rem, 1vh, 0.375rem);
  border-radius: clamp(0.125rem, 0.4vw, 0.1875rem);
  background: #e0e0e0;
  outline: none;
  margin: 0;
  margin-bottom: clamp(0.5rem, 3vh, 0.75rem);
}

.slider::-webkit-slider-runnable-track {
  height: clamp(0.25rem, 1vh, 0.375rem);
  border-radius: clamp(0.125rem, 0.4vw, 0.1875rem);
  background: linear-gradient(90deg, var(--secondary), var(--primary));
}

.slider::-moz-range-track {
  height: clamp(0.25rem, 1vh, 0.375rem);
  border-radius: clamp(0.125rem, 0.4vw, 0.1875rem);
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: clamp(1rem, 3vw, 1.25rem);
  height: clamp(1rem, 3vw, 1.25rem);
  border-radius: 50%;
  background: #ffffff;
  border: max(1px, 0.1em) solid var(--primary);
  cursor: pointer;
  box-shadow: 0 clamp(0.125rem, 0.4vw, 0.1875rem) clamp(0.5rem, 1.2vw, 0.625rem) rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  margin-top: clamp(-0.375rem, -1.2vw, -0.4375rem);
}

.slider::-moz-range-thumb {
  width: clamp(1rem, 3vw, 1.25rem);
  height: clamp(1rem, 3vw, 1.25rem);
  border-radius: 50%;
  background: #ffffff;
  border: max(1px, 0.1em) solid var(--primary);
  cursor: pointer;
  box-shadow: 0 clamp(0.125rem, 0.4vw, 0.1875rem) clamp(0.5rem, 1.2vw, 0.625rem) rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 clamp(0.25rem, 0.8vw, 0.3125rem) clamp(0.75rem, 1.8vw, 0.9375rem) rgba(0, 0, 0, 0.4);
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 clamp(0.25rem, 0.8vw, 0.3125rem) clamp(0.75rem, 1.8vw, 0.9375rem) rgba(0, 0, 0, 0.4);
}

.range-values {
  display: flex;
  justify-content: space-between;
  font-size: clamp(0.5rem, 1.2vw, 0.6875rem);
  color: #6a6a8a;
  font-family: var(--fir);
}

.slider:focus::-webkit-slider-thumb {
  border-color: var(--primary);
  box-shadow: 0 0 0 clamp(0.1875rem, 0.6vw, 0.25rem) rgba(0, 111, 238, 0.3);
}

.slider:focus::-moz-range-thumb {
  border-color: var(--primary);
  box-shadow: 0 0 0 clamp(0.1875rem, 0.6vw, 0.25rem) rgba(0, 111, 238, 0.3);
}

.amount-input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: none;
}

.nebula-input:not(.amount-input-wrapper) .input:focus {
  border-color: var(--primary);
  box-shadow:
    0 clamp(0.25rem, 0.8vw, 0.3125rem) clamp(0.5rem, 1.2vw, 0.625rem) rgba(106, 133, 255, 0.3),
    0 clamp(0.5rem, 1.6vw, 0.625rem) clamp(1.25rem, 3vw, 1.5625rem) rgba(106, 146, 255, 0.2),
    0 clamp(0.75rem, 2.4vw, 0.9375rem) clamp(2.5rem, 5vw, 3.125rem) rgba(106, 153, 255, 0.15),
    0 clamp(1.25rem, 3.2vw, 1.5625rem) clamp(3.75rem, 7vw, 4.6875rem) rgba(106, 168, 255, 0.1);
}
.range-values span {
  font-size: clamp(0.6rem, 1.4vw, 0.8rem);
}
.buttton__info {
  display: flex;
  justify-content: space-between;
}
@media (min-width: 230px) {
  .buttton__info {
  flex-wrap: wrap;
  flex-direction: column;
  gap: 10px;
}
}
@media (min-width: 442px) {
  .buttton__info {
    flex-wrap: nowrap;
    flex-direction: row;
}
}
.info__content span {
  font-size: clamp(0.625rem, 1.2vw, 0.75rem);
  line-height: 1.3;
}

.info__content p {
  font-family: var(--fir);
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  font-weight: var(--bold);
  line-height: 1.2;
}
.content__text_mobi {
  display: none;
}
@media (max-width: 1035px) {
  .content__text_mobi {
  display: block;
}
}
.email-suggest-container {
    position: relative !important;
    z-index: 999 !important; 
}
.email-wrapper{position:relative;width:100%}
.email-suggest{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    margin: 0;
    padding: 0;
    list-style:none;
    background:#fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
    border:1px solid var(--primary);
    max-height:180px;
    overflow-y:auto;
    z-index: 9999 !important;
    display:none;
    border-radius: 15px;
    transition: all 0.3s ease;
}
.email-suggest li{
  font-family: var(--fir);
  padding: 8px 12px;
  cursor:pointer;
}
.email-suggest li:hover,
.email-suggest li.active{background:#f2f2f2}
.employment-wrapper{position:relative;width:100%}
.form-select-custom{
    display: flex;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--fir);
    font-size: 16px;
    color: var(--text-h);
    background: white;
    transition: all 0.3s ease;
}
.form-select-custom:focus{
    outline:none;
    box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}
.form-select-arrow{
    width:0;height:0;
    border-left:5px solid transparent;
    border-right:5px solid transparent;
    border-top:5px solid var(--primary);
    transition:transform .3s ease;
}
.form-select-custom.open .form-select-arrow{transform:rotate(180deg)}

.employment-suggest{
    position:absolute;
    top:100%;left:0;right:0;
    margin:4px 0 0 0;padding:0;list-style:none;
    background:#fff;
    box-shadow:0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
    border:1px solid var(--primary);
    max-height:180px;overflow-y:auto;
    z-index:999;display:none;
    border-radius:15px;
    transition:opacity .3s ease, transform .3s ease;
    transform:translateY(-10px);opacity:0;
}
.employment-suggest.show{display:block;transform:translateY(0);opacity:1}
.employment-suggest li{
    font-family:var(--fir);
    padding:8px 12px;
    cursor:pointer;
}
.employment-suggest li:hover,
.employment-suggest li.active{background:#f2f2f2}
.custom-select-wrapper select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form-question {
  position: relative;
  margin-bottom: clamp(1.25rem, 4vh, 2rem) !important;
}

select.custom-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.form-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
    width: 100%;
    font-family: var(--fir);
    font-size: 16px;
    color: var(--text-h);
    appearance: none;
    cursor: pointer;
    padding: 15px;
    border-width: 2px;
    border-style: solid;
    border-color: rgb(224, 224, 224);
    border-image: initial;
    border-radius: 8px;
    transition: 0.3s;
}
.form-select-trigger:hover {
  border-color: color-mix(in srgb, var(--primary) 80%, #000);
}

.form-question:has(select.custom-select option:first-child:not(:checked))
.form-select-trigger {
  border-color: var(--primary);
  background-color: white;
}

.form-select-arrow {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--primary);
  transition: transform .3s ease;
}
.form-select-trigger[aria-expanded="true"] .form-select-arrow {
  transform: rotate(180deg);
}
.form-question-label {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.form-field-sublabel {
    color: #6a6a8a;
    margin-bottom: 8px;
    display: block;
    font-family: var(--fir);
    margin-bottom: 0.75rem !important;
    display: block;
    font-weight: 600;
    /* Размер шрифта тоже может чуть уменьшаться на мобильных */
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.3;
}
.custom-select-container {
    position: relative; /* Критично для правильного позиционирования списка */
    width: 100%;
    margin-bottom: 10px;
}
.custom-select-container:has(.custom-select-list.show) {
    z-index: 999; 
}

.custom-select-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
  border: 1px solid var(--primary);
  max-height: 180px;
  overflow-y: auto;
  z-index: 9999 !important;
  border-radius: 15px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.custom-select-list.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.custom-select-list li {
  font-family: var(--fir, inherit);
  padding: 8px 12px;
  cursor: pointer;
  transition: background .15s ease;
}
.custom-select-list li:hover,
.custom-select-list li.active {
  background: #f2f2f2;
}

.form-finish-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
}

.form-finish-btn.loading {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    transform: scale(0.98);
    box-shadow: 
        0 0 20px rgba(106, 255, 126, 0.4),
        inset 0 0 10px rgba(255, 255, 255, 0.2);
}

.form-finish-btn.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 2s infinite;
}

.form-finish-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Пульсирующий эффект для кнопки */
.form-finish-btn.loading {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 0 20px rgba(235, 255, 106, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(255, 255, 106, 0.6),
            inset 0 0 15px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 20px rgba(255, 215, 106, 0.4),
            inset 0 0 10px rgba(255, 255, 255, 0.2);
    }
}
.time-separator {
    font-family: var(--fir);
    font-size: clamp(0.875rem, 1.8vw, 1rem)!important;
    font-weight: var(--gbold);
    line-height: 1.2;
    display: inline-block;
    width: 0.5em;
    text-align: center;
}
.blink-colon {
    animation: blink-steps 1s steps(2, start) infinite;
    color: #000;
}

@keyframes blink-steps {
    to {
        visibility: hidden;
    }
}
.form-finish-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--fir);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-finish-btn:hover:not(.loading) {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm) {
    background-color: var(--primary)!important;
}

div:where(.swal2-container) div:where(.swal2-html-container) {
    font-family: var(--fir)!important;
}
.swal2-icon.swal2-error.custom-svg-icon {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.swal2-icon.swal2-error.custom-svg-icon .swal2-x-mark {
    display: none !important; 
}

.swal2-confirm.custom-confirm-btn {
    background-color: var(--primary) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    padding: 10px 30px !important;
    font-family: var(--fir) !important;
    font-weight: var(--semibold) !important;
}
.form-question.field-wrapper {
    position: relative;
    overflow: visible !important; 
    z-index: 1;
}
.conditional-logic-block {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    position: relative;
    /* По умолчанию z-index авто, чтобы не перекрывать другие элементы */
    z-index: auto; 
    overflow: visible !important;
    
    margin-top: clamp(15px, 3vh, 25px);
    padding-left: clamp(10px, 2vw, 20px);
    border-left: 2px solid rgba(89, 245, 190, 0.3);
}

/* Состояние видимости */
.conditional-logic-block.is-visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
/* Стиль для статусных сообщений под кнопкой */
.form-status-messages {
    margin-top: 20px;
    font-size: 1.1rem;
    color: var(--primary); /* Или ваш основной цвет */
    text-align: center;
    min-height: 1.5em;
    transition: opacity 0.4s ease-in-out;
    font-weight: 500;
}

/* Эффект появления для страницы Offers.php (добавьте в header или offers.php) */
body {
    animation: fadeInPage 0.8s forwards;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Плавное появление карточек офферов */
.offer-card {
    opacity: 0;
    animation: fadeInCard 0.5s forwards;
}

.offer-card:nth-child(1) { animation-delay: 0.1s; }
.offer-card:nth-child(2) { animation-delay: 0.2s; }
.offer-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInCard {
    from { opacity: 0; scale: 0.95; }
    to { opacity: 1; scale: 1; }
}
/* Контейнер для статусных сообщений */
.form-status-messages {
    margin-top: 25px;
    font-family: var(--fir); /* Твой Inter */
    font-size: 1.1rem;
    font-weight: var(--semibold);
    color: var(--text-h);
    text-align: center;
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-text-item {
    font-family: var(--fir); /* Твой шрифт Inter */
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: var(--semibold);
    color: var(--text-h);
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s ease-in-out;
}

/* Эффект при активации сообщения */
.status-text-item.active {
    opacity: 1;
    transform: translateY(0);
}

/* Акцент на имени пользователя и важных словах */
.status-text-item b {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 208, 156, 0.2);
}

/* Дополнительный индикатор загрузки под текстом (опционально) */
.status-loader-bar {
    width: 100px;
    height: 3px;
    background: var(--secondary);
    margin: 10px auto 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.status-loader-bar::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 100%;
    background: var(--primary);
    animation: loadingMove 1.5s infinite ease-in-out;
}

@keyframes loadingMove {
    0% { left: -40%; }
    100% { left: 100%; }
}
/* Базовый стиль текста */
.status-text {
  font-family: 'Inter', sans-serif;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* Анимация ожидания (циклическая) */
.is-loading {
  animation: pulse-glow 1.5s infinite ease-in-out;
}

@keyframes pulse-glow {
  0% { opacity: 0.4; filter: blur(1px); }
  50% { opacity: 1; filter: blur(0px); }
  100% { opacity: 0.4; filter: blur(1px); }
}

/* Финальное состояние */
.is-ready {
  opacity: 1;
  font-weight: bold;
  animation: finish-pop 0.4s ease-out;
}

@keyframes finish-pop {
  0% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

