/* Minimal Custom CSS - Only what Tailwind can't handle */


/* RTL Support */
.rtl-input, .rtl-preview {
    direction: rtl;
    text-align: right;
}

.arabic-input, .arabic-preview {
    direction: rtl;
    text-align: right;
    font-family: 'Tajawal', 'Arial', sans-serif;
}

/* Farsi fonts */
.rtl-input {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

/* Tab Active State */
.tab-btn.active {
    color: rgb(59 130 246);
    border-bottom-color: rgb(59 130 246);
}

/* Tab panes visibility */
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Markdown Editor specific styles */
.markdown-editor {
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.editor-content-wrapper {
    display: flex;
}

.editor-panel, .preview-panel {
    transition: width 0.3s ease;
}

/* View modes for markdown editor */
.editor-mode-edit .preview-panel { display: none; }
.editor-mode-edit .editor-panel { width: 100%; }
.editor-mode-preview .editor-panel { display: none; }
.editor-mode-preview .preview-panel { width: 100%; }
.editor-mode-split .editor-panel,
.editor-mode-split .preview-panel { width: 50%; }

/* Fullscreen mode */
.markdown-editor-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: white;
}

/* Markdown Preview Typography */
.markdown-preview h1 { font-size: 2em; margin: 1.5em 0 0.5em; font-weight: 600; }
.markdown-preview h2 { font-size: 1.5em; margin: 1.5em 0 0.5em; font-weight: 600; }
.markdown-preview h3 { font-size: 1.25em; margin: 1.5em 0 0.5em; font-weight: 600; }
.markdown-preview p { margin-bottom: 1em; }
.markdown-preview ul, .markdown-preview ol { margin-bottom: 1em; padding-left: 2em; }
.markdown-preview li { margin-bottom: 0.25em; }
.markdown-preview blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 4px solid #e5e7eb;
    color: #6b7280;
}
.markdown-preview code {
    background-color: #f3f4f6;
    padding: 0.125em 0.25em;
    border-radius: 0.25em;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875em;
}
.markdown-preview pre {
    background-color: #1f2937;
    color: #f3f4f6;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    margin-bottom: 1em;
}
.markdown-preview pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}
.markdown-preview table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
}
.markdown-preview table th,
.markdown-preview table td {
    border: 1px solid #e5e7eb;
    padding: 0.5em;
    text-align: left;
}
.markdown-preview table th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* Toolbar button states */
.toolbar-btn {
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background-color: #f3f4f6;
}

.toolbar-btn.active {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

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

/* Emoji grid buttons */
.emoji-grid button {
    transition: background-color 0.2s;
}

.emoji-grid button:hover {
    background-color: #f3f4f6;
}

/* News card hover effect */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Image upload area */
.image-upload-area {
    border: 2px dashed #cbd5e0;
    transition: all 0.3s ease;
}

.image-upload-area:hover,
.image-upload-area.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal {
    animation: fadeIn 0.3s ease;
}

.modal > div > div:last-child {
    animation: slideUp 0.3s ease;
}









   /* markdown css  */

   /* Markdown Editor Styles */
   .form-group {
       margin-bottom: 1.5rem;
   }

   .toolbar-btn {
       padding: 0.375rem 0.5rem;
       background-color: white;
       border: 1px solid #e5e7eb;
       border-radius: 0.375rem;
       cursor: pointer;
       transition: all 0.2s;
       display: inline-flex;
       align-items: center;
       justify-content: center;
       font-size: 0.875rem;
       color: #374151;
   }

   .toolbar-btn:hover {
       background-color: #f3f4f6;
       border-color: #d1d5db;
   }

   .toolbar-btn:active,
   .toolbar-btn.active {
       background-color: #e5e7eb;
       border-color: #9ca3af;
   }

   .toolbar-group {
       display: flex;
       align-items: center;
       gap: 0.25rem;
   }

   .editor-content-wrapper {
       display: flex;
       position: relative;
   }

   .editor-panel,
   .preview-panel {
       transition: width 0.3s ease;
   }

   /* View modes */
   .editor-mode-edit .preview-panel {
       display: none;
   }

   .editor-mode-edit .editor-panel {
       width: 100%;
   }

   .editor-mode-preview .editor-panel {
       display: none;
   }

   .editor-mode-preview .preview-panel {
       width: 100%;
   }

   .editor-mode-split .editor-panel,
   .editor-mode-split .preview-panel {
       width: 50%;
   }

   /* Fullscreen mode */
   .markdown-editor-container.fullscreen {
       position: fixed;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       z-index: 9999;
       background: white;
       border-radius: 0;
   }

   .markdown-editor-container.fullscreen .editor-content-wrapper {
       height: calc(100vh - 60px) !important;
   }

   /* RTL Support */
   .rtl-input,
   .rtl-preview {
       direction: rtl;
       text-align: right;
   }

   .arabic-input,
   .arabic-preview {
       direction: rtl;
       text-align: right;
       font-family: 'Arial', 'Tahoma', sans-serif;
   }

   /* Markdown Preview Styles */
   .markdown-preview {
       font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
       line-height: 1.6;
       color: #333;
   }

   .markdown-preview h1,
   .markdown-preview h2,
   .markdown-preview h3,
   .markdown-preview h4,
   .markdown-preview h5,
   .markdown-preview h6 {
       margin-top: 1.5em;
       margin-bottom: 0.5em;
       font-weight: 600;
   }

   .markdown-preview h1 {
       font-size: 2em;
   }

   .markdown-preview h2 {
       font-size: 1.5em;
   }

   .markdown-preview h3 {
       font-size: 1.25em;
   }

   .markdown-preview p {
       margin-bottom: 1em;
   }

   .markdown-preview ul,
   .markdown-preview ol {
       margin-bottom: 1em;
       padding-left: 2em;
   }

   .markdown-preview li {
       margin-bottom: 0.25em;
   }

   .markdown-preview blockquote {
       margin: 1em 0;
       padding-left: 1em;
       border-left: 4px solid #e5e7eb;
       color: #6b7280;
   }

   .markdown-preview code {
       background-color: #f3f4f6;
       padding: 0.125em 0.25em;
       border-radius: 0.25em;
       font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
       font-size: 0.875em;
   }

   .markdown-preview pre {
       background-color: #1f2937;
       color: #f3f4f6;
       padding: 1em;
       border-radius: 0.5em;
       overflow-x: auto;
       margin-bottom: 1em;
   }

   .markdown-preview pre code {
       background-color: transparent;
       padding: 0;
       color: inherit;
   }

   .markdown-preview table {
       border-collapse: collapse;
       width: 100%;
       margin-bottom: 1em;
   }

   .markdown-preview table th,
   .markdown-preview table td {
       border: 1px solid #e5e7eb;
       padding: 0.5em;
       text-align: left;
   }

   .markdown-preview table th {
       background-color: #f9fafb;
       font-weight: 600;
   }

   .markdown-preview img {
       max-width: 100%;
       height: auto;
       margin: 1em 0;
   }

   .markdown-preview a {
       color: #3b82f6;
       text-decoration: underline;
   }

   .markdown-preview a:hover {
       color: #2563eb;
   }

   /* Emoji Picker Styles */
   .emoji-picker-modal {
       z-index: 10000;
   }

   .emoji-grid {
       max-height: 300px;
       overflow-y: auto;
   }

   .emoji-grid button {
       width: 2rem;
       height: 2rem;
       display: flex;
       align-items: center;
       justify-content: center;
       border: none;
       background: none;
       cursor: pointer;
       font-size: 1.25rem;
       border-radius: 0.25rem;
       transition: background-color 0.2s;
   }

   .emoji-grid button:hover {
       background-color: #f3f4f6;
   }

   .emoji-btn {
       background: none;
       border: none;
       cursor: pointer;
       font-size: 1rem;
       padding: 0.25rem;
       border-radius: 0.25rem;
       transition: background-color 0.2s;
   }

   .emoji-btn:hover {
       background-color: #f3f4f6;
   }

   /* Word count styles */
   .word-count {
       font-size: 0.75rem;
       color: #6b7280;
       font-weight: normal;
   }

   /* Summary editor specific styles */
   .summary-editor .editor-content-wrapper {
       height: 150px !important;
   }

   .summary-editor .editor-toolbar {
       padding: 0.375rem 0.5rem;
   }

   .summary-editor .toolbar-btn {
       padding: 0.25rem 0.375rem;
       font-size: 0.75rem;
   }

   .summary-editor .markdown-preview {
       font-size: 0.875rem;
   }




   /* loading  */

   .modal-loading-overlay {
       position: absolute;
       top: 0;
       left: 0;
       right: 0;
       bottom: 0;
       background-color: rgba(255, 255, 255, 0.95);
       display: flex;
       align-items: center;
       justify-content: center;
       z-index: 1000;
   }

   .loader {
       border: 3px solid #f3f3f3;
       border-top: 3px solid #3498db;
       border-radius: 50%;
       width: 40px;
       height: 40px;
       animation: spin 1s linear infinite;
   }

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

       100% {
           transform: rotate(360deg);
       }
   }


   /* tooltip  */

   .group:hover .group-hover\:opacity-100 {
       opacity: 1;
   }

   .group {
       position: relative;
   }

   .group span.absolute::before {
       content: '';
       position: absolute;
       top: 50%;
       right: 100%;
       margin-top: -5px;
       border-width: 5px;
       border-style: solid;
       border-color: transparent #1f2937 transparent transparent;
   }