/* RemoteCam - Custom Styles */

/* Status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-online { background: #198754; }
.status-offline { background: #6c757d; }
.status-error { background: #dc3545; }
.status-camera_offline { background: #ffc107; }
.status-shooting { 
    background: #0d6efd; 
    animation: pulse 1.5s infinite;
}
.status-maintenance { background: #ffc107; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-header {
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}

/* Tables */
.table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

.table > thead {
    background: var(--bs-tertiary-bg);
}

/* Buttons */
.btn-outline-primary:hover i,
.btn-outline-success:hover i,
.btn-outline-info:hover i,
.btn-outline-warning:hover i {
    color: #fff;
}

/* Grid cards for files */
.file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.file-card {
    position: relative;
    border-radius: 8px;
    background: var(--bs-tertiary-bg);
}

.file-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

/* Device card */
.device-card {
    transition: all 0.2s;
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
}

/* Form styling */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Consistent form label spacing */
.form-label,
.form-group > label,
.field > label,
label.control-label {
    margin-bottom: 0.375rem;
    font-weight: 500;
}

/* Ensure ActiveForm fields have consistent spacing */
.field {
    margin-bottom: 1rem;
}

/* Form hints/help text */
.form-text,
.hint-block {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-top: 0.25rem;
}

/* Error messages */
.invalid-feedback,
.help-block-error {
    font-size: 0.875rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .main-body {
        padding: 1rem;
    }
}

/* ── Object Fit ──────────────────────────────────────── */

.object-fit-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ── Image Cards ─────────────────────────────────────── */

.image-card {
    text-decoration: none;
    color: inherit;
}

.image-card a {
    text-decoration: none;
    color: inherit;
}

.image-card:hover .ratio {
    opacity: 0.85;
}

.image-card .form-check-input {
    width: 1.25em;
    height: 1.25em;
    cursor: pointer;
}

.image-card.selected .ratio {
    outline: 3px solid var(--bs-primary);
    outline-offset: -3px;
}

/* ── Video Play Overlay ──────────────────────────────── */

.play-overlay {
    transition: transform 0.2s;
}

.card-img-top:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

/* ── File Card Overlays ──────────────────────────────── */

.file-card-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
}

.file-card-badges {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 10;
}

.file-card-meta {
    position: absolute;
    bottom: 4px;
    left: 4px;
    z-index: 10;
    font-size: 0.65rem;
}

/* ── Video Card Image ────────────────────────────────── */

.video-card-image {
    height: 200px;
    cursor: pointer;
}

/* ── Avatar ──────────────────────────────────────────── */

.avatar-sm {
    width: 40px;
    height: 40px;
}

.avatar-xl {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
}
