/* Blog Editor Enhanced Styling */

/* Full-width form container */
.fi-resource-form {
    max-width: none !important;
}

/* Enhanced Rich Editor Styling */
.fi-fo-rich-editor .ProseMirror {
    min-height: 500px !important;
    font-size: 16px;
    line-height: 1.6;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.fi-fo-rich-editor .ProseMirror:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Focus Mode Styles */
.blog-focus-mode .fi-sidebar,
.blog-focus-mode .fi-topbar,
.blog-focus-mode .fi-page-header,
.blog-focus-mode .fi-header,
.blog-focus-mode .fi-breadcrumbs {
    display: none !important;
}

.blog-focus-mode .fi-main,
.blog-focus-mode .fi-main-content {
    margin-left: 0 !important;
    padding: 20px !important;
}

.blog-focus-mode .fi-section:not(:has(.fi-fo-rich-editor)) {
    display: none !important;
}

.blog-focus-mode .fi-section-header {
    display: none !important;
}

.blog-focus-mode .fi-fo-rich-editor .ProseMirror {
    min-height: 80vh !important;
    font-size: 18px;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px !important;
    border: none !important;
    box-shadow: none !important;
}

.blog-focus-mode .fi-fo-rich-editor {
    border: none !important;
}

/* Focus mode indicator */
.blog-focus-mode::before {
    content: "Focus Mode Active - Press ESC to exit";
    position: fixed;
    top: 20px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

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

/* Section Styling */
.fi-section-header {
    background: #f9fafb;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
}

.fi-section-content {
    padding: 20px;
}

/* Featured Image Preview */
.fi-fo-file-upload .fi-fo-file-upload-preview img {
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Image Gallery Repeater Styling */
.fi-fo-repeater-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #fff;
}

.fi-fo-repeater-item-header {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
}

/* Enhanced Typography in Editor */
.fi-fo-rich-editor .ProseMirror h1,
.fi-fo-rich-editor .ProseMirror h2,
.fi-fo-rich-editor .ProseMirror h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

.fi-fo-rich-editor .ProseMirror h2 {
    font-size: 24px;
    color: #1f2937;
}

.fi-fo-rich-editor .ProseMirror h3 {
    font-size: 20px;
    color: #374151;
}

.fi-fo-rich-editor .ProseMirror p {
    margin-bottom: 16px;
}

.fi-fo-rich-editor .ProseMirror blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 16px;
    margin: 20px 0;
    font-style: italic;
    background: #f8fafc;
    padding: 16px;
    border-radius: 0 6px 6px 0;
}

.fi-fo-rich-editor .ProseMirror ul,
.fi-fo-rich-editor .ProseMirror ol {
    padding-left: 24px;
    margin: 16px 0;
}

.fi-fo-rich-editor .ProseMirror li {
    margin-bottom: 8px;
}

/* Toolbar Enhancement */
.fi-fo-rich-editor .ProseMirror-menubar {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px 8px 0 0;
}

/* Status Indicators */
.fi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Draft/Published Status */
.post-status-draft {
    background: #fef3c7;
    color: #92400e;
}

.post-status-published {
    background: #d1fae5;
    color: #065f46;
}

/* Mobile Responsive Enhancements */
@media (max-width: 768px) {
    .fi-fo-rich-editor .ProseMirror {
        padding: 16px;
        font-size: 14px;
    }
    
    .blog-focus-mode .fi-fo-rich-editor .ProseMirror {
        font-size: 16px;
    }
}

/* Auto-save Indicator */
.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.auto-save-indicator.show {
    opacity: 1;
}

/* Word Count Display */
.word-count-display {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 12px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
}

/* Enhanced File Upload Areas */
.fi-fo-file-upload {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fi-fo-file-upload:hover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Category Select Enhancement */
.fi-fo-select .fi-select-input {
    border: 2px solid #e5e7eb;
    border-radius: 6px;
}

.fi-fo-select .fi-select-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Video Embed Styling */
.video-embed-container {
    margin: 20px 0;
    text-align: center;
}

.video-embed-container video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: #000;
}

.video-caption {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    font-style: italic;
}

/* Enhanced video attachments in editor */
.fi-fo-rich-editor .ProseMirror .video-embed-container {
    position: relative;
    display: block;
    margin: 16px auto;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.fi-fo-rich-editor .ProseMirror .video-embed-container:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Style for file attachments that are videos but not yet converted */
.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--mov,
.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--mp4,
.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--webm {
    display: block;
    text-align: center;
    margin: 16px 0;
    padding: 16px;
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    background-color: #f9fafb;
    transition: all 0.3s ease;
}

.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--mov:hover,
.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--mp4:hover,
.fi-fo-rich-editor .ProseMirror .attachment.attachment--file.attachment--webm:hover {
    border-color: #6b7280;
    background-color: #f3f4f6;
}

/* Video placeholder while converting */
.video-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #f3f4f6;
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    color: #6b7280;
    font-size: 14px;
    margin: 16px 0;
}