/* ==========================================================================
   МОДАЛЬНОЕ ОКНО ВЫБОРА СПОСОБА СВЯЗИ
   ========================================================================== */

.contact-choice-modal {
    --contact-dark: #1a2332;
    --contact-text: #64748b;
    --contact-red: #dc2626;
    --contact-orange: #f59e0b;
    --contact-yellow: #fbbf24;
    --contact-border: #e5e7eb;
}

.contact-choice-modal,
.contact-choice-modal * {
    box-sizing: border-box;
}

/* Диалог */

.contact-choice-modal__dialog {
    width: calc(100% - 30px) !important;
    max-width: 1050px !important;
    margin: 70px auto !important;
}

/* Основной контейнер */

.contact-choice-modal__content {
    position: relative;
    padding: 48px 42px 42px;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    border-radius: 26px !important;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(251, 191, 36, 0.15),
            transparent 34%
        ),
        #ffffff !important;
    box-shadow:
        0 25px 70px rgba(15, 23, 42, 0.24) !important;
}

/* Убираем возможные эффекты шаблона */

.contact-choice-modal__content::before,
.contact-choice-modal__content::after {
    display: none !important;
    content: none !important;
}

/* Кнопка закрытия */

.contact-choice-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    outline: none;
    background: #f8fafc;
    color: var(--contact-dark);
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.contact-choice-modal__close:hover,
.contact-choice-modal__close:focus {
    outline: none;
    background: var(--contact-orange);
    color: #ffffff;
    transform: rotate(90deg);
}

/* ==========================================================================
   ЗАГОЛОВОК
   ========================================================================== */

.contact-choice-modal__header {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.contact-choice-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    padding: 8px 18px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.07em;
    text-align: center;
    text-transform: uppercase;
}

.contact-choice-modal__header h2 {
    position: relative;
    margin: 0 0 17px !important;
    padding: 0 0 18px !important;
    border: 0 !important;
    color: var(--contact-dark) !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    text-align: center !important;
    text-transform: none !important;
}

.contact-choice-modal__header h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 76px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--contact-red) 0%,
        var(--contact-orange) 50%,
        var(--contact-yellow) 100%
    );
    transform: translateX(-50%);
}

.contact-choice-modal__header p {
    display: block;
    width: 100%;
    max-width: 620px;
    margin: 0 auto !important;
    padding: 0 !important;
    color: var(--contact-text) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    text-align: center !important;
}

/* ==========================================================================
   СЕТКА СПОСОБОВ СВЯЗИ
   ========================================================================== */

.contact-choice-modal__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}

/* ==========================================================================
   КАРТОЧКА
   ========================================================================== */

.contact-choice-card {
    position: relative;
    display: flex !important;
    min-width: 0;
    min-height: 180px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 15px;
    padding: 25px 20px 21px;
    overflow: hidden;
    border: 1px solid var(--contact-border);
    border-top: 4px solid transparent;
    border-radius: 20px;
    background: #ffffff;
    color: var(--contact-dark) !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.05),
        0 14px 32px rgba(15, 23, 42, 0.07);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* Убираем ripple */

.contact-choice-card::before,
.contact-choice-card::after {
    display: none !important;
    content: none !important;
}

.contact-choice-card:hover,
.contact-choice-card:focus {
    border-color: rgba(245, 158, 11, 0.35);
    border-top-color: var(--contact-orange);
    color: var(--contact-dark) !important;
    text-decoration: none !important;
    box-shadow:
        0 12px 28px rgba(220, 38, 38, 0.08),
        0 19px 42px rgba(15, 23, 42, 0.12);
    transform: translateY(-6px);
}

/* Значок */

.contact-choice-card__abbr {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(
        135deg,
        var(--contact-red),
        var(--contact-orange),
        var(--contact-yellow)
    );
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    box-shadow:
        0 8px 20px rgba(245, 158, 11, 0.24);
}

.contact-choice-card--email .contact-choice-card__abbr {
    font-size: 27px;
}

/* Текст */

.contact-choice-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}

.contact-choice-card__content strong {
    color: var(--contact-dark);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.contact-choice-card__content small {
    overflow: hidden;
    color: var(--contact-text);
    font-size: 13px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Стрелка */

.contact-choice-card__arrow {
    position: absolute;
    right: 15px;
    bottom: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(251, 191, 36, 0.15);
    color: #b45309;
    font-size: 18px;
    font-weight: 800;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.contact-choice-card:hover .contact-choice-card__arrow {
    background: var(--contact-orange);
    color: #ffffff;
    transform: translateX(4px);
}

/* Затемнение фона */

.modal-backdrop.in {
    opacity: 0.58 !important;
}

/* ==========================================================================
   ПЛАНШЕТ
   ========================================================================== */

@media (max-width: 800px) {
    .contact-choice-modal__dialog {
        max-width: 650px !important;
        margin: 35px auto !important;
    }

    .contact-choice-modal__content {
        padding: 44px 28px 30px;
    }

    .contact-choice-modal__grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .contact-choice-card {
        min-height: 100px;
        align-items: center;
        flex-direction: row;
        justify-content: flex-start;
        gap: 17px;
        padding: 17px 58px 17px 17px;
        text-align: left;
    }

    .contact-choice-card__content {
        text-align: left;
    }

    .contact-choice-card__arrow {
        right: 17px;
        bottom: 50%;
        transform: translateY(50%);
    }

    .contact-choice-card:hover .contact-choice-card__arrow {
        transform: translate(4px, 50%);
    }
}

/* ==========================================================================
   ТЕЛЕФОН
   ========================================================================== */

@media (max-width: 520px) {
    .contact-choice-modal__dialog {
        width: calc(100% - 18px) !important;
        margin: 14px auto !important;
    }

    .contact-choice-modal__content {
        padding: 42px 15px 20px;
        border-radius: 20px !important;
    }

    .contact-choice-modal__close {
        top: 9px;
        right: 9px;
        width: 37px;
        height: 37px;
        font-size: 26px;
    }

    .contact-choice-modal__header {
        margin-bottom: 24px;
    }

    .contact-choice-modal__eyebrow {
        margin-bottom: 13px;
        padding: 7px 14px;
        font-size: 11px;
    }

    .contact-choice-modal__header h2 {
        font-size: 23px !important;
    }

    .contact-choice-modal__header p {
        font-size: 14px !important;
    }

    .contact-choice-card {
        min-height: 88px;
        gap: 13px;
        padding: 14px 48px 14px 14px;
        border-radius: 16px;
    }

    .contact-choice-card__abbr {
        width: 50px;
        height: 50px;
        border-radius: 14px;
        font-size: 13px;
    }

    .contact-choice-card--email .contact-choice-card__abbr {
        font-size: 22px;
    }

    .contact-choice-card__content strong {
        font-size: 15px;
    }

    .contact-choice-card__content small {
        max-width: 180px;
        font-size: 12px;
    }

    .contact-choice-card__arrow {
        right: 12px;
        width: 29px;
        height: 29px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .contact-choice-card__arrow {
        display: none;
    }

    .contact-choice-card {
        padding-right: 14px;
    }

    .contact-choice-card__content small {
        max-width: 160px;
        white-space: normal;
    }
}

/* ==========================================================================
   ВСПЛЫВАЮЩЕЕ ОКНО И РАЗМЫТИЕ ЗАДНЕГО ФОНА
   ========================================================================== */

/* Сам слой модального окна не должен иметь белый фон */

.contact-choice-modal {
    padding-right: 0 !important;
    background: transparent !important;
}

/* Размытый задний фон */

.modal-backdrop {
    background: rgba(15, 23, 42, 0.48) !important;
    opacity: 0 !important;
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
    transition:
        opacity 0.3s ease,
        backdrop-filter 0.3s ease,
        -webkit-backdrop-filter 0.3s ease !important;
}

.modal-backdrop.in {
    background: rgba(15, 23, 42, 0.48) !important;
    opacity: 1 !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Компактное всплывающее окно */

.contact-choice-modal .contact-choice-modal__dialog {
    position: relative !important;
    width: calc(100% - 40px) !important;
    max-width: 880px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 65px auto !important;
}

/* Стеклянная поверхность окна */

.contact-choice-modal .contact-choice-modal__content {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 130px) !important;
    padding: 44px 38px 38px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 26px !important;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(251, 191, 36, 0.17),
            transparent 36%
        ),
        rgba(255, 255, 255, 0.93) !important;
    box-shadow:
        0 30px 85px rgba(15, 23, 42, 0.3),
        0 8px 24px rgba(15, 23, 42, 0.12) !important;
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
}

/* Анимация появления */

.contact-choice-modal.fade .contact-choice-modal__dialog {
    opacity: 0;
    transform: translateY(28px) scale(0.96) !important;
    transition:
        opacity 0.3s ease,
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.contact-choice-modal.in .contact-choice-modal__dialog {
    opacity: 1;
    transform: translateY(0) scale(1) !important;
}

/* Карточки немного отделяем от стеклянного фона */

.contact-choice-modal .contact-choice-card {
    background: rgba(255, 255, 255, 0.86) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.contact-choice-modal .contact-choice-card:hover,
.contact-choice-modal .contact-choice-card:focus {
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Убираем белый фон, который может добавлять шаблон Joomla */

.contact-choice-modal .modal-content,
.contact-choice-modal .modal-dialog {
    background-color: transparent;
}

/* ==========================================================================
   ПЛАНШЕТ
   ========================================================================== */

@media (max-width: 800px) {
    .contact-choice-modal .contact-choice-modal__dialog {
        width: calc(100% - 28px) !important;
        max-width: 650px !important;
        margin: 35px auto !important;
    }

    .contact-choice-modal .contact-choice-modal__content {
        max-height: calc(100vh - 70px) !important;
        padding: 42px 27px 28px !important;
    }
}

/* ==========================================================================
   ТЕЛЕФОН
   ========================================================================== */

@media (max-width: 520px) {
    .modal-backdrop.in {
        -webkit-backdrop-filter: blur(7px);
        backdrop-filter: blur(7px);
    }

    .contact-choice-modal .contact-choice-modal__dialog {
        width: calc(100% - 18px) !important;
        margin: 12px auto !important;
    }

    .contact-choice-modal .contact-choice-modal__content {
        max-height: calc(100vh - 24px) !important;
        padding: 42px 15px 20px !important;
        border-radius: 20px !important;
    }
}