/* Design Canvas Styles for Personalklader.se */

.design-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    gap: 1.5rem;
    min-height: calc(100vh - 120px);
}

/* Left Panel - Tools */
.design-tools {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
}

.design-tools h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Canvas Area */
.canvas-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-wrapper {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.canvas-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.view-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.view-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

#designCanvas {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

/* Right Panel - Uploads & Properties */
.design-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.upload-zone {
    background: white;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
}

.upload-zone svg {
    width: 48px;
    height: 48px;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.upload-zone p {
    color: #6b7280;
    font-size: 0.875rem;
}

.upload-zone .supported-formats {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Uploaded Designs List */
.designs-list {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.designs-list h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.design-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.design-item:hover {
    background: #f3f4f6;
}

.design-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: #f9fafb;
}

.design-item-info {
    flex: 1;
    min-width: 0;
}

.design-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.design-item-size {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Properties Panel */
.properties-panel {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.properties-panel h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.property-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.property-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.property-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

/* Size Controls */
.size-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.size-btn {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.size-btn:hover {
    background: #f3f4f6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.875rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-danger:hover {
    background: #fecaca;
}

/* Loading State */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .design-container {
        grid-template-columns: 1fr;
    }
    
    .design-tools,
    .design-sidebar {
        order: 1;
    }
    
    .canvas-area {
        order: 0;
    }
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    background: #111827;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
