/* Enhanced Page Builder Layout */
.enhanced-page-builder {
    display: flex;
    flex-direction: column;
    height: 100vh;

}

/* Page Builder Header */
.page-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--admin-primary-gradient);
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    gap: 20px;
    border-radius: 8px 8px 0 0;
}

.page-info {
    display: flex;
    gap: 20px;
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 4px;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.form-control {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    background: white;
    color: #333;
    transform: translateY(-1px);
}

/* Page Selector Dropdown */
.page-selector {
    min-width: 250px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-selector option {
    padding: 8px;
    background: white;
    color: #333;
}

.page-selector option[value="new"] {
    font-weight: 600;
    color: #007bff;
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* Page Builder Content - Expanded Layout */
.page-builder-content {
    flex: 1;
    overflow: hidden;
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.expanded-builder-area {
    width: 100%;
    height: 100%;
    flex: 1;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Removed Pages Panel Styles - Now using dropdown
.pages-panel {
    width: 300px;
    background: white;
    border-left: 1px solid #e9ecef;
    padding: 20px;
    overflow-y: auto;
}

.pages-panel h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}
*/

/* Removed Page List Styles - Now using dropdown
.pages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.page-item {
    padding: 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}
*/

/* Removed Page Item Styles - Now using dropdown
.page-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.page-item.active {
    background: #e3f2fd;
    border-color: #2196f3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.page-item h4 {
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.page-slug {
    color: #6c757d;
    font-size: 14px;
    margin: 4px 0;
    font-family: monospace;
}

.page-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    background: #28a745;
    color: white;
    margin-top: 8px;
}
*/

/* Page Preview */
.page-preview {
    padding: 40px;
    background: white;
    margin: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    min-height: calc(100vh - 200px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.page-preview h1 {
    color: #333;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e9ecef;
}

.preview-content {
    line-height: 1.6;
}

.preview-component {
    margin-bottom: 24px;
}

.component-content {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

/* Button Styles */
.btn {
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    /* Default to large size */
    padding: 20px 40px;
    font-size: 18px;
}

/* Button Size Classes */
.btn-small {
    padding: 8px 16px !important;
    font-size: 12px !important;
}

.btn-medium {
    padding: 12px 24px !important;
    font-size: 14px !important;
}

.btn-large {
    padding: 20px 40px !important;
    font-size: 18px !important;
}

.btn-xl {
    padding: 32px 64px !important;
    font-size: 24px !important;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn-primary {
    background: var(--admin-primary-gradient);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #138496 0%, #0f6674 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

/* Alert Styles */
.alert {
    padding: 16px 20px;
    margin: 16px 24px;
    border-radius: 8px;
    border: 1px solid transparent;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    color: #0f5132;
    background: linear-gradient(135deg, rgba(212, 237, 218, 0.9) 0%, rgba(198, 233, 205, 0.9) 100%);
    border-color: rgba(160, 207, 177, 0.5);
}

.alert-danger {
    color: #721c24;
    background: linear-gradient(135deg, rgba(248, 215, 218, 0.9) 0%, rgba(245, 198, 203, 0.9) 100%);
    border-color: rgba(220, 53, 69, 0.3);
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .pages-panel {
        width: 250px;
    }
    
    .page-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-control {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .page-builder-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .page-info {
        flex-direction: column;
        gap: 12px;
    }
    
    .page-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .page-builder-content {
        padding: 12px;
    }
    
    .expanded-builder-area {
        min-height: 70vh;
        border-radius: 4px;
    }
    
    .page-selector {
        min-width: 200px;
    }
    
    .page-preview {
        margin: 16px;
        padding: 20px;
    }
    
    .form-control {
        min-width: auto;
    }
}