/* =============================================
   Dual Call Button – CSS
   ============================================= */

#dcb-wrapper {
    position: fixed;
    bottom: 28px;
    right: 22px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none; /* wrapper ne blokira klik */
}

/* ── Pulse animacije ── */
@keyframes dcb-pulse {
    0%   { transform: scale(1);    opacity: 0.55; }
    70%  { transform: scale(1.85); opacity: 0;    }
    100% { transform: scale(1.85); opacity: 0;    }
}

#dcb-pulse-ring,
#dcb-pulse-ring-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.45);
    transform: translate(-50%, -50%) scale(1);
    animation: dcb-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

#dcb-pulse-ring-2 {
    animation-delay: 0.75s;
}

/* ── Glavno dugme ── */
#dcb-main-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #16a34a;           /* zelena */
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    transition: background 0.25s ease, transform 0.18s ease, box-shadow 0.25s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

#dcb-main-btn:hover {
    background: #15803d;
    transform: scale(1.07);
    box-shadow: 0 6px 28px rgba(22, 163, 74, 0.65);
}

#dcb-main-btn:active {
    transform: scale(0.94);
}

/* Kad je meni otvoren – tamnija nijansa */
#dcb-main-btn.dcb-open {
    background: #15803d;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.4);
}

/* Pulse se gasi kad je otvoren */
#dcb-main-btn.dcb-open #dcb-pulse-ring,
#dcb-main-btn.dcb-open #dcb-pulse-ring-2 {
    animation: none;
    opacity: 0;
}

/* ── Sub dugmad ── */
.dcb-sub-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 18px 11px 14px;
    border-radius: 50px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    pointer-events: all;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0,0,0,0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.22s ease;

    /* Sakriveno stanje */
    opacity: 0;
    transform: translateY(14px) scale(0.92);
    pointer-events: none;
}

.dcb-sub-btn:hover {
    transform: translateY(0) scale(1.04) !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.28);
}

.dcb-sub-btn:active {
    transform: scale(0.96) !important;
}

/* Boje sub dugmadi */
#dcb-btn-klime {
    background: linear-gradient(135deg, #0284c7, #0ea5e9); /* plava – klima */
    transition-delay: 0.06s;
}

#dcb-btn-struja {
    background: linear-gradient(135deg, #d97706, #f59e0b); /* narandžasta – struja */
    transition-delay: 0s;
}

/* Ikone u sub dugmadima */
.dcb-sub-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

/* ── Otvoreno stanje ── */
#dcb-wrapper.dcb-menu-open .dcb-sub-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Redosled animacije: struja se pojavljuje pre klime (bliže dugmetu) */
#dcb-wrapper.dcb-menu-open #dcb-btn-struja {
    transition-delay: 0s;
}

#dcb-wrapper.dcb-menu-open #dcb-btn-klime {
    transition-delay: 0.08s;
}

/* ── Overlay za zatvaranje klikom izvan ── */
#dcb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
}

#dcb-overlay.dcb-active {
    display: block;
}

/* ── Mobilni uređaji – uvek vidljivo; na desktopu po izboru ── */
@media (min-width: 1025px) {
    /* Ostaviti vidljivo i na desktopu jer i desktop posjetioci klikaju */
    #dcb-wrapper {
        bottom: 32px;
        right: 28px;
    }
}
