/* =============================================
   ADMISSION BUTTON — v2 Design
   ============================================= */

.abb-wrapper,
.abb-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.abb-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   ПУЛЬСИРУЮЩИЕ КОЛЬЦА
   ============================================ */
.abb-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50px;
    border: 2px solid rgba(0, 168, 236, 0.5);
    animation: abb-ring-pulse 2.4s ease-out infinite;
    pointer-events: none;
}
.abb-ring:nth-child(2) { animation-delay: 0.8s; }
.abb-ring:nth-child(3) { animation-delay: 1.6s; }

@keyframes abb-ring-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ============================================
   ОСНОВНАЯ КНОПКА (single mode)
   ============================================ */
.abb-button {
    position: relative;
    z-index: 2;
    display: flex !important;
    align-items: center !important;
    gap: 10px;
    background: linear-gradient(135deg, #00a8ec 0%, #004a7c 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 15px 26px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.03em;
    line-height: 1;
    border: none;
    outline: none;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0, 168, 236, 0.5), 0 2px 6px rgba(0,0,0,0.12);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    cursor: pointer;
}

.abb-button:hover,
.abb-button:focus,
.abb-button:active,
.abb-button:visited {
    color: #ffffff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #00a8ec 0%, #004a7c 100%);
}

.abb-button:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 168, 236, 0.55), 0 4px 10px rgba(0,0,0,0.15);
}
.abb-button:active { transform: scale(1.01); }

.abb-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 50%;
    border-radius: 50px 50px 0 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.18) 0%, transparent 100%);
    pointer-events: none;
}

.abb-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    width: 22px; height: 22px;
}
.abb-icon svg {
    display: block !important;
    width: 100% !important; height: 100% !important;
    fill: #fff !important;
}

.abb-text {
    display: inline-block !important;
    font-size: inherit;
    font-weight: inherit;
    white-space: nowrap;
    color: inherit;
}

.abb-glow {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border-radius: 50px;
    background: linear-gradient(135deg, #00a8ec, #004a7c);
    filter: blur(14px);
    opacity: 0.4;
    animation: abb-glow-pulse 2.4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}
@keyframes abb-glow-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.97); }
    50%       { opacity: 0.55; transform: scale(1.03); }
}

/* ============================================
   MULTI-BUTTON MODE
   ============================================ */
.abb-wrapper.abb-multi {
    align-items: flex-end;
    justify-content: flex-end;
}

/* Выносим из потока — враппер сжимается до размера главной кнопки,
   невидимая область больше не перехватывает касания */
.abb-sub-buttons {
    position: absolute;
    bottom: 100%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    padding-bottom: 12px;
    pointer-events: none;
}

/* Разрешаем клики по кнопкам когда меню открыто */
.abb-wrapper.abb-multi.abb-open .abb-sub-buttons {
    pointer-events: auto;
}

@media (hover: hover) {
    .abb-wrapper.abb-multi:hover .abb-sub-buttons {
        pointer-events: auto;
    }
}

/* ── Каждая sub-кнопка — цветная пилюля ── */
.abb-sub-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 11px 18px 11px 14px;
    border-radius: 50px;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;

    /* Начальное состояние — скрыто */
    opacity: 0;
    transform: translateX(16px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, box-shadow 0.2s ease;
}

/* Показать при открытии (все устройства) */
.abb-wrapper.abb-multi.abb-open .abb-sub-button {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

/* Показать при наведении только на десктопе (устройства с настоящим hover) */
@media (hover: hover) {
    .abb-wrapper.abb-multi:hover .abb-sub-button {
        opacity: 1;
        transform: translateX(0) scale(1);
        pointer-events: all;
    }
}

/* Ступенчатая задержка появления */
.abb-sub-button:nth-child(1) { transition-delay: 0s; }
.abb-sub-button:nth-child(2) { transition-delay: 0.06s; }
.abb-sub-button:nth-child(3) { transition-delay: 0.12s; }
.abb-sub-button:nth-child(4) { transition-delay: 0.18s; }
.abb-sub-button:nth-child(5) { transition-delay: 0.24s; }
.abb-sub-button:nth-child(6) { transition-delay: 0.30s; }

/* ── Брендовые цвета ── */
.abb-sub-button[data-icon="whatsapp"] {
    background: #25d366;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
}
.abb-sub-button[data-icon="telegram"] {
    background: #2ca5e0;
    box-shadow: 0 4px 16px rgba(44, 165, 224, 0.45);
}
.abb-sub-button[data-icon="phone"] {
    background: #00a8ec;
    box-shadow: 0 4px 16px rgba(0, 168, 236, 0.45);
}
.abb-sub-button[data-icon="email"] {
    background: #ea4335;
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.45);
}
.abb-sub-button[data-icon="instagram"] {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 4px 16px rgba(193, 53, 132, 0.45);
}
.abb-sub-button[data-icon="facebook"] {
    background: #1877f2;
    box-shadow: 0 4px 16px rgba(24, 119, 242, 0.45);
}
.abb-sub-button[data-icon="tiktok"] {
    background: #010101;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.abb-sub-button[data-icon="link"] {
    background: #5b5ea6;
    box-shadow: 0 4px 16px rgba(91, 94, 166, 0.45);
}

/* Hover каждой кнопки */
.abb-sub-button:hover {
    transform: translateX(-4px) scale(1.04) !important;
    filter: brightness(1.1);
}

/* Иконка внутри пилюли */
.abb-sub-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px; height: 20px;
    flex-shrink: 0;
}
.abb-sub-ico svg {
    width: 100%; height: 100%;
    fill: #fff;
    display: block;
}

/* Текст внутри пилюли */
.abb-sub-txt {
    color: #fff !important;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
}

/* ── Внутренний враппер главной кнопки ── */
.abb-main-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.abb-main-wrap .abb-ring {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}
.abb-main-wrap .abb-glow {
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
}

.abb-toggle-btn {
    appearance: none;
    -webkit-appearance: none;
}

/* ============================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================ */
@media (max-width: 768px) {
    .abb-wrapper { bottom: 20px; right: 16px; }
    .abb-button  { padding: 13px 20px; font-size: 13px; gap: 8px; }
    .abb-icon    { width: 20px; height: 20px; }
    .abb-sub-button { font-size: 13px; padding: 10px 15px 10px 12px; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.abb-button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@media (prefers-contrast: high) {
    .abb-button,
    .abb-sub-button { border: 2px solid #fff; }
}

@media (prefers-reduced-motion: reduce) {
    .abb-ring, .abb-glow, .abb-button, .abb-sub-button {
        animation: none !important;
        transition: none !important;
    }
    .abb-button:hover, .abb-sub-button:hover { transform: none !important; filter: none; }
    .abb-sub-button { opacity: 0; }
    .abb-wrapper.abb-multi.abb-open .abb-sub-button { opacity: 1; }
}

@media print { .abb-wrapper { display: none !important; } }
