/* Основные стили попапа content-gate-quiz */
.content-gate-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
}

.content-gate-popup.active {
    display: flex;
}

.content-gate-popup .popup-content {
    text-align: center;
}

.content-gate-popup .steptitle,
.content-gate-popup .stepcontent,
.content-gate-popup .stepselection,
.content-gate-popup .quiz-controls {
    text-align: center;
    justify-content: center;
}

/* Футер квиза с ссылкой Log In */
.quiz-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
}

.quiz-footer p {
    color: #575757;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 180%;
}

.quiz-footer a {
    color: #4a9eff;
    text-decoration: none;
    font-weight: 500;
}

.quiz-footer a:hover {
    text-decoration: underline;
}

.gender-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.gender-option {
    flex: 1;
    max-width: 200px;
    min-width: 200px;
}

.gender-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 35px 20px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
}
.content-gate-popup .quizradiobg{
    padding:0;
    overflow: hidden;
}
.gender-option input[type="radio"] {
    display: none;
}
.content-gate-popup .stepselection {
    max-width: inherit;
}
.gender-icon {
    max-height: 80px;
    margin-bottom: 15px;
    fill: #4a9eff;
}

.gender-option input[type="radio"]:checked + label .gender-icon {
    fill: #1e4a72;
}

.gender-option span {
    color: #1e4a72;
    font-family: Poppins;
    font-size: 22px;
    font-style: normal;
    font-weight: 500;
}

.date-input-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.date-input-container input {
    max-width: 100%;
    padding: 23px 40px 23px 16px;
    border-radius: 4px;
    border: 1px solid #234162;
    background: #FFF;
    text-align: center;
    cursor: pointer;
    color: #000000;
    font-style: normal;
    font-weight: 400 !important;
    font-size: 14.5297px;
    line-height: 16px;
    box-sizing: border-box;
}
.date-input-container input.ios-date-input {
    height: 62px; /* Фиксированная высота как у обычного input */
    padding: 23px 40px 23px 16px !important;
    line-height: 16px !important;
    -webkit-appearance: none;
    appearance: none;
}

.date-input-container .ios-date-placeholder {
    transition: opacity 0.2s ease;
}

.date-input-container input.ios-date-input:focus {
    outline: none;
    border-color: #4a9eff;
}

.date-input-container input.ios-date-input::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('/wp-content/themes/salient-child/assets/image/pages/calendar.svg');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    opacity: 1;
}
body .date-input-container .dayContainer {
    gap: 22px;
    row-gap: 4px;
    margin: 0 11px;
}

.date-input-container .flatpickr-weekdays {
    height: 25px;
    margin-bottom:10px!important;
}

#content-gate-quiz .sorrytext.active {
    display: block;
}
#content-gate-quiz .sorrytext {
    display: none;
    color: #DF3C85;
    text-align: center;
    font-family: Poppins;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 180%;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    border-left: 0;
}

#content-gate-quiz  .quiz-step {
  gap:0px;
}

#content-gate-quiz h2#quiz-question-title{
  margin-bottom:40px;
}

body .date-input-container .flatpickr-day {
  font-family: 'Avenir Next LT Pro Regular', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 15px;
  max-width: 32px;
  height: 32px;
  width: 100%;
}
.date-input-container .flatpickr-months {
    margin-bottom: 15px !important;
}
.date-input-container input:focus {
    outline: none;
    border-color: #4a9eff;
}

.date-input-container .flatpickr-wrapper::after {
    content: '';
    background-image: url('/wp-content/themes/salient-child/assets/image/pages/calendar.svg');
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 10;
}
.date-input-container .flatpickr-calendar.animate{
    width:100%!important;
}
.date-subtitle {
    text-align: center;
    color: #575757;
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 180%;
    padding-bottom: 0;
}
.date-input-container .flatpickr-wrapper {
    position: relative;
    display: inline-block;
    max-width: 420px;
    width: 100%;
}

.date-input-container .flatpickr-calendar.animate.open {
    font-family: inherit;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 20px !important;
    position: absolute!important;
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    z-index: 10000 !important;
}

.date-input-container .flatpickr-day.selected {
    background: #1e4a72;
    border-color: #1e4a72;
}

.date-input-container .flatpickr-day:hover {
    background: #f0f7ff;
    border-color: #4a9eff;
}

.date-input-container .flatpickr-current-month .flatpickr-monthDropdown-months {
    background: #1e4a72;
    color: white;
}

.date-input-container .flatpickr-current-month .flatpickr-monthDropdown-months option {
    background: white;
    color: #1e4a72;
}

.date-input-container .flatpickr-current-month .numInputWrapper {
    color: white;
}

.date-input-container .flatpickr-current-month .numInputWrapper input {
    background: transparent;
    color: white;
    border: none;
}

.date-input-container .flatpickr-current-month .numInputWrapper input:focus {
    background: rgba(255, 255, 255, 0.1);
}

.flatpickr-current-month .numInputWrapper span {
    color: white;
}

.flatpickr-current-month .numInputWrapper span:hover {
    background: rgba(255, 255, 255, 0.1);
}

.flatpickr-weekdays {
    background: #f8fbff;
}

.flatpickr-weekday {
    background: #f8fbff;
    color: #1e4a72;
    font-weight: 600;
}

.date-input-container .custom-year-selector {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.date-input-container .custom-year-selector:hover {
    background-color: #e0e0e0;
}

.date-input-container .custom-year-selector option {
    background-color: #fff;
    color: #333;
}

.date-input-container .custom-year-selector option:hover {
    background-color: #d0d0d0;
}

.date-input-container .custom-year-selector::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.date-input-container .custom-year-selector::-moz-scrollbar {
    width: 0;
    background: transparent;
}

.date-input-container .year-selector-wrapper {
    position: relative;
}
.date-input-container .flatpickr-current-month .numInputWrapper {
    display: none !important;
}

.date-input-container .select2-container {
    left: 0 !important;
}

.date-input-container .select2-container--default .select2-results__option:hover,
.date-input-container .select2-container--default .select2-results__option:focus {
    background-color: #DDEDF5 !important;
}

/* Изоляция Select2 dropdown внутри content-gate-quiz */
#content-gate-quiz .select2-container {
    z-index: 10001 !important;
}

#content-gate-quiz .select2-dropdown {
    z-index: 10001 !important;
}

/* Убедимся что popup квиза имеет правильный z-index */
#content-gate-quiz.content-gate-popup {
    z-index: 9999 !important;
}

/* Стили для типов облысения */
.hair-loss-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.hair-loss-type {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #fff;
}

.hair-loss-type:hover {
    border-color: #4a9eff;
    background: #f8fbff;
}

.hair-loss-type.selected {
    border-color: #1e4a72;
    background: #FFF;
}

.hair-loss-type img {
    width: 100%;
    max-width: 66px;
    height: auto;
    margin-bottom: 10px;
}

.hair-loss-type span {
    display: block;
    color: #003170;
    text-align: center;
    font-family: Poppins;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
}
a.stepback {
    display: none !important;
}
.quiz-step.congratulation {
    display: none;
}

@media (min-width: 768px) {
  .date-input-container .flatpickr-calendar.animate.open {
    top: 70px;
  }
}
@media (max-width: 767px) {
    .gender-selection {
        flex-direction: column;
        gap: 15px;
        display:grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gender-option {
        max-width: none;
        min-width: initial;
    }
    .gender-option img {
        height: 70px;
        width: 70px;
    }
    
    .hair-loss-types {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
    .hair-loss-type span {
        line-height: 140%;
    }
    .date-input-container input {
        width: 100%;
    }
    .date-input-container input[type="date"] {
        padding: 20px 16px;
        font-size: 16px; 
        min-height: 44px;
        height: 62px;
    }
    .quiz-step {
        margin-bottom: 20px;
    }
    .steptitle h2 {
        font-size: 18px;
    }
    .quiz-step input {
        margin-right: 0px;
    }
    .stepselection.gender-selection {
        margin-bottom: 20px;
    }
    #quiz-question-content{
      overflow: visible;
    }
    #content-gate-quiz .popup-content, #content-gate-quiz .flex-imgs {
        margin: 0px;
    }
    .hair-loss-type {
        padding: 15px 25px;
        width: 130px;
    }
    .hair-loss-type img {
        height: 80px;
        width: auto;
    }
    .flex-imgs.hair-loss-types {
        padding-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .gender-option label {
        padding: 15px;
    }
    
    .gender-icon {
        width: 50px;
        height: 50px;
    }
    
    .gender-option span {
        font-size: 18px;
    }
    
    .hair-loss-types {
        gap: 10px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none !important;
}

/* Анимации */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

.shake {
    animation: shake 0.5s ease-in-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Поддержка уменьшенной анимации */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}