/* ==========================================================================
   Designye Call Now – Frontend Styles
   Version: 2.0.0
   ========================================================================== */

/* ── Wrapper ──────────────────────────────────────────────────────────────── */
#designye-call-now-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    /* Smooth entrance */
    animation: dcn-slide-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes dcn-slide-in {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Base Button ──────────────────────────────────────────────────────────── */
.designye-cn-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 50px;
    text-decoration: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    color: #ffffff !important;
    background-color: var(--btn-color, #25d366);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    overflow: hidden;
    transition:
        transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease,
        filter 0.25s ease;
    /* Prevent text selection */
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.designye-cn-btn:hover,
.designye-cn-btn:focus-visible {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.22),
        0 4px 10px rgba(0, 0, 0, 0.14);
    filter: brightness(1.08);
    outline: none;
}

.designye-cn-btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.18),
        0 1px 4px rgba(0, 0, 0, 0.10);
    filter: brightness(0.95);
}

/* ── Icon ─────────────────────────────────────────────────────────────────── */
.designye-cn-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.designye-cn-btn__icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* ── Label ────────────────────────────────────────────────────────────────── */
.designye-cn-btn__label {
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ── Pulse Ring Animation ─────────────────────────────────────────────────── */
.designye-cn-btn__pulse {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: transparent;
    border: 2px solid var(--btn-color, #25d366);
    opacity: 0;
    animation: dcn-pulse 2.8s ease-out infinite;
    pointer-events: none;
}

@keyframes dcn-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.18);
        opacity: 0;
    }
    100% {
        transform: scale(1.18);
        opacity: 0;
    }
}

/* Stagger pulse so the two buttons don't pulse in sync */
.designye-cn-btn--whatsapp .designye-cn-btn__pulse {
    animation-delay: 0s;
}

.designye-cn-btn--call .designye-cn-btn__pulse {
    animation-delay: 1.4s;
}

/* ── WhatsApp-specific overrides ──────────────────────────────────────────── */
.designye-cn-btn--whatsapp {
    /* WhatsApp green is the default --btn-color */
}

/* ── Call-specific overrides ──────────────────────────────────────────────── */
.designye-cn-btn--call {
    /* Caller blue is the default --btn-color */
}

/* ── Ripple effect on click ───────────────────────────────────────────────── */
.designye-cn-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.designye-cn-btn:active::after {
    opacity: 1;
}

/* ── Responsive: smaller screens ─────────────────────────────────────────── */
@media (max-width: 480px) {
    #designye-call-now-wrapper {
        bottom: 16px;
        right: 16px;
        gap: 10px;
    }

    .designye-cn-btn {
        padding: 12px 18px;
        font-size: 14px;
    }

    .designye-cn-btn__icon {
        width: 20px;
        height: 20px;
    }
}

/* ── RTL support ──────────────────────────────────────────────────────────── */
[dir="rtl"] #designye-call-now-wrapper {
    right: auto;
    left: 24px;
    align-items: flex-start;
}

@media (max-width: 480px) {
    [dir="rtl"] #designye-call-now-wrapper {
        left: 16px;
    }
}
