/*!
 * UAK Tracking — sabit (sticky) WhatsApp + telefon widget'ı.
 *
 * TEMA ÇAKIŞMASI KURALI: bu dosyada `!important` YOKTUR. woodmart/Elementor'un genel
 * `a{}`, `button{}`, `svg{}` kuralları tek sınıflı seçicileri yendiği için burada
 * bilinçli olarak iki/üç sınıflı seçiciler kullanılır:
 *   `a{color}`        (0,0,1) < `.uakt-stick .uakt-pill`        (0,2,0)
 *   `a:hover{color}`  (0,1,1) < `.uakt-stick .uakt-pill:hover`  (0,3,0)
 * Bu yüzden aşağıdaki seçicileri "sadeleştirmeyin" — özgüllük kasıtlıdır.
 *
 * Renkler `--uakt-wa` / `--uakt-tel` custom property'lerinden gelir; değerleri
 * PHP tarafı inline style ile yazar (ayarlardan).
 */

/* =====================================================================
   1) Masaüstü: sağ altta pill yığını
   ===================================================================== */

.uakt-stick {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0;

    /* KRİTİK: sarmalayıcı tıklamayı YUTMAZ. Pill'ler arasındaki şeffaf boşluk
       ve yığının etrafındaki alan altındaki içeriğe geçirilir. */
    pointer-events: none;
}

.uakt-stick--left {
    right: auto;
    left: 20px;
    align-items: flex-start;
}

.uakt-stick .uakt-pill {
    /* KRİTİK: tıklanabilir olan YALNIZ pill'in kendisidir. */
    pointer-events: auto;

    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 11px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--uakt-tel, #0b2545);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 200ms ease, opacity 200ms ease;
}

.uakt-stick .uakt-pill--wa {
    background: var(--uakt-wa, #25d366);
}

.uakt-stick .uakt-pill--tel {
    background: var(--uakt-tel, #0b2545);
}

/* Hover/focus: 2px yükselme. Geçiş YALNIZ transform/opacity — renk/gölge animasyonu yok. */
.uakt-stick .uakt-pill:hover,
.uakt-stick .uakt-pill:focus {
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    opacity: .96;
}

.uakt-stick .uakt-pill:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.uakt-stick .uakt-pill:active {
    transform: translateY(0);
}

.uakt-stick .uakt-pill .uakt-pill__label {
    color: inherit;
    font: inherit;
    white-space: nowrap;
}

/* =====================================================================
   2) İkonlar
   ===================================================================== */

.uakt-stick .uakt-pill .uakt-ico,
.uakt-bar .uakt-tab .uakt-ico {
    display: block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    fill: currentColor;
    stroke: none;
    vertical-align: middle;
}

/* =====================================================================
   3) Mobil bar (≤820px) — masaüstünde tamamen gizli
   ===================================================================== */

.uakt-bar,
.uakt-bar-spacer {
    display: none;
}

@media (max-width: 820px) {

    /* İkisi asla aynı viewport'ta bulunmaz. */
    .uakt-stick {
        display: none;
    }

    .uakt-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9990;
        display: flex;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        /* iPhone çentik/ev çubuğu alanı. */
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--uakt-tel, #0b2545);
        box-shadow: 0 -2px 14px rgba(0, 0, 0, .16);
    }

    .uakt-bar .uakt-tab {
        display: flex;
        flex: 1 1 0;
        align-items: center;
        justify-content: center;
        gap: 8px;
        box-sizing: border-box;
        min-width: 0;
        /* Dokunma hedefi ≥44px; bar toplamı ≤76px. */
        min-height: 56px;
        padding: 10px 12px;
        border: 0;
        color: #fff;
        font-family: inherit;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.2;
        text-decoration: none;
    }

    .uakt-bar .uakt-tab--wa {
        background: var(--uakt-wa, #25d366);
    }

    .uakt-bar .uakt-tab--tel {
        background: var(--uakt-tel, #0b2545);
    }

    .uakt-bar .uakt-tab:hover,
    .uakt-bar .uakt-tab:focus,
    .uakt-bar .uakt-tab:active {
        color: #fff;
        text-decoration: none;
    }

    .uakt-bar .uakt-tab:focus-visible {
        outline: 3px solid #fff;
        outline-offset: -4px;
    }

    .uakt-bar .uakt-tab .uakt-tab__label {
        color: inherit;
        font: inherit;
        white-space: nowrap;
    }

    /* Sabit bar sayfanın son satırını kapatmasın: akışta aynı yükseklikte boşluk.
       (body padding'ine dokunmak woodmart yerleşimini bozabilirdi.) */
    .uakt-bar-spacer {
        display: block;
        width: 100%;
        height: 56px;
        height: calc(56px + env(safe-area-inset-bottom, 0px));
        pointer-events: none;
    }
}

/* =====================================================================
   4) Erişilebilirlik / yazdırma
   ===================================================================== */

@media (prefers-reduced-motion: reduce) {

    .uakt-stick .uakt-pill {
        transition: none;
    }

    .uakt-stick .uakt-pill:hover,
    .uakt-stick .uakt-pill:focus,
    .uakt-stick .uakt-pill:active {
        transform: none;
    }
}

@media print {

    .uakt-stick,
    .uakt-bar,
    .uakt-bar-spacer {
        display: none;
    }
}
