/* Halloween: поиск привидений */

.hw-ghost {
    position: absolute;
    z-index: 900;
    cursor: pointer;
    border: 0;
    padding: 0;
    background: none;
    animation: hw-float 3.2s ease-in-out infinite;
    filter: drop-shadow(0 6px 10px rgba(30, 10, 60, .35));
    opacity: .92;
    -webkit-tap-highlight-color: transparent;
}
.hw-ghost svg { display: block; width: 100%; height: 100%; }
.hw-ghost:hover { opacity: 1; }
.hw-ghost.is-caught {
    animation: hw-caught .7s ease-in forwards;
    pointer-events: none;
}

@keyframes hw-float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-14px) rotate(4deg); }
}
@keyframes hw-caught {
    to { transform: translateY(-80px) scale(1.6); opacity: 0; }
}

/* Счётчик находок */
.hw-counter {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 8px 10px;
    border: 0;
    border-radius: 24px;
    background: #2b1748;
    color: #fff;
    font: 600 15px/1 Gilroy, Arial, sans-serif;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    cursor: pointer;
}
.hw-counter svg { width: 26px; height: 26px; }
.hw-counter.is-bump { animation: hw-bump .5s ease; }
.hw-counter.is-done { background: #ff7a00; }
@keyframes hw-bump {
    40% { transform: scale(1.18); }
}

/* Модальное окно */
.hw-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 8, 40, .65);
}
.hw-modal.is-open { display: flex; }
.hw-modal__box {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    border-radius: 20px;
    background: #fff;
    color: #2b1748;
    text-align: center;
    font-family: Gilroy, Arial, sans-serif;
}
.hw-modal__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #8a7aa3;
    cursor: pointer;
}
.hw-modal__ghost { width: 72px; height: 72px; margin: 0 auto 12px; }
.hw-modal__title { margin: 0 0 10px; font-size: 22px; font-weight: 700; }
.hw-modal__text { margin: 0 0 18px; font-size: 15px; line-height: 1.45; }
.hw-form input[type="email"] {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid #c9bedb;
    border-radius: 10px;
    font-size: 16px;
}
.hw-form__hp { position: absolute; left: -9999px; }
.hw-form__consent {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
}
.hw-form__consent a { color: inherit; text-decoration: underline; }
/* Сайт снимает со всех input стандартный вид (appearance: none), поэтому
   галочку рисуем сами — так она видна в любом шаблоне */
.hw-form__consent input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #8a7aa3;
    border-radius: 5px;
    background: #fff center / 14px 14px no-repeat;
    cursor: pointer;
}
.hw-form__consent input[type="checkbox"]:checked {
    border-color: #ff7a00;
    background-color: #ff7a00;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.hw-form__consent input[type="checkbox"]:focus-visible { outline: 2px solid #2b1748; outline-offset: 2px; }
.hw-form__consent span { cursor: pointer; }
.hw-btn {
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-radius: 10px;
    background: #ff7a00;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.hw-btn:disabled { opacity: .6; cursor: default; }
.hw-form__error { min-height: 18px; margin-top: 10px; color: #ef5241; font-size: 13px; }

/* Всплывающая подсказка после находки */
.hw-toast {
    position: fixed;
    left: 50%;
    bottom: 80px;
    z-index: 1001;
    padding: 12px 18px;
    border-radius: 12px;
    background: #2b1748;
    color: #fff;
    font: 600 15px/1.3 Gilroy, Arial, sans-serif;
    transform: translate(-50%, 20px);
    opacity: 0;
    transition: opacity .3s, transform .3s;
    pointer-events: none;
}
.hw-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767px) {
    .hw-counter { left: 10px; bottom: 10px; font-size: 14px; }
}
