/**
 * Video Editor Styles
 */

/* Modal Overlay */
.scp-video-editor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.9);
}

.scp-video-editor-modal.active,
.scp-video-editor-modal[aria-hidden="false"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-video-editor-content {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.scp-video-editor-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Left Sidebar - Tools */
.scp-editor-sidebar {
    width: 300px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scp-editor-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
}

.scp-editor-tab {
    flex: 1;
    padding: 15px 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.scp-editor-tab:hover {
    background: #f0f0f0;
    color: #333;
}

.scp-editor-tab.active {
    background: #0073aa;
    color: #fff;
}

.scp-editor-tab .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.scp-editor-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.scp-editor-panel.active {
    display: block;
}

.scp-editor-panel h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.scp-editor-panel h4 {
    margin: 20px 0 10px 0;
    font-size: 16px;
    font-weight: 500;
    color: #555;
}

/* Filter Controls */
.scp-filter-control {
    margin-bottom: 20px;
}

.scp-filter-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.scp-filter-control label span:first-child {
    display: block;
    margin-bottom: 5px;
}

.scp-filter-control input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.scp-filter-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

.scp-filter-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
}

.scp-filter-control .filter-value {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #0073aa;
    min-width: 50px;
}

.scp-filter-presets {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.scp-filter-preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.scp-filter-preset {
    padding: 10px 15px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}

.scp-filter-preset:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f0f7ff;
}

.scp-filter-preset.active {
    border-color: #0073aa;
    background: #0073aa;
    color: #fff;
}

/* Text Overlay Panel */
.scp-text-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scp-text-panel-header h3 {
    margin: 0;
}

#scp-add-text-overlay {
    padding: 8px 15px;
    font-size: 13px;
    height: auto;
    line-height: 1.4;
}

.scp-text-overlays-list {
    margin-bottom: 20px;
}

.scp-text-overlay-item {
    padding: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-text-overlay-item:hover {
    border-color: #0073aa;
    background: #f0f7ff;
}

.scp-text-overlay-item.active {
    border-color: #0073aa;
    background: #e7f3ff;
}

.scp-text-overlay-item strong {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.scp-text-overlay-item small {
    font-size: 12px;
    color: #999;
}

.scp-text-editor-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 20px;
}

.scp-form-group {
    margin-bottom: 15px;
}

.scp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.scp-form-group input[type="text"],
.scp-form-group input[type="number"],
.scp-form-group input[type="color"],
.scp-form-group textarea,
.scp-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.scp-form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.scp-form-row {
    display: flex;
    gap: 15px;
}

.scp-form-row .scp-form-group {
    flex: 1;
}

.scp-form-group input[type="checkbox"] + label {
    display: inline;
    margin-left: 5px;
    font-weight: normal;
}

.scp-effect-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.scp-effect-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    margin-bottom: 0;
}

.scp-effect-options input[type="color"] {
    width: 40px;
    height: 30px;
    padding: 0;
    border: none;
    cursor: pointer;
}

.scp-effect-options input[type="number"] {
    width: 60px;
    padding: 4px 8px;
}

.scp-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.scp-form-actions .button {
    flex: 1;
}

/* Center Preview */
.scp-editor-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    overflow: hidden;
    position: relative;
}

.scp-preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#scp-editor-video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#scp-editor-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.scp-preview-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #1a1a1a;
    border-top: 1px solid #333;
}

.scp-preview-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #333;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.scp-preview-btn:hover {
    background: #555;
}

.scp-preview-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.scp-timeline-container {
    flex: 1;
    position: relative;
    height: 50px;
}

.scp-timeline {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #555;
    outline: none;
    -webkit-appearance: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.scp-timeline::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
}

.scp-timeline::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0073aa;
    cursor: pointer;
    border: none;
}

.scp-timeline-text-overlays {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    pointer-events: none;
}

.scp-timeline-text-marker {
    position: absolute;
    height: 100%;
    background: rgba(0, 115, 170, 0.3);
    border-radius: 2px;
    pointer-events: none;
}

.scp-time-display {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Right Sidebar - Timeline */
.scp-editor-timeline-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
}

.scp-editor-timeline-sidebar h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.scp-text-timeline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Footer */
.scp-editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.scp-editor-footer-left {
    flex: 1;
}

.scp-editor-footer-right {
    display: flex;
    gap: 10px;
}

.scp-editor-footer .button {
    padding: 8px 20px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1200px) {
    .scp-editor-sidebar {
        width: 250px;
    }
    
    .scp-editor-timeline-sidebar {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .scp-video-editor-content {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .scp-video-editor-wrapper {
        flex-direction: column;
    }
    
    .scp-editor-sidebar {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .scp-editor-timeline-sidebar {
        width: 100%;
        max-height: 150px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }
}

