/**
 * Layout Editor Styles
 *
 * Styles for the multi-panel layout editor interface
 */

/* Main editor container */
.layout-editor-tab {
    padding: 20px 0;
}

/* Panel preview section */
.panel-preview-section {
    margin-bottom: 30px;
}

.panel-preview-section h4 {
    margin-bottom: 10px;
    font-weight: 600;
}

.panel-thumbnails {
    margin-top: 20px;
}

.panel-thumbnail-item {
    margin-bottom: 20px;
}

.panel-thumbnail-item .thumbnail {
    border: 2px solid #ddd;
    transition: all 0.3s;
    cursor: pointer;
}

.panel-thumbnail-item .thumbnail:hover {
    border-color: #337ab7;
    box-shadow: 0 0 8px rgba(51, 122, 183, 0.3);
    transform: translateY(-2px);
}

.panel-svg-preview {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    overflow: hidden;
    position: relative;
}

.panel-svg-preview svg {
    max-width: 100%;
    max-height: 100%;
}

.panel-svg-preview .no-preview {
    text-align: center;
    color: #999;
}

.panel-svg-preview .no-preview i {
    font-size: 48px;
    margin-bottom: 10px;
}

.panel-thumbnail-item .caption {
    padding: 10px;
    min-height: 60px;
}

.panel-thumbnail-item .caption strong {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

/* Editor actions */
.layout-editor-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-top: 20px;
}

/* Modal styling */
#layout-editor-modal .modal-dialog {
    width: 95%;
    max-width: 1400px;
}

#layout-editor-modal .modal-body {
    padding: 0;
}

/* Toolbar */
.layout-editor-toolbar {
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.layout-editor-toolbar .btn-group {
    margin-right: 10px;
    margin-bottom: 5px;
}

.layout-editor-toolbar .btn {
    font-size: 13px;
}

.layout-editor-toolbar .btn.active {
    background-color: #337ab7;
    color: white;
    border-color: #2e6da4;
}

.layout-editor-toolbar .btn i {
    margin-right: 4px;
}

.layout-editor-toolbar .pull-right {
    margin-left: auto;
}

/* Canvas container */
.layout-editor-canvas-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #ffffff;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#layout-editor-canvas {
    display: block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Status bar */
.layout-editor-status {
    padding: 8px 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    font-size: 12px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.layout-editor-status.status-success {
    background: #d4edda;
    color: #155724;
}

.layout-editor-status.status-error {
    background: #f8d7da;
    color: #721c24;
}

/* Modal footer */
#layout-editor-modal .modal-footer {
    border-top: 1px solid #ddd;
    padding: 15px;
    background: #f9f9f9;
}

#layout-editor-modal .modal-footer .btn {
    margin-left: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .layout-editor-toolbar {
        padding: 8px;
    }

    .layout-editor-toolbar .btn-group {
        margin-right: 5px;
    }

    .layout-editor-toolbar .btn {
        font-size: 11px;
        padding: 5px 8px;
    }

    .layout-editor-canvas-container {
        height: 400px;
    }

    #layout-editor-modal .modal-dialog {
        width: 100%;
        margin: 10px;
    }
}

/* Loading state */
.layout-editor-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
}

.layout-editor-loading i {
    font-size: 48px;
    color: #337ab7;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
