/* ========================================
   FLOATING CCTV BUTTON
   ======================================== */
.floating-cctv-btn {
    position: fixed;
    bottom: 144px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    z-index: 9997;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    animation: pulse-cctv 2s infinite;
}

.floating-cctv-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(52, 152, 219, 0.6);
    color: white;
}

.floating-cctv-btn:active {
    transform: scale(0.95);
}

@keyframes pulse-cctv {
    0% {
        box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(52, 152, 219, 0.7), 0 0 0 15px rgba(52, 152, 219, 0.1);
    }

    100% {
        box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    }
}

.cctv-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.cctv-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #333;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.floating-cctv-btn:hover .cctv-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

.recording-indicator {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 12px;
    height: 12px;
    background: #ffd700;
    border: 2px solid white;
    border-radius: 50%;
    animation: blink-recording 1s infinite;
}

@keyframes blink-recording {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ========================================
   FLOATING BENCANA BUTTON
   ======================================== */
.floating-bencana-btn {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
    z-index: 9997;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    animation: pulse-bencana 2s infinite;
}

.floating-bencana-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(231, 76, 60, 0.6);
    color: white;
}

.floating-bencana-btn:active {
    transform: scale(0.95);
}

@keyframes pulse-bencana {
    0% {
        box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(231, 76, 60, 0.7), 0 0 0 15px rgba(231, 76, 60, 0.1);
    }

    100% {
        box-shadow: 0 4px 20px rgba(231, 76, 60, 0.4);
    }
}

.bencana-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.bencana-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #333;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.floating-bencana-btn:hover .bencana-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

.emergency-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 12px;
    height: 12px;
    background: #ff0000;
    border: 2px solid white;
    border-radius: 50%;
    animation: blink-emergency 0.8s infinite;
}

@keyframes blink-emergency {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* ========================================
   FLOATING WHATSAPP CALL CENTER BUTTON
   ======================================== */
.floating-call-center {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9998;
}

.call-center-button {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    animation: pulse-wa 2s infinite;
}

.call-center-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.call-center-button:active {
    transform: scale(0.95);
}

.emergency-icon {
    position: relative;
    width: 24px;
    height: 24px;
}

.phone-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    fill: white;
}

@keyframes ring-phone {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    10%, 30% {
        transform: translate(-50%, -50%) rotate(-15deg);
    }
    20%, 40% {
        transform: translate(-50%, -50%) rotate(15deg);
    }
}

.call-center-button:hover .phone-icon {
    animation: ring-phone 1s ease-in-out infinite;
}

@keyframes pulse-wa {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7), 0 0 0 15px rgba(37, 211, 102, 0.1);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

.wa-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.wa-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #333;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.floating-call-center:hover .wa-tooltip {
    opacity: 1;
    visibility: visible;
    right: 80px;
}

.online-indicator {
    position: absolute;
    top: 0px;
    right: 0px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    border: 2px solid white;
    border-radius: 50%;
    animation: blink-indicator 1.5s infinite;
}

@keyframes blink-indicator {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .floating-cctv-btn {
        bottom: 138px;
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .floating-bencana-btn {
        bottom: 74px;
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .floating-call-center {
        bottom: 14px;
        right: 14px;
    }

    .call-center-button {
        width: 44px;
        height: 44px;
    }

    .emergency-icon {
        width: 22px;
        height: 22px;
    }

    .phone-icon {
        width: 16px;
        height: 16px;
    }

    .wa-tooltip,
    .cctv-tooltip,
    .bencana-tooltip {
        display: none;
    }
}