.ysgo-wa {
    --ysgo-wa-green: #20b86a;
    --ysgo-wa-green-dark: #118c50;
    --ysgo-wa-ink: #12322c;
    position: fixed;
    z-index: 99990;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
    font-family: "Nunito Sans", "Avenir Next", sans-serif;
}

.ysgo-wa.is-right { right: max(24px, calc(env(safe-area-inset-right) + 16px)); }
.ysgo-wa.is-left { left: max(24px, calc(env(safe-area-inset-left) + 16px)); }

.ysgo-wa__link {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 62px;
    gap: 12px;
    padding: 9px 18px 9px 10px;
    color: var(--ysgo-wa-ink);
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(18, 50, 44, 0.1);
    border-radius: 999px;
    box-shadow: 0 14px 38px rgba(18, 50, 44, 0.2), 0 3px 10px rgba(18, 50, 44, 0.08);
    text-decoration: none;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    isolation: isolate;
}

.ysgo-wa__link:hover,
.ysgo-wa__link:focus-visible {
    color: var(--ysgo-wa-ink);
    border-color: rgba(32, 184, 106, 0.38);
    box-shadow: 0 18px 46px rgba(18, 50, 44, 0.25), 0 4px 12px rgba(18, 50, 44, 0.1);
    text-decoration: none;
    transform: translateY(-3px);
}

.ysgo-wa__link:focus-visible {
    outline: 3px solid rgba(32, 184, 106, 0.35);
    outline-offset: 4px;
}

.ysgo-wa__icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 8px;
    color: #fff;
    background: linear-gradient(145deg, var(--ysgo-wa-green), var(--ysgo-wa-green-dark));
    border-radius: 50%;
    filter: drop-shadow(0 5px 8px rgba(17, 140, 80, 0.25));
}

.ysgo-wa__pulse {
    position: absolute;
    z-index: 0;
    left: 10px;
    top: 9px;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(32, 184, 106, 0.42);
    border-radius: 50%;
    animation: ysgo-wa-pulse 2.8s ease-out infinite;
}

.is-left .ysgo-wa__pulse { left: 10px; }

.ysgo-wa__copy { display: grid; line-height: 1.15; }
.ysgo-wa__eyebrow { margin-bottom: 4px; color: #657b76; font-size: 10px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.ysgo-wa__label { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }

@keyframes ysgo-wa-pulse {
    0%, 42% { opacity: 0; transform: scale(0.9); }
    55% { opacity: 0.7; }
    82%, 100% { opacity: 0; transform: scale(1.55); }
}

@media (max-width: 640px) {
    .ysgo-wa { bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px)); }
    .ysgo-wa.is-right { right: max(14px, calc(env(safe-area-inset-right) + 10px)); }
    .ysgo-wa.is-left { left: max(14px, calc(env(safe-area-inset-left) + 10px)); }
    .ysgo-wa__link { min-width: 58px; min-height: 58px; padding: 7px; }
    .ysgo-wa__icon { width: 44px; height: 44px; }
    .ysgo-wa__pulse { left: 7px; top: 7px; }
    .is-left .ysgo-wa__pulse { left: 7px; }
    .ysgo-wa__copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ysgo-wa__link { transition: none; }
    .ysgo-wa__pulse { animation: none; }
}

@media print {
    .ysgo-wa { display: none !important; }
}
