/**
 * @file pattern-editor.css - Styles for Pattern Editor
 */

/* Pattern Editor View */
.pattern-editor-view {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.pattern-editor-header {
    text-align: center;
    margin-bottom: 30px;
}

.pattern-editor-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
}

@media (max-width: 1024px) {
    .pattern-editor-layout {
        grid-template-columns: 1fr;
    }
}

.pattern-editor-main {
    min-height: 600px;
}

.pattern-editor-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Pattern Library */
.pattern-library-header {
    margin-bottom: 20px;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.pattern-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pattern-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

.pattern-card.selected {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

.pattern-card-header {
    text-align: center;
    margin-bottom: 10px;
}

.pattern-icon {
    font-size: 2.5em;
    display: block;
    margin-bottom: 8px;
}

.pattern-name {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.pattern-preview {
    margin: 12px 0;
    border-radius: 6px;
    overflow: hidden;
    background: #1a1a2e;
}

.pattern-preview-canvas {
    width: 100%;
    height: 80px;
    display: block;
}

.pattern-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pattern-duration {
    font-size: 0.9em;
    color: #aaa;
}

.pattern-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

/* Parameter Editor */
.parameter-editor {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.parameter-editor-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.parameter-controls {
    margin-bottom: 25px;
}

.parameter-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: #aaa;
    font-size: 0.95em;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #00d4ff;
}

.form-select[multiple] {
    padding: 8px;
}

.form-select option {
    padding: 8px;
    background: #1a1a2e;
    color: #fff;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-value {
    color: #00d4ff;
    font-weight: 600;
    font-size: 1.05em;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0096ff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff, #0096ff);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.4);
}

.number-input {
    max-width: 100px;
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-unit {
    color: #aaa;
    font-weight: 600;
}

/* Keyframe Editor */
.keyframe-editor {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.keyframe-editor-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3);
}

.keyframe-canvas-container {
    background: #1a1a2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
}

.keyframe-canvas {
    display: block;
    width: 100%;
    cursor: crosshair;
    border-radius: 4px;
}

.keyframe-controls {
    margin-bottom: 20px;
}

.keyframe-details {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.keyframe-editor-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Live Controls */
.live-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.pattern-preview-live {
    background: #1a1a2e;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

#livePreviewCanvas {
    width: 100%;
    display: block;
    border-radius: 4px;
}

.live-preview-info {
    margin-top: 8px;
    text-align: center;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.live-status {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.status-label {
    color: #aaa;
    font-size: 0.9em;
}

.status-value {
    font-weight: 600;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0096ff);
    color: white;
}

.btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
}

.btn-success:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: white;
}

.btn-danger:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-lg {
    padding: 14px 24px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Utility Classes */
.text-gray-400 {
    color: #aaa;
}

.text-white {
    color: #fff;
}

.text-green-400 {
    color: #00ff88;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.py-8 {
    padding-top: 32px;
    padding-bottom: 32px;
}

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

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
}
