/* VIA Derm — нижняя/боковая панель быстрой связи. Бежево-золотой стиль. */

:root {
    --qc-bg:        #14140e;
    --qc-bg-soft:   rgba(20, 20, 14, .92);
    --qc-gold:      #d4af37;
    --qc-gold-soft: #cbab72;
    --qc-beige:     #e8d8a8;
    --qc-line:      rgba(212, 175, 55, .22);
}

.quick-contact {
    position: fixed;
    z-index: 9990;
    pointer-events: none;
    font-family: inherit;
}
.quick-contact a {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qc-gold);
    text-decoration: none;
    transition: color .2s ease, background .25s ease, border-color .2s ease, transform .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.quick-contact svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: filter .2s ease;
}
/* Любые брендовые SVG → принудительно в золото (#d4af37) */
.quick-contact img {
    display: block;
    width: 22px;
    height: 22px;
    filter: brightness(0) saturate(100%) invert(72%) sepia(48%) saturate(560%) hue-rotate(4deg) brightness(92%) contrast(86%);
    transition: filter .2s ease;
    pointer-events: none;
}

/* ─── Mobile: тонкая нижняя панель ─────────────────────────────────── */
@media (max-width: 767.98px) {
    .quick-contact {
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        background: var(--qc-bg-soft);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--qc-line);
        box-shadow: 0 -10px 28px rgba(0, 0, 0, .35);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .quick-contact a {
        flex-direction: column;
        gap: 4px;
        height: 60px;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: .04em;
        color: var(--qc-beige);
        position: relative;
    }
    .quick-contact a + a::before {
        content: "";
        position: absolute;
        left: 0;
        top: 22%;
        bottom: 22%;
        width: 1px;
        background: var(--qc-line);
    }
    .quick-contact a:active {
        background: rgba(212, 175, 55, .08);
    }
    .quick-contact svg,
    .quick-contact img { width: 22px; height: 22px; }

    body { padding-bottom: 60px; }
}

/* ─── Desktop / tablet: правый рейл ────────────────────────────────── */
@media (min-width: 768px) {
    .quick-contact {
        right: 18px;
        bottom: 24px;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .quick-contact a {
        width: 46px;
        height: 46px;
        border-radius: 50%;
        background: var(--qc-bg);
        border: 1px solid rgba(212, 175, 55, .35);
        box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
        position: relative;
    }
    .quick-contact a:hover,
    .quick-contact a:focus-visible {
        background: var(--qc-gold);
        border-color: transparent;
        color: #14140e;
        transform: translateY(-2px);
    }
    .quick-contact a:hover img,
    .quick-contact a:focus-visible img {
        /* при наведении делаем иконку тёмной поверх золотого фона */
        filter: brightness(0) invert(8%) sepia(8%) saturate(800%) hue-rotate(15deg);
    }

    .quick-contact a .qc-label {
        position: absolute;
        right: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: var(--qc-bg);
        color: var(--qc-beige);
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
        padding: 7px 10px;
        border-radius: 6px;
        white-space: nowrap;
        border: 1px solid var(--qc-line);
        opacity: 0;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
    }
    .quick-contact a:hover .qc-label,
    .quick-contact a:focus-visible .qc-label {
        opacity: 1;
        transform: translateY(-50%) translateX(-2px);
    }

    /* Тонкое золотое свечение на «Подзвонити» — едва заметное */
    .qc-call::after {
        content: "";
        position: absolute;
        inset: -1px;
        border-radius: 50%;
        box-shadow: 0 0 0 0 rgba(212, 175, 55, .4);
        animation: qcPulse 2.6s ease-out infinite;
        pointer-events: none;
    }
    @keyframes qcPulse {
        0%   { box-shadow: 0 0 0 0  rgba(212, 175, 55, .35); }
        70%  { box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
        100% { box-shadow: 0 0 0 0  rgba(212, 175, 55, 0);   }
    }
}

@media (prefers-reduced-motion: reduce) {
    .quick-contact a, .qc-call::after { animation: none !important; transition: none !important; }
}
