/* Edit & Draft Tab Styles */

.edit-content {
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

.edit-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-actions .btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.edit-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    overflow: hidden;
    background: white;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 1rem;
    border-right: 1px solid #e2e8f0;
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.toolbar-btn:active {
    background: #e5e7eb;
}

.toolbar-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
}

.editor-main {
    flex: 1;
    display: flex;
    min-height: 400px;
}

.editor-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
}

.editor-loading {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
}

.rich-text-editor {
    flex: 1;
    padding: 1rem;
    border: none;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #1f2937;
    background: white;
    min-height: 350px;
    overflow-y: auto;
}

.rich-text-editor:empty:before {
    content: attr(placeholder);
    color: #9ca3af;
    font-style: italic;
}

.rich-text-editor:focus {
    background: #fefefe;
}

.suggestions-panel {
    flex: 1;
    background: #f8fafc;
    padding: 1rem;
    overflow-y: auto;
}

.suggestions-panel h5 {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestions-loading {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

.suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.suggestion-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.suggestion-priority {
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.suggestion-priority.priority-high {
    background: #fef2f2;
    color: #dc2626;
}

.suggestion-priority.priority-medium {
    background: #fffbeb;
    color: #d97706;
}

.suggestion-priority.priority-low {
    background: #f0fdf4;
    color: #16a34a;
}

.suggestion-category {
    padding: 0.125rem 0.5rem;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.suggestion-content {
    margin-bottom: 0.75rem;
}

.suggestion-text {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.5;
}

.suggestion-actions {
    display: flex;
    gap: 0.5rem;
}

.suggestion-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.draft-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 1rem;
    border-radius: 0.5rem;
}

.status-info, .last-saved {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-label, .saved-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.status-value, .saved-value {
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

/* Responsive design for edit tab */
@media (max-width: 768px) {
    .editor-main {
        flex-direction: column;
    }
    
    .editor-panel {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .suggestions-panel {
        max-height: 200px;
    }
    
    .edit-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .edit-actions {
        justify-content: center;
    }
    
    .toolbar-group {
        padding-right: 0.5rem;
    }
    
    .draft-status {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
}

/* Rich text editor content styling */
.rich-text-editor h1,
.rich-text-editor h2,
.rich-text-editor h3,
.rich-text-editor h4,
.rich-text-editor h5,
.rich-text-editor h6 {
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
    color: #1f2937;
}

.rich-text-editor p {
    margin: 0.5rem 0;
}

.rich-text-editor ul,
.rich-text-editor ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.rich-text-editor li {
    margin: 0.25rem 0;
}

.rich-text-editor strong {
    font-weight: 600;
}

.rich-text-editor em {
    font-style: italic;
}

.rich-text-editor u {
    text-decoration: underline;
}

/* Animation for loading states */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Success/Error states */
.text-danger {
    color: #dc2626 !important;
}

.text-success {
    color: #16a34a !important;
}

.text-warning {
    color: #d97706 !important;
}

.text-info {
    color: #0ea5e9 !important;
}
