/* TidyLetter Newsletter Builder - Production-Ready Styles */

/* Navigation Active State */
.nav-links a.active {
    color: #6366f1;
    font-weight: 600;
}

/* Authentication Gate */
.auth-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 40px 20px;
}

.auth-gate-content {
    text-align: center;
    background: white;
    padding: 60px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    animation: fadeIn 0.5s ease-out;
}

.auth-gate-content h1 {
    margin: 0 0 16px 0;
    font-size: 32px;
    color: #1f2937;
}

.auth-gate-content p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 16px;
}

.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #6366f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link a:hover {
    color: #4f46e5;
}

/* Newsletter Builder Main Layout */
.newsletter-builder {
    background: #f8fafc;
    min-height: 100vh;
}

/* Hero Section */
.builder-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.builder-hero-content h1 {
    font-size: 48px;
    margin: 0 0 16px 0;
    font-weight: 800;
}

.builder-hero-content p {
    font-size: 20px;
    margin: 0 0 32px 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.builder-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Editor Layout */
.newsletter-editor {
    padding: 40px 0 140px 0;
}

/* Move footer down */
.footer {
    margin-top: 20px;
}

.editor-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 24px;
    padding: 0 20px;
    min-height: 1000px;
}

/* Editor Sidebar */
.editor-sidebar {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    height: fit-content;
    max-height: calc(100vh - 100px); /* Prevent footer overlap but allow natural growth */
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Add scroll to the ENTIRE sidebar when needed */
}

.sidebar-section {
    padding: 16px 20px;
    flex-shrink: 0; /* Prevent sections from shrinking by default */
}

/* Make the first section (Add Content) use only needed space */
.sidebar-section:first-child {
    flex: 0 0 auto; /* Don't grow, use content size */
}

/* Make saved blocks section grow naturally with content */
.sidebar-section.saved-blocks-section {
    /* Remove flex constraints - let it grow naturally */
    display: block; /* Back to normal block layout */
}

.sidebar-section.saved-blocks-section .saved-blocks-container {
    /* Remove flex - let it size to content */
    min-height: 60px;
}

.sidebar-section:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

/* Ensure templates section has fixed reasonable space */
.sidebar-section:last-child {
    flex: 0 0 auto; /* Don't grow or shrink, use content size */
    min-height: 120px; /* Minimum space for templates section */
    max-height: 140px; /* Cap the height to prevent taking too much space */
}

.sidebar-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.template-subtext {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Block List */
.block-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.block-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid #f3f4f6;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
    background: white;
    margin-bottom: 8px;
}

.block-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.block-item.dragging {
    opacity: 0.8;
    cursor: grabbing;
    transform: rotate(5deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    border-color: #6366f1;
}

.block-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.block-info {
    flex: 1;
}

.block-info strong {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
}

.block-info small {
    font-size: 11px;
    color: #6b7280;
}

/* Canvas */
.editor-canvas {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    min-height: 800px;
    position: relative;
}

.canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafbfc;
}

.canvas-title input {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.canvas-title input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 2px #6366f1;
}

.canvas-actions {
    display: flex;
    gap: 12px;
}

/* Newsletter Canvas */
.newsletter-canvas {
    padding: 32px 24px;
    min-height: 500px;
    position: relative;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: #374151;
}

.empty-state p {
    font-size: 16px;
    margin: 0 0 24px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Drag & Drop Visual Feedback */
.newsletter-canvas.drag-over {
    background: #fef7ff;
    border: 2px dashed #8b5cf6;
}

.newsletter-canvas.show-drop-zones {
    background: #fafafa;
}

.drop-indicator {
    height: 40px;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    transition: all 0.2s;
    opacity: 0.6;
}

.drop-indicator.active {
    border-color: #6366f1;
    background: #eff6ff;
    opacity: 1;
    transform: scale(1.02);
}

.drop-line {
    width: 100%;
    height: 2px;
    background: #d1d5db;
    border-radius: 1px;
}

.drop-indicator.active .drop-line {
    background: #6366f1;
}

.drop-text {
    position: absolute;
    font-size: 12px;
    color: #6b7280;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.drop-indicator.active .drop-text {
    color: #6366f1;
}

/* Newsletter Blocks */
.newsletter-block {
    margin: 16px 0;
    padding: 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s;
    background: #fafbfc;
}

.newsletter-block:hover {
    border-color: #e5e7eb;
    background: white;
}

.newsletter-block.selected {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    background: white;
    /* Removed box-shadow to prevent layout reflow */
}

.newsletter-block .block-content {
    position: relative;
}

/* Block Controls */
.block-controls {
    position: absolute;
    top: -16px;
    right: -16px;
    display: none;
    gap: 4px;
    background: white;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
}

.newsletter-block:hover .block-controls,
.newsletter-block.selected .block-controls {
    display: flex;
}

.block-control-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: white;
    color: #6b7280;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.block-control-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.block-control-btn.delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Block Types */
.text-content {
    min-height: 20px;
    outline: none;
    line-height: 1.6;
}

.text-content:focus {
    background: #fffbeb;
    border-radius: 4px;
    padding: 8px;
    margin: -8px;
}

/* Enhanced contenteditable styles for proper single-click cursor positioning */
.editable-content {
    outline: none !important;
    cursor: text !important;
    position: relative;
    min-height: 1em;
    /* Ensure the element can receive and handle clicks naturally */
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.editable-content:hover {
    cursor: text !important;
}

.editable-content:focus {
    cursor: text !important;
}

/* Ensure text selection is visible */
.editable-content::selection {
    background: rgba(99, 102, 241, 0.2);
}

.editable-content::-moz-selection {
    background: rgba(99, 102, 241, 0.2);
}

/* Make sure parent elements don't interfere with text editing */
.newsletter-block .block-content {
    position: relative;
    /* Removed pointer-events manipulation to let natural event flow work */
}

.image-content {
    position: relative;
    display: inline-block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 6px;
}

.image-content:hover .image-overlay {
    opacity: 1;
}

.image-edit-btn {
    background: white;
    color: #374151;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.image-edit-btn:hover {
    background: #f9fafb;
    transform: scale(1.05);
}

.newsletter-button {
    transition: all 0.2s;
}

.newsletter-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.spacer-content {
    position: relative;
    min-height: 20px;
}

.spacer-label {
    opacity: 0.7;
    user-select: none;
}

.newsletter-block:hover .spacer-label {
    opacity: 1;
}

/* Properties Panel */
.editor-properties {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.editor-properties h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.editor-properties h4 {
    margin: 0 0 16px 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.property-group {
    margin-bottom: 16px;
}

.property-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.property-group input,
.property-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
}

.property-group input:focus,
.property-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.property-group input[type="color"] {
    height: 40px;
    padding: 4px;
    cursor: pointer;
}

.property-group input[type="number"] {
    text-align: center;
}

/* Modals */
.export-modal,
.templates-modal,
.preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 90%;
    max-height: 90%;
    width: 800px;
    z-index: 2;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #e5e7eb;
    color: #374151;
}

.modal-body {
    padding: 32px;
}

/* Preview Modal */
.preview-modal-content {
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    max-height: 800px;
}

.preview-modal .modal-body {
    padding: 0;
    height: calc(100% - 80px); /* Account for header */
    max-height: none;
    overflow: hidden;
}

.preview-container {
    height: 100%;
    padding: 20px;
    background: #f8fafc;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Export Modal */
.export-description {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
}

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border: 2px solid #6366f1;
    border-radius: 12px;
    background: #6366f1;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.export-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.export-icon {
    font-size: 24px;
}

.export-info strong {
    display: block;
    font-size: 16px;
    color: white;
    margin-bottom: 4px;
}

.export-info small {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.html-preview {
    margin-top: 32px;
}

.html-preview label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #374151;
}

.html-preview textarea {
    width: 100%;
    height: 300px;
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    resize: vertical;
    background: #f9fafb;
}

/* Templates Modal */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.template-card {
    border: 2px solid #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.template-card:hover {
    border-color: #6366f1;
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.template-preview {
    height: 180px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f3f4f6;
    overflow: hidden;
}

.template-preview-content {
    width: 100%;
    height: 100%;
}

.preview-blocks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 12px;
    background: white;
    border-radius: 4px;
    margin: 4px;
}

.preview-block {
    border-radius: 3px;
    overflow: hidden;
}

/* Text Preview */
.preview-text {
    padding: 10px;
    background: #f8f9fa;
    border-left: 3px solid #e9ecef;
    min-height: 20px;
}

.preview-text-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-line {
    height: 4px;
    background: #adb5bd;
    border-radius: 2px;
}

.preview-line-full {
    width: 100%;
}

.preview-line-medium {
    width: 75%;
}

.preview-line-short {
    width: 50%;
}

/* Heading Preview */
.preview-heading {
    padding: 8px 12px;
    background: #343a40;
    color: white;
    min-height: 20px;
}

.preview-heading-text {
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Image Preview */
.preview-image {
    height: 40px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #90caf9;
}

.preview-image-placeholder {
    font-size: 18px;
    opacity: 0.7;
}

/* Button Preview */
.preview-button {
    padding: 4px 0;
    text-align: center;
}

.preview-button-element {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Divider Preview */
.preview-divider {
    padding: 6px 0;
    display: flex;
    align-items: center;
}

.preview-divider-line {
    height: 1px;
    background: #d1d5db;
    width: 100%;
}

/* Spacer Preview */
.preview-spacer {
    height: 16px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        #f1f3f4 2px,
        #f1f3f4 4px
    );
    opacity: 0.5;
}

/* Footer Preview */
.preview-footer {
    padding: 8px 12px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.preview-footer-text {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
}

/* Preview More Indicator */
.preview-more {
    padding: 6px 12px;
    background: #f1f3f4;
    color: #5f6368;
    font-size: 10px;
    text-align: center;
    border-radius: 2px;
    font-weight: 500;
}

/* Custom Template Previews */

/* Enhanced Hero + CTA Preview */
.preview-hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    margin-bottom: 6px;
    overflow: hidden;
}

.preview-hero-image {
    height: 35px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    position: relative;
}

.preview-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 4px;
}

.preview-hero-title {
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 1px;
}

.preview-hero-subtitle {
    font-size: 8px;
    opacity: 0.9;
}

.preview-cta-section {
    text-align: center;
    margin: 6px 0;
}

.preview-button-large {
    margin-bottom: 3px;
}

.preview-cta-button {
    background: #ff6b6b !important;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.preview-subtext {
    font-size: 8px;
    color: #666;
    margin-top: 2px;
}

.preview-features {
    background: #f8f9fa;
    padding: 6px 8px;
    border-radius: 3px;
    margin-top: 4px;
}

.preview-feature {
    font-size: 8px;
    color: #28a745;
    margin: 1px 0;
    font-weight: 500;
}

/* Enhanced Two Column Preview */
.preview-newsletter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 6px;
}

.preview-logo {
    font-size: 10px;
    font-weight: bold;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 2px;
}

.preview-date {
    font-size: 8px;
    color: #7f8c8d;
}

.preview-two-column {
    display: flex;
    gap: 6px;
    margin: 6px 0;
}

.preview-column {
    flex: 1;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.preview-article-image {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.preview-feature-image {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.preview-column-image {
    width: 100%;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 4px;
}

.preview-image-label {
    color: white;
    font-size: 7px;
    font-weight: bold;
    background: rgba(0,0,0,0.3);
    padding: 1px 3px;
    border-radius: 2px;
}

.preview-column-header {
    font-size: 9px;
    font-weight: bold;
    color: #2c3e50;
    padding: 0 6px;
    margin-bottom: 3px;
}

.preview-column-text {
    padding: 0 6px;
    margin-bottom: 4px;
}

.preview-column-text .preview-line {
    height: 2px;
    margin-bottom: 2px;
}

.preview-read-more {
    font-size: 7px;
    color: #3498db;
    padding: 3px 6px;
    text-align: right;
    border-top: 1px solid #ecf0f1;
    background: #f8f9fa;
}

/* Alternating Preview */
.preview-alternating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 3px;
}

.preview-alt-reverse {
    flex-direction: row-reverse;
}

.preview-alt-image {
    width: 30px;
    height: 20px;
    background: linear-gradient(135deg, #fd79a8, #e84393);
    border-radius: 2px;
    flex-shrink: 0;
}

.preview-alt-text {
    flex: 1;
}

.preview-alt-text .preview-line {
    height: 3px;
    margin-bottom: 2px;
}

/* Enhanced Product Preview */
.preview-ecommerce-header {
    background: #2c3e50;
    color: white;
    padding: 6px 8px;
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.preview-store-name {
    font-size: 9px;
    font-weight: bold;
}

.preview-sale-badge {
    background: #e74c3c;
    font-size: 7px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.preview-product-grid {
    display: flex;
    gap: 6px;
    margin: 6px 0;
}

.preview-product-item {
    flex: 1;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.preview-product-badge {
    position: absolute;
    top: 3px;
    left: 3px;
    background: #27ae60;
    color: white;
    font-size: 6px;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
    z-index: 1;
}

.preview-product-tech {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.preview-product-fashion {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.preview-product-image {
    width: 100%;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
    position: relative;
}

.preview-product-icon {
    font-size: 12px;
    opacity: 0.8;
}

.preview-product-name {
    font-size: 8px;
    color: #2c3e50;
    font-weight: 500;
    padding: 0 4px;
    margin-bottom: 2px;
}

.preview-product-rating {
    font-size: 6px;
    color: #f39c12;
    padding: 0 4px;
    margin-bottom: 3px;
}

.preview-price-row {
    padding: 0 4px 4px;
    text-align: center;
}

.preview-old-price {
    font-size: 6px;
    color: #95a5a6;
    text-decoration: line-through;
    margin-right: 3px;
}

.preview-product-price {
    font-size: 9px;
    color: #e74c3c;
    font-weight: bold;
}

.preview-shop-footer {
    text-align: center;
    margin-top: 4px;
}

.preview-shop-button {
    background: #27ae60 !important;
}

.preview-shipping {
    font-size: 7px;
    color: #27ae60;
    margin-top: 2px;
    font-style: italic;
}

/* Welcome Preview */
.preview-welcome-header {
    text-align: center;
    padding: 8px;
    background: #74b9ff;
    color: white;
    border-radius: 3px;
    margin-bottom: 6px;
}

.preview-welcome-icon {
    font-size: 16px;
    margin-bottom: 2px;
}

.preview-welcome-title {
    font-size: 12px;
    font-weight: bold;
}

/* Digest Preview */
.preview-digest-header {
    font-size: 11px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 6px;
    padding-bottom: 3px;
    border-bottom: 2px solid #74b9ff;
}

.preview-digest-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
}

.preview-digest-dot {
    color: #74b9ff;
    font-weight: bold;
    font-size: 12px;
}

.preview-digest-text .preview-line {
    height: 3px;
}

/* Event Preview */
.preview-event-banner {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
    padding: 8px;
    border-radius: 3px;
    text-align: center;
    margin-bottom: 6px;
}

.preview-event-date {
    font-size: 8px;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 2px 4px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 2px;
}

.preview-event-title {
    font-size: 10px;
    font-weight: bold;
}

.preview-event-details {
    padding: 6px 0;
}

.preview-event-details .preview-line {
    height: 3px;
    margin-bottom: 2px;
}

/* Announcement Preview */
.preview-announcement-badge {
    background: #00b894;
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-bottom: 4px;
}

.preview-heading-large {
    font-size: 13px;
    font-weight: bold;
    color: #2d3436;
    margin-bottom: 6px;
}

.preview-heading-small {
    font-size: 10px;
    font-weight: bold;
    color: #636e72;
    margin-bottom: 4px;
}

/* Editorial Preview */
.preview-editorial-header {
    border-left: 3px solid #6c5ce7;
    padding-left: 8px;
    margin-bottom: 6px;
}

.preview-editorial-title {
    font-size: 11px;
    font-weight: bold;
    color: #2d3436;
}

.preview-editorial-author {
    font-size: 8px;
    color: #636e72;
    font-style: italic;
}

.preview-editorial-content .preview-line {
    height: 3px;
    margin-bottom: 3px;
}

/* Minimal Preview */
.preview-minimal-footer {
    text-align: center;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid #e9ecef;
}

.preview-footer {
    height: 12px;
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.preview-more {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.template-info {
    padding: 20px;
}

.template-info h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.template-info p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.template-category {
    display: inline-block;
    padding: 4px 8px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1f2937;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}

.toast.info {
    background: #3b82f6;
}

/* Footer */
.builder-footer {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 40px 0;
    text-align: center;
}

.builder-footer p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 1fr;
        max-width: 800px;
    }
    
    .editor-sidebar,
    .editor-properties {
        position: static;
    }
    
    .builder-hero-content h1 {
        font-size: 36px;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .builder-hero {
        padding: 60px 0;
    }
    
    .builder-hero-content h1 {
        font-size: 28px;
    }
    
    .builder-hero-content p {
        font-size: 16px;
    }
    
    .builder-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-editor {
        padding: 20px 0;
    }
    
    .editor-container {
        padding: 0 16px;
        gap: 16px;
    }
    
    .canvas-header {
        padding: 16px 20px;
    }
    
    .canvas-header .canvas-actions {
        gap: 8px;
    }
    
    .newsletter-canvas {
        padding: 20px 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-header {
        padding: 20px 24px;
    }
    
    .modal-body {
        padding: 24px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .block-controls {
        position: relative;
        top: auto;
        right: auto;
        display: flex;
        margin-top: 16px;
        justify-content: center;
    }
    
    .newsletter-block:hover .block-controls,
    .newsletter-block.selected .block-controls {
        display: flex;
    }
}

/* Builder Hero */
.builder-hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 120px 0 60px;
}

.builder-hero-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.builder-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 16px 0;
    line-height: 1.1;
}

.builder-hero p {
    font-size: 20px;
    margin: 0 0 32px 0;
    opacity: 0.9;
    line-height: 1.6;
}

.builder-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Newsletter Editor */
.newsletter-editor {
    padding: 0;
}

.editor-container {
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    height: calc(100vh - 200px);
    background: white;
}

/* Editor Sidebar */
.editor-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 24px;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.template-subtext {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Block List */
.block-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.block-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: grab;
    transition: all 0.2s;
}

.block-item:hover {
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.block-item:active {
    cursor: grabbing;
}

.block-icon {
    font-size: 20px;
    width: 32px;
    text-align: center;
}

.block-info strong {
    display: block;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 2px;
}

.block-info small {
    font-size: 11px;
    color: #6b7280;
}

/* Editor Canvas */
.editor-canvas {
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.canvas-title input {
    font-size: 18px;
    font-weight: 600;
    border: none;
    background: transparent;
    color: #1f2937;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.canvas-title input:focus {
    outline: none;
    border-color: #6366f1;
    background: white;
}

.canvas-actions {
    display: flex;
    gap: 12px;
}

/* Newsletter Canvas */
.newsletter-canvas {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    min-height: 600px;
    position: relative;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    max-width: 400px;
    margin: 0 auto;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: #1f2937;
}

.empty-state p {
    margin: 0 0 24px 0;
    color: #6b7280;
    font-size: 16px;
}

/* Editor Properties */
.editor-properties {
    background: #f8fafc;
    border-left: 1px solid #e2e8f0;
    padding: 24px;
    overflow-y: auto;
}

.editor-properties h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.property-group {
    margin-bottom: 16px;
}

.property-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.property-group input,
.property-group select,
.property-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.property-group input:focus,
.property-group select:focus,
.property-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Newsletter Blocks */
.newsletter-block {
    margin: 16px 0;
    padding: 16px;
    border: 1px dashed transparent;
    border-radius: 8px;
    position: relative;
    transition: all 0.2s;
}

.newsletter-block:hover {
    border-color: #6366f1;
    background: #f8fafc;
}

.newsletter-block.selected {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    background: #f8fafc;
    /* Removed border changes to prevent layout reflow */
}

.block-controls {
    position: absolute;
    top: -12px;
    right: 8px;
    display: none;
    gap: 4px;
}

.newsletter-block:hover .block-controls,
.newsletter-block.selected .block-controls {
    display: flex;
}

.block-control-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    background: #6366f1;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.block-control-btn:hover {
    background: #5856d6;
}

/* Block Types */
.text-block {
    min-height: 60px;
}

.text-block h1, .text-block h2, .text-block h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
}

.text-block p {
    margin: 0 0 12px 0;
    color: #374151;
    line-height: 1.6;
}

.image-block {
    text-align: center;
}

.image-block img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-placeholder {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    color: #6b7280;
}

.button-block {
    text-align: center;
    padding: 20px 0;
}

/* Newsletter button - DO NOT override inline configuration styles */
.newsletter-button {
    /* Only safe properties that don't conflict with button config */
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    /* Removed: background, color, padding, border-radius - controlled by inline styles */
    /* Removed: display, text-decoration, font-weight - handled by renderButtonBlock */
}

.newsletter-button:hover {
    /* Use opacity instead of background to preserve configured colors */
    opacity: 0.9;
    transform: translateY(-1px);
}

.divider-block {
    text-align: center;
    padding: 20px 0;
}

.newsletter-divider {
    height: 1px;
    background: #e2e8f0;
    max-width: 400px;
    margin: 0 auto;
}

.spacer-block {
    height: 40px;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        #f3f4f6 4px,
        #f3f4f6 8px
    );
    border-radius: 4px;
    opacity: 0.5;
}

.footer-block {
    background: #f8fafc;
    padding: 24px;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.footer-block p {
    margin: 0 0 8px 0;
    color: #6b7280;
    font-size: 14px;
}

/* Drag and Drop */
.drag-over {
    border-color: #6366f1 !important;
    border-style: solid !important;
    background: #f0f9ff !important;
}

.drop-zone {
    min-height: 40px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    transition: all 0.2s;
}

.drop-zone.active {
    border-color: #6366f1;
    background: #f0f9ff;
    color: #6366f1;
}

/* Export Modal */
.export-modal,
.templates-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f3f4f6;
}

.modal-body {
    padding: 32px;
}

.export-description {
    margin: 0 0 24px 0;
    color: #6b7280;
    text-align: center;
}

.export-options {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.export-btn {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.export-btn:hover {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.export-icon {
    font-size: 24px;
}

.export-info strong {
    display: block;
    color: white;
    font-size: 14px;
    margin-bottom: 2px;
}

.export-info small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
}

.html-preview {
    margin-top: 24px;
}

.html-preview label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.html-preview textarea {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    resize: vertical;
    background: #f9fafb;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.template-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.template-preview {
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

.template-info {
    padding: 16px;
}

.template-info h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1f2937;
}

.template-info p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Builder Footer */
.builder-footer {
    background: #1f2937;
    color: #9ca3af;
    text-align: center;
    padding: 24px 0;
}

.builder-footer p {
    margin: 0;
    font-size: 14px;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

/* Buttons */
.btn-primary {
    background: #6366f1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #5856d6;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    color: #6366f1;
    border: 1px solid #6366f1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #6366f1;
    color: white;
}

/* Enhanced Preview Styles */
.preview-step-counter {
    background: #6366f1;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    margin-right: 8px;
}

.preview-welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.preview-welcome-step {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 8px;
    border-radius: 4px;
    font-size: 10px;
}

.preview-digest-section {
    margin: 12px 0;
}

.preview-section-title {
    font-size: 10px;
    font-weight: bold;
    color: #6366f1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-digest-trending {
    border-left: 3px solid #f59e0b;
    padding-left: 8px;
}

.preview-digest-must-read {
    border-left: 3px solid #10b981;
    padding-left: 8px;
}

.preview-newsletter-badge {
    background: #6366f1;
    color: white;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 8px;
}

.preview-article-meta {
    font-size: 8px;
    color: #64748b;
    margin-bottom: 4px;
}

.preview-article-category {
    background: #e2e8f0;
    color: #475569;
    font-size: 8px;
    padding: 2px 4px;
    border-radius: 2px;
    margin-right: 6px;
}

/* Enhanced Hero Overlay */
.preview-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(139, 92, 246, 0.8));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 8px;
}

.preview-hero-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}

.preview-hero-subtitle {
    font-size: 9px;
    opacity: 0.9;
    margin-bottom: 8px;
}

/* Enhanced Features */
.preview-features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px 0;
}

.preview-feature {
    font-size: 9px;
    color: #059669;
    display: flex;
    align-items: center;
}

.preview-feature::before {
    content: "✓";
    margin-right: 6px;
    font-weight: bold;
}

/* Enhanced CTA Section */
.preview-cta-section {
    text-align: center;
    margin: 12px 0;
}

.preview-cta-button {
    background: #6366f1;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 4px;
}

.preview-subtext {
    font-size: 8px;
    color: #64748b;
    font-style: italic;
}

/* Enhanced Product Elements */
.preview-product-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #dc2626;
    color: white;
    font-size: 7px;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: bold;
}

.preview-product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    margin: 4px 0;
}

.preview-stars {
    color: #f59e0b;
    font-size: 9px;
}

.preview-rating-count {
    color: #64748b;
    font-size: 7px;
}

.preview-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.preview-old-price {
    font-size: 8px;
    color: #64748b;
    text-decoration: line-through;
}

.preview-product-price {
    font-size: 10px;
    font-weight: bold;
    color: #dc2626;
}

/* Enhanced Newsletter Header */
.preview-newsletter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

.preview-logo {
    font-size: 11px;
    font-weight: bold;
    color: #1f2937;
}

.preview-date {
    font-size: 8px;
    color: #64748b;
}

/* Enhanced Two Column */
.preview-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.preview-column-header {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
}

.preview-read-more {
    font-size: 8px;
    color: #6366f1;
    font-weight: 500;
    margin-top: 6px;
    cursor: pointer;
}

.preview-read-more::after {
    content: " →";
}

/* Text Formatting Toolbar Styles */
.formatting-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.format-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.format-btn:active {
    background: #6366f1;
    color: white;
    transform: translateY(0);
}

.format-btn[data-format="bold"] {
    font-weight: bold;
}

.format-btn[data-format="italic"] {
    font-style: italic;
}

.format-btn[data-format="underline"] {
    text-decoration: underline;
}

.format-btn[data-format="h1"] {
    font-weight: bold;
    font-size: 14px;
}

.format-btn[data-format="h2"] {
    font-weight: bold;
    font-size: 13px;
}

.format-btn[data-format="h3"] {
    font-weight: bold;
    font-size: 12px;
}

.format-btn[data-format="p"] {
    font-size: 12px;
}

/* Enhanced text editing styles */
.editable-content {
    outline: none !important;
    cursor: text !important;
    position: relative;
    min-height: 1.5em;
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

.editable-content:focus {
    background: rgba(99, 102, 241, 0.05);
    border-radius: 4px;
    padding: 8px;
    margin: -8px;
}

.editable-content h1,
.editable-content h2,
.editable-content h3 {
    margin: 0 0 8px 0;
}

.editable-content p {
    margin: 0 0 16px 0;
}

.editable-content strong,
.editable-content b {
    font-weight: bold;
}

.editable-content em,
.editable-content i {
    font-style: italic;
}

.editable-content u {
    text-decoration: underline;
}

.editable-content ul {
    margin: 0 0 16px 0;
    padding-left: 24px;
    list-style-type: disc;
}

.editable-content ul li {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.editable-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
    list-style-type: decimal;
}

.editable-content ol li {
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.editable-content blockquote {
    margin: 0 0 16px 0;
    padding: 16px 20px;
    border-left: 4px solid #6366f1;
    background: #f8fafc;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.editable-content blockquote p {
    margin: 0;
}

/* New formatting button styles */
.format-btn[data-format="ul"] {
    font-family: Arial, sans-serif;
}

.format-btn[data-format="blockquote"] {
    font-style: italic;
}

.format-btn[data-format="align-left"],
.format-btn[data-format="align-center"], 
.format-btn[data-format="align-right"] {
    font-size: 14px;
}

/* Legacy clear button styles - kept for compatibility */
.format-btn[data-format="clear"] {
    border-color: #dc2626 !important;
    color: #dc2626 !important;
}

.format-btn[data-format="clear"]:hover {
    background: #fef2f2 !important;
    border-color: #b91c1c !important;
}

.format-btn[data-format="clear"]:active {
    background: #dc2626 !important;
    color: white !important;
}

/* Enhanced formatting toolbar layout */
.formatting-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Alignment toolbar specific styling */
.alignment-toolbar {
    background: #fefefe;
    border: 1px solid #d1d5db;
}

.alignment-btn {
    min-width: 70px;
    justify-content: center;
}

.alignment-btn:hover {
    background: #f3f4f6;
    border-color: #6366f1;
}

/* Clear formatting button styling */
.clear-btn {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    font-weight: 500;
}

.clear-btn:hover {
    background: #fee2e2 !important;
    border-color: #f87171 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.clear-btn:active {
    background: #dc2626 !important;
    color: white !important;
    transform: translateY(0);
}

/* Toolbar separators */
.formatting-toolbar .separator {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 4px;
    align-self: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .editor-container {
        grid-template-columns: 240px 1fr;
    }
    
    .editor-properties {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .builder-hero h1 {
        font-size: 36px;
    }
    
    .builder-hero p {
        font-size: 18px;
    }
    
    .builder-hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .editor-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .editor-sidebar {
        order: 1;
        max-height: calc(100vh - 120px); /* Prevent footer overlap on mobile */
    }
    
    /* Adjust sections for mobile */
    .sidebar-section.saved-blocks-section {
        /* Remove constraints - let it grow naturally on mobile too */
    }
    
    .sidebar-section:last-child {
        min-height: 90px; /* Smaller templates section on mobile */
        max-height: 110px; /* Keep templates section constrained on mobile */
    }
    
    .editor-canvas {
        order: 0;
        min-height: 500px;
    }
    
    .canvas-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .canvas-actions {
        justify-content: center;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
}

/* Saved Blocks Styles */
.saved-blocks-subtext {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.saved-blocks-container {
    min-height: 60px;
    /* No overflow or max-height - let it grow naturally with content */
}

/* Sidebar scrollbar styling */
.editor-sidebar::-webkit-scrollbar {
    width: 6px;
}

.editor-sidebar::-webkit-scrollbar-track {
    background: #f8fafc;
    border-radius: 3px;
}

.editor-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.editor-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.saved-blocks-empty {
    text-align: center;
    padding: 20px 0;
    color: #9ca3af;
}

.saved-blocks-empty p {
    margin: 0 0 4px 0;
    font-size: 14px;
}

.saved-blocks-empty small {
    font-size: 12px;
    opacity: 0.8;
}

.saved-block-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s;
}

.saved-block-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.saved-block-item:active {
    cursor: grabbing;
}

.saved-block-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.saved-block-icon {
    color: #6366f1;
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.saved-block-info strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    line-height: 1.2;
}

.saved-block-info small {
    font-size: 11px;
    color: #6b7280;
}

.saved-block-controls {
    display: flex;
    gap: 4px;
}

.saved-block-btn {
    width: 20px;
    height: 20px;
    border: none;
    background: white;
    color: #6b7280;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
}

.saved-block-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.saved-block-btn:first-child:hover {
    background: #dbeafe;
    color: #2563eb;
}

.saved-block-btn:last-child:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Save Button Styles */
.block-control-btn.save-btn {
    background: #10b981 !important;
    color: white !important;
    font-size: 14px !important;
}

.block-control-btn.save-btn:hover {
    background: #059669 !important;
    transform: scale(1.1);
}

/* Toast Notifications for Saved Blocks */
.builder-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1f2937;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
}

.builder-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.builder-toast-success {
    background: #10b981;
}

.builder-toast-error {
    background: #ef4444;
}

.builder-toast-warning {
    background: #f59e0b;
}

/* New Template Preview Styles */

/* Tech Preview */
.preview-tech-header {
    margin-bottom: 8px;
}

.preview-tech-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.preview-tech-title {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 2px;
}

.preview-tech-subtitle {
    font-size: 8px;
    opacity: 0.9;
}

.preview-tech-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.preview-tech-item {
    display: flex;
    align-items: center;
    background: #f8fafc;
    padding: 4px;
    border-radius: 3px;
}

.preview-tech-number {
    background: #3b82f6;
    color: white;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: bold;
    margin-right: 6px;
}

.preview-tech-text {
    flex: 1;
}

/* Creative Preview */
.preview-creative-header {
    text-align: center;
    margin-bottom: 8px;
}

.preview-creative-badge {
    background: #000;
    color: white;
    font-size: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
    display: inline-block;
}

.preview-creative-title {
    font-size: 12px;
    font-weight: 900;
    color: #000;
}

.preview-creative-gradient {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.preview-creative-grid {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.preview-creative-card {
    flex: 1;
    color: white;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 7px;
    font-weight: bold;
}

.preview-creative-red {
    background: #ff6b6b;
}

.preview-creative-teal {
    background: #4ecdc4;
}

.preview-creative-quote {
    background: #f7fafc;
    padding: 6px;
    border-radius: 6px;
}

/* Wellness Preview */
.preview-wellness-header {
    text-align: center;
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8c0 100%);
    color: #2d5a27;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.preview-wellness-icon {
    font-size: 14px;
    margin-bottom: 4px;
}

.preview-wellness-title {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 2px;
}

.preview-wellness-subtitle {
    font-size: 7px;
    opacity: 0.8;
}

.preview-wellness-quote {
    background: #f0f9f4;
    padding: 6px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 8px;
}

.preview-wellness-quote-text {
    font-size: 8px;
    color: #166534;
    font-weight: bold;
    margin-bottom: 4px;
}

.preview-wellness-tips {
    display: flex;
    gap: 6px;
}

.preview-wellness-tip {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fef7f0;
    padding: 4px;
    border-radius: 6px;
}

.preview-wellness-tip-icon {
    font-size: 10px;
    margin-right: 4px;
}

.preview-wellness-tip-text {
    font-size: 7px;
    color: #9a3412;
    font-weight: 600;
}

/* Finance Preview */
.preview-finance-header {
    background: #1e293b;
    color: white;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-finance-title {
    font-size: 9px;
    font-weight: bold;
}

.preview-finance-badge {
    background: #10b981;
    font-size: 6px;
    padding: 2px 6px;
    border-radius: 8px;
}

.preview-finance-metrics {
    display: flex;
    gap: 3px;
    margin-bottom: 8px;
}

.preview-finance-metric {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 4px;
    text-align: center;
}

.preview-finance-value {
    font-size: 9px;
    font-weight: bold;
    margin-bottom: 2px;
}

.preview-finance-label {
    font-size: 6px;
    color: #64748b;
}

.preview-positive {
    color: #10b981;
}

.preview-warning {
    color: #f59e0b;
}

.preview-negative {
    color: #ef4444;
}

.preview-finance-analysis {
    background: #fefce8;
    border-left: 3px solid #eab308;
    padding: 6px;
    border-radius: 3px;
}

/* Travel Preview */
.preview-travel-hero {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), #667eea;
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.preview-travel-title {
    font-size: 14px;
    font-weight: 300;
    margin-bottom: 2px;
}

.preview-travel-subtitle {
    font-size: 7px;
    opacity: 0.9;
}

.preview-travel-destination {
    text-align: center;
    margin-bottom: 8px;
}

.preview-travel-featured {
    font-size: 8px;
    color: #2d3748;
    font-weight: bold;
    margin-bottom: 4px;
}

.preview-travel-location {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: bold;
}

.preview-travel-activities {
    display: flex;
    gap: 6px;
}

.preview-travel-activity {
    flex: 1;
    text-align: center;
    background: #fef3c7;
    padding: 6px;
    border-radius: 8px;
}

.preview-travel-icon {
    font-size: 12px;
    margin-bottom: 4px;
}

.preview-travel-activity-name {
    font-size: 7px;
    color: #92400e;
    font-weight: bold;
}

/* Food Preview */
.preview-food-header {
    background: #fef7ed;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.preview-food-icon {
    font-size: 14px;
    margin-bottom: 4px;
}

.preview-food-title {
    font-size: 10px;
    color: #9a3412;
    font-weight: bold;
    margin-bottom: 2px;
}

.preview-food-subtitle {
    font-size: 7px;
    color: #c2410c;
}

.preview-food-featured {
    background: white;
    border-radius: 8px;
    padding: 6px;
    margin-bottom: 8px;
}

.preview-food-recipe-title {
    font-size: 8px;
    color: #ea580c;
    font-weight: bold;
    margin-bottom: 3px;
}

.preview-food-recipe-name {
    font-size: 9px;
    color: #9a3412;
    margin-bottom: 4px;
}

.preview-food-tags {
    display: flex;
    gap: 3px;
    margin-bottom: 6px;
}

.preview-food-tag {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 5px;
    font-weight: bold;
}

.preview-food-tips {
    display: flex;
    gap: 6px;
}

.preview-food-tip {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fef3c7;
    padding: 4px;
    border-radius: 4px;
}

.preview-food-tip-icon {
    font-size: 8px;
    margin-right: 4px;
}

.preview-food-tip-text {
    font-size: 6px;
    color: #374151;
    font-weight: 600;
}

/* Personal Growth Preview */
.preview-growth-header {
    text-align: center;
    margin-bottom: 8px;
}

.preview-growth-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 6px;
    font-weight: bold;
    margin-bottom: 6px;
    display: inline-block;
}

.preview-growth-title {
    font-size: 11px;
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.preview-growth-challenge {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 8px;
}

.preview-growth-challenge-title {
    font-size: 8px;
    color: #92400e;
    font-weight: bold;
    margin-bottom: 4px;
}

.preview-growth-challenge-text {
    font-size: 7px;
    color: #9a3412;
    margin-bottom: 4px;
}

.preview-growth-challenge-cta {
    background: rgba(255,255,255,0.5);
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 5px;
    color: #92400e;
    font-weight: bold;
    display: inline-block;
}

.preview-growth-areas {
    display: flex;
    gap: 6px;
}

.preview-growth-area {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f0f9ff;
    padding: 4px;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
}

.preview-growth-area-icon {
    font-size: 8px;
    margin-right: 4px;
}

.preview-growth-area-text {
    font-size: 6px;
    color: #1e40af;
    font-weight: 600;
}

/* SaaS Preview */
.preview-saas-header {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.preview-saas-title {
    font-size: 9px;
    color: #1e293b;
    font-weight: bold;
}

.preview-saas-version {
    background: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 6px;
    font-weight: bold;
}

.preview-saas-feature {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.preview-saas-feature-title {
    font-size: 8px;
    font-weight: bold;
    margin-bottom: 3px;
}

.preview-saas-feature-name {
    font-size: 7px;
    margin-bottom: 4px;
}

.preview-saas-feature-tags {
    display: flex;
    gap: 3px;
}

.preview-saas-tag {
    background: rgba(255,255,255,0.2);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 5px;
}

.preview-saas-improvements {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-saas-improvement {
    display: flex;
    align-items: center;
    background: #fefce8;
    padding: 4px;
    border-radius: 4px;
}

.preview-saas-improvement-icon {
    background: #eab308;
    color: white;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    margin-right: 6px;
}

.preview-saas-improvement-text {
    font-size: 7px;
    color: #a16207;
    font-weight: 600;
}

/* Education Preview */
.preview-education-header {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #92400e;
    text-align: center;
    padding: 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.preview-education-icon {
    background: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-bottom: 4px;
}

.preview-education-title {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 2px;
}

.preview-education-subtitle {
    font-size: 7px;
    opacity: 0.9;
}

.preview-education-spotlight {
    background: white;
    border: 2px solid #fde68a;
    border-radius: 8px;
    padding: 6px;
    text-align: center;
    margin-bottom: 8px;
}

.preview-education-spotlight-title {
    font-size: 8px;
    color: #92400e;
    font-weight: bold;
    margin-bottom: 3px;
}

.preview-education-skill {
    font-size: 7px;
    color: #d97706;
    margin-bottom: 4px;
}

.preview-education-exercise {
    background: #fef3c7;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 6px;
    color: #92400e;
    font-weight: bold;
    display: inline-block;
}

.preview-education-resources {
    display: flex;
    gap: 6px;
}

.preview-education-resource {
    flex: 1;
    display: flex;
    align-items: center;
    background: #eff6ff;
    padding: 4px;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
}

.preview-education-resource-icon {
    font-size: 8px;
    margin-right: 4px;
}

.preview-education-resource-text {
    font-size: 6px;
    color: #1e40af;
    font-weight: 600;
}

/* Minimalist B&W Preview */
.preview-minimal-bw-header {
    text-align: center;
    margin-bottom: 12px;
}

.preview-minimal-bw-line {
    width: 2px;
    height: 16px;
    background: #000;
    margin: 0 auto 8px;
}

.preview-minimal-bw-title {
    font-size: 14px;
    font-weight: 100;
    color: #000;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.preview-minimal-bw-subtitle {
    font-size: 6px;
    color: #666;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.preview-minimal-bw-content {
    border-top: 1px solid #e5e5e5;
    padding-top: 6px;
    margin-bottom: 10px;
}

.preview-minimal-bw-issue {
    font-size: 6px;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.preview-minimal-bw-ideas {
    border-top: 1px solid #e5e5e5;
    padding-top: 6px;
}

.preview-minimal-bw-section {
    font-size: 7px;
    color: #000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
    margin-bottom: 6px;
}

.preview-minimal-bw-idea {
    font-size: 6px;
    color: #000;
    font-weight: 600;
    margin-bottom: 3px;
}

/* Additional formatting toolbar improvements */

/* Format button hover improvements */
.format-btn:hover {
    background: #f3f4f6 !important;
    border-color: #9ca3af !important;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.format-btn:active {
    background: #6366f1 !important;
    color: white !important;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Section labels styling */
.property-group label {
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 8px !important;
}

/* Alignment section specific styling */
.alignment-toolbar {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
}

.alignment-toolbar .format-btn {
    flex: 1;
    min-width: 70px;
    max-width: none;
    white-space: nowrap;
}

/* Formatting toolbar container */
.formatting-toolbar-container {
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 8px;
}

/* Row styling within container */
.formatting-toolbar-container > div {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.formatting-toolbar-container > div:last-child {
    margin-bottom: 0;
}

/* Better spacing for clear formatting section */
.clear-btn {
    width: 100% !important;
    justify-content: center !important;
    font-size: 13px !important;
}

/* Visual separator styling */
.formatting-toolbar div[style*="width: 1px"] {
    opacity: 0.6;
}
/* Button properties panel styling */
.property-group select,
.property-group input {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
}

.property-group input[type="color"] {
    padding: 2px;
    border-radius: 4px;
    cursor: pointer;
}

.property-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* Grid layout for button properties */
.property-group div[style*="grid"] {
    gap: 8px;
}

.property-group div[style*="grid"] label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

/* Button preview styling enhancements */
.newsletter-button {
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.newsletter-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
