/**
 * AI Wedding Invitation Designer - Editor Styles
 */

.aiwid-editor-container {
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.app {
    width: 100%;
}

.app-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-bottom: 2px solid #5568d3;
}

.app-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.app-content {
    display: flex;
    min-height: 600px;
}

.sidebar {
    padding: 15px;
    background: #f9fafb;
}

.sidebar-left {
    width: 220px;
    border-right: 1px solid #e0e0e0;
}

.sidebar-right {
    width: 220px;
    border-left: 1px solid #e0e0e0;
}

.sidebar h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.main-area {
    flex: 1;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #ffffff;
}

/* Toolbar */
.toolbar-buttons button {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 10px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.toolbar-buttons button:hover {
    background: #005a87;
}

.toolbar-buttons button:active {
    transform: translateY(1px);
}

.toolbar-buttons button:last-child {
    background: #00a32a;
    margin-top: 20px;
    font-weight: 600;
}

.toolbar-buttons button:last-child:hover {
    background: #008a20;
}

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

.canvas-container {
    border: 2px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f5f5f5;
    padding: 10px;
}

.canvas-info {
    margin-top: 15px;
}

.canvas-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* Layers */
.layers-list {
    max-height: 500px;
    overflow-y: auto;
}

.layer-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.layer-item:hover {
    border-color: #007cba;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.layer-item span {
    font-size: 14px;
    color: #333;
}

.layer-item button {
    padding: 6px 12px;
    background: #dc3232;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.layer-item button:hover {
    background: #a92323;
}

/* Loading and Error States */
.loading,
.error {
    padding: 40px 20px;
    text-align: center;
    font-size: 16px;
}

.loading {
    color: #666;
}

.error {
    color: #dc3232;
    background: #fef7f7;
    border: 1px solid #dc3232;
    border-radius: 4px;
    margin: 20px;
}

/* Scrollbar styling */
.layers-list::-webkit-scrollbar {
    width: 8px;
}

.layers-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.layers-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.layers-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .app-content {
        flex-direction: column;
    }

    .sidebar-left,
    .sidebar-right {
        width: 100%;
        border: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .sidebar-right {
        border-top: 1px solid #e0e0e0;
    }
}