/* CCTV specific styles */

.cctv-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.cctv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--purple-primary);
}

.cctv-thumbnail-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.cctv-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.cctv-card:hover .cctv-thumbnail {
    opacity: 1;
    transform: scale(1.05);
}

.cctv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.cctv-card:hover .cctv-overlay {
    opacity: 1;
}

.btn-play-cctv {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.cctv-card:hover .btn-play-cctv {
    transform: scale(1.1);
    background: var(--purple-primary);
    border-color: var(--purple-primary);
}

.cctv-status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #22c55e;
}

.status-online .status-dot {
    background-color: #22c55e;
    box-shadow: 0 0 10px #22c55e;
    animation: pulse 2s infinite;
}

.status-offline .status-dot {
    background-color: #94a3b8;
    box-shadow: none;
    animation: none;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.cctv-info {
    padding: 1.25rem;
}

.cctv-location-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.cctv-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Modal specific styles */
.cctv-video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.cctv-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.location-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.detail-item label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.detail-item p {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.map-placeholder {
    height: 200px;
    background-color: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    border: 2px dashed #cbd5e1;
}

@media (max-width: 767px) {
    .location-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}