/* style.css for Image Editor */

.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 700px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
    gap: 1.5rem;
}

/* Toolbar */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-radius: 16px;
    flex-shrink: 0;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.toolbar-right {
    justify-content: flex-end;
}

.toolbar-center {
    flex: 1;
    text-align: center;
}

.action-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

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

.action-btn.icon-only {
    padding: 0.6rem;
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
.action-btn.icon-only:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
}

.primary-btn {
    background: var(--accent-secondary);
    color: white;
}
.primary-btn:hover:not(:disabled) {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.magic-btn {
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: filter 0.2s;
}
.magic-btn:hover:not(:disabled) {
    filter: brightness(1.2);
}
.magic-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
}

.status-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Main Workspace */
.editor-workspace {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}

/* Left Panel: Settings */
.inspector-panel {
    width: 320px;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    flex-shrink: 0;
}

/* Custom Scrollbar */
.inspector-panel::-webkit-scrollbar { width: 6px; }
.inspector-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.panel-section h3 {
    font-size: 1rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tools Grid */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-btn {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.tool-btn:hover:not(:disabled) {
    color: var(--text-main);
    background: rgba(255,255,255,0.1);
}

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

.aspect-ratios {
    display: flex;
    gap: 0.5rem;
}

.aspect-btn {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.4rem 0;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}
.aspect-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}
.aspect-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-primary);
    color: var(--text-main);
}

/* Sliders */
.slider-group {
    margin-bottom: 1.2rem;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

input[type="range"] {
    width: 100%;
    appearance: none;
    background: rgba(255,255,255,0.1);
    height: 4px;
    border-radius: 2px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
}
input[type="range"]:disabled {
    opacity: 0.3;
}

/* Progress Bar */
.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-secondary);
    transition: width 0.3s;
}

/* Right Area: Preview */
.preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(0,0,0,0.4);
    min-width: 0;
}

.canvas-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-placeholder {
    text-align: center;
    color: var(--text-muted);
}
.image-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Cropper Overrides for Dark Theme */
.cropper-view-box,
.cropper-face {
    border-radius: 0;
}
.cropper-line,
.cropper-point {
    background-color: var(--accent-primary) !important;
}

@media (max-width: 900px) {
    .editor-workspace {
        flex-direction: column;
    }
    .inspector-panel {
        width: 100%;
    }
    .preview-area {
        height: 400px;
    }
}
