/**
 * Annotation Layer Component Styles
 * 
 * Styles for the annotation layer system including:
 * - Annotation layer rows and headers
 * - Marker segments and visualization
 * - Editing states and controls
 * - Preview overlays and indicators
 * 
 * @author Your Name
 * @version 1.0.0
 */

/* ============================================================================
   ANNOTATION LAYERS SECTION
   ============================================================================ */

.annotation-layers-section {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 16px;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.annotation-layers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    color: #fff;
}



.annotation-layers-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.add-layer-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.add-layer-btn:hover {
    background: #45a049;
}

.annotation-layers-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

/* ============================================================================
   ANNOTATION LAYER ROW
   ============================================================================ */

.annotation-layer {
    background: #1a1a1a;
    border-radius: 6px;
    border: 1px solid #444;
    overflow: hidden;
    transition: border-color 0.2s;
}

.annotation-layer.editable {
    border-color: #ffaa00;
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.3);
}

.annotation-layer.pending {
    border: 2px dashed #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

.annotation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #333;
    border-bottom: 1px solid #444;
}

.layer-name {
    flex: 1;
    background: #2a2a2a;
    border: 1px solid #555;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 14px;
    min-width: 120px;
}

.layer-color {
    width: 32px;
    height: 24px;
    border: 1px solid #555;
    border-radius: 3px;
    cursor: pointer;
    background: none;
}

.overlay-checkbox {
    width: 16px;
    height: 16px;
    margin: 0 4px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.layer-file {
    display: none;
}

.file-upload-btn {
    background: #666;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.file-upload-btn:hover {
    background: #777;
}

.edit-layer-btn, .export-layer-btn, .remove-layer-btn {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    transition: color 0.2s;
}

.edit-layer-btn:hover {
    color: #ffaa00;
}

.export-layer-btn:hover {
    color: #4CAF50;
}

.remove-layer-btn:hover {
    color: #ff4444;
}

.annotation-status {
    padding: 4px 12px;
    font-size: 12px;
    color: #888;
}

.editable-indicator {
    color: #ffaa00;
    font-weight: 500;
}

/* ============================================================================
   ANNOTATION TIMELINE
   ============================================================================ */

.annotation-timeline {
    position: relative;
    height: 40px;
    background: #1a1a1a;
    overflow: hidden;
    width: 100%;
    min-width: 100%;
}

.marker-segment {
    position: absolute;
    height: 30px;
    top: 5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    z-index: 10;
    min-width: 4px;
}

.marker-segment:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}



.marker-segment.pending {
    border: 2px dashed #ffaa00;
    background: rgba(255, 170, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.pending-annotation-indicator {
    position: absolute;
    height: 100%;
    background: #ffaa00;
    opacity: 0.3;
    pointer-events: none;
    border-radius: 3px;
}

/* ============================================================================
   ANNOTATION CONTROLS
   ============================================================================ */

.annotation-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 20px;
}

.annotation-controls .control-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #444;
    color: #ccc;
    font-size: 14px;
    position: relative;
    overflow: hidden;
    gap: 4px;
}

.annotation-controls .control-btn:hover {
    background-color: #555;
    color: #fff;
    transform: scale(1.05);
}

.annotation-controls .control-btn:active {
    transform: scale(0.95);
}

.annotation-controls .control-btn.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.annotation-controls .control-btn.danger:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.35);
    transform: scale(1.05) translateY(-1px);
}

.annotation-controls .control-btn.danger:active {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    transform: scale(0.95);
}

.annotation-controls .control-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.annotation-controls .control-btn .icon {
    font-size: 18px;
    line-height: 1;
    font-weight: bold;
}

.annotation-controls .control-btn.danger .icon {
    font-size: 20px;
    font-weight: 900;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.annotation-controls .control-btn .label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.annotation-controls .control-btn.danger .label {
    font-weight: 600;
    letter-spacing: 0.8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   PREVIEW OVERLAY
   ============================================================================ */

.annotation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px;
    border-radius: 8px 8px 0 0;
    z-index: 10;
    cursor: pointer;
}

.annotation-info {
    text-align: center;
}

.annotation-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.annotation-description {
    font-size: 14px;
    color: #ccc;
}

/* ============================================================================
   PREVIEW BORDER HIGHLIGHT
   ============================================================================ */

.preview-window.annotation-active {
    border: 4px solid;
    border-radius: 8px;
    animation: borderPulse 2s infinite;
}

@keyframes borderPulse {
    0%, 100% { border-color: currentColor; }
    50% { border-color: rgba(255, 255, 255, 0.5); }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .annotation-layers-section {
        padding: 12px;
    }
    
    .annotation-header {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .layer-name {
        min-width: 100px;
        font-size: 13px;
    }
    
    .annotation-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .annotation-controls .control-btn {
        font-size: 11px;
        padding: 4px 8px;
    }
} 