/* Blur Video Area Tool Styles (Timeline Edition) */

/* === Timeline Slider === */
.timeline-container {
    width: 100%;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.timeline-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
}

.timeline-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.timeline-playhead {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: #dc3545;
    pointer-events: none;
    z-index: 10;
}

.timeline-playhead::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    width: 10px;
    height: 10px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid #fff;
}

[data-bs-theme="dark"] .timeline-wrapper {
    background: #2b3035;
}

[data-bs-theme="dark"] .timeline-header {
    color: #adb5bd;
}

/* === Canvas & Video Player === */
.blur-canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
}

.blur-selection-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.blur-overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    pointer-events: auto;
}

.video-canvas-wrapper {
    position: relative;
}

/* === Blur Regions List === */
.blur-regions-list {
    min-height: 100px;
}

.blur-region-item {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.blur-region-item:hover {
    border-color: #adb5bd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blur-region-item.active {
    background: #e7f3ff;
    border-color: #0d6efd;
}

.region-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.region-item-name {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
}

.region-item-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.region-item-details .badge {
    font-size: 12px;
    font-weight: 500;
}

/* === Keyframes List === */
.keyframes-list {
    min-height: 60px;
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.keyframe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.keyframe-item:last-child {
    margin-bottom: 0;
}

.keyframe-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.keyframe-info strong {
    font-size: 14px;
    color: #212529;
}

.keyframe-info .text-muted {
    font-size: 12px;
}

/* === Video Preview === */
.video-preview-wrapper {
    position: relative;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-preview {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* === Range Slider === */
.form-range {
    height: 8px;
}

.form-range::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
}

/* === Badge Styling === */
#blurIntensityValue {
    font-size: 14px;
    padding: 6px 12px;
}

#regionsCount {
    font-size: 13px;
    padding: 4px 10px;
}

/* === Dark Mode === */
[data-bs-theme="dark"] .blur-canvas-container {
    background-color: #1a1a1a;
}

[data-bs-theme="dark"] .video-preview-wrapper {
    background-color: #1a1a1a;
}

[data-bs-theme="dark"] .blur-region-item {
    background: #2b3035;
    border-color: #495057;
}

[data-bs-theme="dark"] .blur-region-item:hover {
    border-color: #6c757d;
}

[data-bs-theme="dark"] .blur-region-item.active {
    background: #1a3a52;
    border-color: #0d6efd;
}

[data-bs-theme="dark"] .region-item-name {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .keyframes-list {
    background: #2b3035;
}

[data-bs-theme="dark"] .keyframe-item {
    background: #1a1d20;
    border-color: #495057;
}

[data-bs-theme="dark"] .keyframe-info strong {
    color: #f8f9fa;
}

/* === Responsive === */
@media (max-width: 768px) {
    .blur-canvas-container {
        margin-bottom: 1rem;
    }

    .blur-selection-canvas,
    .blur-overlay-canvas {
        max-height: 400px;
        object-fit: contain;
    }

    .region-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .region-item-actions {
        width: 100%;
    }

    .keyframe-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .keyframe-item .btn {
        width: 100%;
    }
}

/* === Loading State === */
.blur-canvas-container.loading {
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blur-canvas-container.loading::after {
    content: "Loading video preview...";
    color: #6c757d;
    font-size: 14px;
}

/* === Animation === */
.blur-region-item,
.keyframe-item {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Scrollbar Styling === */
.keyframes-list::-webkit-scrollbar {
    width: 8px;
}

.keyframes-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.keyframes-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.keyframes-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[data-bs-theme="dark"] .keyframes-list::-webkit-scrollbar-track {
    background: #1a1d20;
}

[data-bs-theme="dark"] .keyframes-list::-webkit-scrollbar-thumb {
    background: #495057;
}

[data-bs-theme="dark"] .keyframes-list::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}
