/* just for commit */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    font-size: 14px; /* Base font size */
    color: #333; /* Default text color */
}

/* --- Headings --- */
h1, .view-title { /* Apply h1 style to .view-title */
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px; /* Add default margin */
    color: #2c3e50;
}

h2, .header h2 { /* Apply h2 style */
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #2c3e50;
}

h3, .settings-tab-content h3, .ai-analysis-panel h3, .view-subject { /* Apply h3 style */
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #34495e;
}

h4, .settings-edit-area h4, .analysis-header h4, #ai-generated-ideas-list h4 { /* Apply h4 style */
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #34495e;
}
/* --- End Headings --- */

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push items apart */
    height: 100vh; /* Full viewport height */
    position: sticky; /* Make it sticky */
    top: 0; /* Stick to the top */
    align-self: flex-start; /* Prevent stretching if container is flex */
}
        
.sidebar-top { /* Container for top tabs */
    /* No specific styles needed unless you want spacing */
}
        
.sidebar-bottom { /* Container for bottom tabs */
    /* No specific styles needed unless you want spacing */
}
        
.tab {
    padding: 15px;
    text-align: left;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
}

.tab:hover {
    background-color: #34495e;
}

.tab.active {
    background-color: #3498db;
}

.main-content {
    flex: 1;
    padding: 20px;
}

.header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 20px;
}
.header h2 { /* Ensure header h2 uses the h2 style */
    font-size: 24px; /* Explicitly set here or rely on h2 rule */
    margin: 0; /* Override default h2 margin if needed */
}

.input-container {
    display: flex;
    margin-bottom: 20px;
}

.input-field {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px; /* Ensure standard font size */
    font-family: inherit; /* Ensure inputs use body font */
}

.btn {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px; /* Ensure standard font size */
    font-family: inherit; /* Ensure buttons use body font */
}

.btn:hover {
    background-color: #2980b9;
}

.list-container {
    margin-top: 20px;
}

.list-item {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-btn {
    background-color: #e74c3c;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.edit-btn {
    background-color: #2ecc71;
}

.edit-btn:hover {
    background-color: #27ae60;
}

/* Hide all content sections by default */
.content-section {
    display: none;
}

/* Show active content section */
.content-section.active {
    display: block;
}

/* Writer specific styles */
.writer-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.writer-tab {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    background-color: #f8f9fa;
}

.writer-tab:hover {
    background-color: #e9ecef;
}

.writer-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white;
    margin-bottom: -1px;
    font-weight: bold;
}

.writer-tab-content {
    display: none;
}

.writer-tab-content.active {
    display: block;
}

.accept-btn {
    background-color: #2ecc71;
    margin-right: 5px;
}

.accept-btn:hover {
    background-color: #27ae60;
}

.reject-btn {
    background-color: #e74c3c;
}

.reject-btn:hover {
    background-color: #c0392b;
}

.view-btn {
    background-color: #3498db;
}

.view-btn:hover {
    background-color: #2980b9;
}

.content-title {
    font-weight: bold;
    display: block;
}

/* .content-subject style removed */

.item-meta {
    font-size: 12px; /* Use fixed smaller size */
    color: #7f8c8d;
    margin-top: 5px;
}

.tags-container {
    margin-top: 20px;
}

.tag-btn {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 5px 10px;
    margin-right: 5px;
    cursor: pointer;
    font-size: 12px; /* Keep tags slightly smaller */
}

.tag-btn:hover {
    background-color: #e9ecef;
}

.tag-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Settings tab styles */
.settings-tab-content {
    display: none;
    padding: 20px 0;
}

.settings-tab-content.active {
    display: block;
}

/* Tone tabs styles */
.tone-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
    margin: 15px 0;
}

.tone-tab {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
}

.tone-tab.active {
    background-color: white;
    border-bottom-color: white;
    margin-bottom: -1px;
    font-weight: bold;
}

.tone-tab:hover:not(.active) {
    background-color: #e9ecef;
}

.tone-content {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
}

.tone-content.active {
    display: block;
}

.tone-instruction {
    display: none;
}

.tone-instruction.active {
    display: block;
}

.tone-description {
    margin-bottom: 20px;
}

.tone-description blockquote {
    border-left: 3px solid #3498db;
    padding: 10px 15px;
    margin: 15px 0;
    background-color: #f8f9fa;
    font-style: italic;
}

.tone-settings {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.tone-slider {
    margin-bottom: 15px;
}

.tone-slider label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Removed old/incomplete settings styles, replaced below */

/* Removed Avatar Category/Statement Styles */


/* Old Avatar tabs styles removed */

/* Edit page styles */
.edit-page {
    display: flex;
    height: 100%;
}

.edit-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 20px;
}

.edit-sidebar {
    width: 300px;
    border-left: 1px solid #ddd;
    padding-left: 20px;
}

.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.edit-title {
    font-size: 24px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
    width: 100%;
    margin-right: 15px;
    border-bottom: none;
}

/* .edit-subject style removed */

.edit-status {
    background-color: #f39c12;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.editor-toolbar {
    display: flex;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    padding: 5px;
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    margin-right: 2px;
}

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

.toolbar-separator {
    width: 1px;
    background-color: #ddd;
    margin: 0 5px;
}

.editor-content {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    padding: 15px;
    min-height: 300px;
    overflow-y: auto;
}

.editor-content:focus {
    outline: none;
    border-color: #3498db;
}

/* Content tabs styles */
.content-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.content-tab {
    padding: 8px 15px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    background-color: #f8f9fa;
}

.content-tab:hover {
    background-color: #e9ecef;
}

.content-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white;
    margin-bottom: -1px;
    font-weight: bold;
}

.content-tab-container {
    position: relative;
}

.editor-container {
    display: none;
}

.editor-container.active {
    display: flex;
    flex-direction: column;
}

.notes-content {
    width: 100%;
    height: 300px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit; /* Use standard font */
    font-size: 14px; /* Use standard size */
    line-height: 1.5;
    resize: vertical;
}

.notes-content:focus,
.notes-keywords-input:focus {
    outline: none;
    border-color: #3498db;
}

.notes-keywords-input,
.notes-longtail-keywords-input {
    width: 100%; /* Take full width */
    margin-bottom: 10px; /* Space below keywords */
}

/* Social platform tabs */
.social-platform-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
}

.social-platform-tab {
    padding: 8px 15px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    border-radius: 4px 4px 0 0;
    background-color: #f8f9fa;
}

.social-platform-tab:hover {
    background-color: #e9ecef;
}

.social-platform-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white;
    margin-bottom: -1px;
    font-weight: bold;
}

.social-platform-content {
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    padding: 15px;
    min-height: 300px;
}

.platform-content {
    display: none;
}

.platform-content.active {
    display: block;
}

.social-textarea {
    width: 100%;
    height: 250px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit; /* Ensure textareas use body font */
    font-size: 14px; /* Ensure standard font size */
}

.social-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.character-count {
    text-align: right;
    margin-top: 5px;
    font-size: 12px;
    color: #7f8c8d;
}

/* Email editor styles */
.email-header {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.email-field-label {
    font-weight: bold;
    margin-right: 10px;
    min-width: 70px;
}

.email-subject-field {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.email-subject-field:focus {
    outline: none;
    border-color: #3498db;
}

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.reading-time {
    color: #7f8c8d;
    font-size: 14px;
}

.ai-analysis-panel {
    margin-bottom: 20px;
}

.ai-options {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.ai-option {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 10px;
}

.ai-option input {
    margin-right: 5px;
}

.avatar-checkboxes {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.avatar-dropdown {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px; /* Standardize font size */
    margin-bottom: 10px;
    font-family: inherit; /* Ensure selects use body font */
}

.generate-content-btn {
    display: block;
    width: 100%;
    padding: 10px;
    font-size: 14px; /* Standardize font size */
    text-align: center;
    font-family: inherit; /* Ensure buttons use body font */
}

.analyze-btn {
    background-color: #9b59b6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px; /* Standardize font size */
    margin-bottom: 15px;
    font-family: inherit; /* Ensure buttons use body font */
}

.analyze-btn:hover {
    background-color: #8e44ad;
}

.enhance-btn.active {
    background-color: #16a085;
    cursor: pointer;
}

.enhance-btn.active:hover {
    background-color: #1abc9c;
}

.ai-results {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    display: none;
}

.ai-result-section {
    margin-bottom: 20px;
}

.ai-result-title {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.ai-result-section ol li {
    margin-bottom: 5px;
    padding: 3px;
    cursor: pointer;
    border-radius: 3px;
}

.ai-result-section ol li:hover {
    background-color: #f8f9fa;
}

.ai-result-section ol li.selected {
    background-color: #e1f5fe;
    border-left: 3px solid #3498db;
    padding-left: 5px;
}

.subject-line-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.subject-line-item input[type="checkbox"] {
    margin-right: 8px;
}

.subject-line-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.subject-line-actions button {
    padding: 5px 10px;
    font-size: 14px;
}

/* Collapsible sections */
.analysis-section {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.analysis-header {
    background-color: #f8f9fa;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.analysis-header h4 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.score-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    color: white;
    font-size: 12px; /* Keep badges small */
}

.score-red {
    background-color: #e74c3c;
}

.score-yellow {
    background-color: #f39c12;
}

.score-green {
    background-color: #2ecc71;
}

.analysis-content {
    padding: 15px;
    display: none;
}

.analysis-section.open .analysis-content {
    display: block;
}

.analysis-toggle {
    transition: transform 0.3s;
}

.analysis-section.open .analysis-toggle {
    transform: rotate(180deg);
}

/* Subject line radio buttons */
.subject-line-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    position: relative;
    padding-right: 70px;
}

.subject-line-item:hover .delete-subject,
.subject-line-item:hover .use-subject {
    display: block;
}

.delete-subject {
    position: absolute;
    right: 0;
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    font-weight: bold;
}

.delete-subject:hover {
    color: #c0392b;
}

.use-subject {
    position: absolute;
    right: 25px;
    color: #2ecc71;
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    font-weight: bold;
}

.use-subject:hover {
    color: #27ae60;
}

.floating-action-bar {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.floating-action-bar .status {
    background-color: #f39c12;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px; /* Standardize status text */
}

.floating-action-bar .action-buttons {
    display: flex;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.action-buttons .btn {
    margin-left: 10px;
}

.finish-btn {
    background-color: #2ecc71;
}

.finish-btn:hover {
    background-color: #27ae60;
}

/* View content page styles */
.view-page {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.view-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.view-title {
    font-size: 28px; /* Use h1 size */
    margin-bottom: 5px;
    color: #2c3e50;
}

/* .view-subject style removed */

.view-meta {
    font-size: 12px; /* Keep meta small */
    color: #7f8c8d;
}

.content-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.content-section-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.content-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.content-section-header h3 {
    margin: 0;
    font-size: 16px; /* Use h4 size */
    color: #2c3e50;
}

.copy-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px; /* Standardize button size */
}

.copy-btn:hover {
    background-color: #2980b9;
}

.copy-btn.copied {
    background-color: #2ecc71;
}

.content-section-body {
    padding: 15px;
    background-color: white;
}

.view-content {
    max-height: 400px;
    overflow-y: auto;
}

/* Removed styles for #ai-ideas-panel, #manual-idea-container, #ai-generated-ideas-container (old), .ai-idea-item */

/* Styles for the new AI suggestions list */
#ai-generated-ideas-list h4 {
    margin-bottom: 10px;
    color: #8e44ad; /* Purple heading */
}

#ai-generated-ideas-list .list-item {
    background-color: #fff; /* White background for items */
    border-color: #e0e0e0; /* Lighter border */
}

#ai-generated-ideas-list .list-item span {
    flex-grow: 1; /* Allow text to take space */
    margin-right: 10px;
}

#ai-generated-ideas-list .accept-btn {
    /* Use existing accept-btn styles, ensure margin if needed */
    margin-left: 5px;
}

/* Style for the close button on AI suggestions */
.close-suggestions-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #95a5a6; /* Grey color */
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    z-index: 10; /* Ensure it's above other content in the container */
}

.close-suggestions-btn:hover {
    color: #e74c3c; /* Red on hover */
}


.error {
    color: #e74c3c;
    padding: 20px;
    border: 1px solid #e74c3c;
    border-radius: 4px;
    background-color: #fadbd8;
    margin: 20px 0;
}


/* --- Settings Tab Specific Styles (Refactored for Tabs) --- */
.settings-tabs-container {
    display: flex;
    flex-direction: column; /* Stack tabs and button */
    margin-bottom: 20px;
    max-width: 600px; /* Allow slightly wider for tabs */
}

.settings-tabs-bar {
    display: flex;
    flex-wrap: wrap; /* Allow tabs to wrap */
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    padding-bottom: 5px; /* Space between tabs and bottom border */
}

.settings-tab {
    padding: 10px 15px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    margin-bottom: 5px; /* Space for wrapped tabs */
    border-radius: 4px 4px 0 0;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s;
    position: relative; /* For positioning actions if needed */
}

.settings-tab:hover {
    background-color: #e9ecef;
}

.settings-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white; /* Hide bottom border part */
    margin-bottom: 4px; /* Align with bottom border */
    font-weight: bold;
    color: #3498db;
}

.settings-tab span { /* Target the name span */
    margin-right: 15px; /* Space between name and actions */
    white-space: nowrap; /* Prevent name wrapping */
}

.settings-tab .item-actions {
    display: flex;
    align-items: center;
    gap: 5px; /* Slightly reduced gap for tabs */
}

.settings-tab .item-actions .default-badge {
    font-size: 11px; /* Fixed smaller size */
    background-color: #3498db;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

.settings-tab .item-actions .make-default-btn,
.settings-tab .item-actions .delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px; /* Keep icon size reasonable */
    padding: 0; /* Remove padding */
    color: #7f8c8d;
    transition: color 0.2s;
    line-height: 1; /* Ensure icons align well */
    opacity: 0.7; /* Make actions less prominent initially */
}

.settings-tab:hover .item-actions .make-default-btn,
.settings-tab:hover .item-actions .delete-btn,
.settings-tab.active .item-actions .make-default-btn, /* Show on active too */
.settings-tab.active .item-actions .delete-btn {
    opacity: 1; /* Show actions on hover/active */
}

.settings-tab .item-actions .make-default-btn:hover {
    color: #f39c12; /* Gold for default star */
}
.settings-tab .item-actions .delete-btn:hover {
    color: #e74c3c; /* Red for delete */
}

/* Position Add button below the tabs */
#add-avatar-btn, #add-tone-btn {
    align-self: flex-start;
    margin-top: 5px; /* Space below tab bar */
}

.settings-edit-area {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    background-color: #fdfdfd; /* Slightly off-white background */
    margin-top: 10px; /* Space between list/button and edit area */
}

.settings-edit-area h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #2c3e50; /* Darker heading color */
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e; /* Slightly softer label color */
}

/* Use existing .input-field class for consistency where applicable */
.characteristics-textarea {
    width: 100%; /* Ensure textarea takes full width */
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
    padding: 8px 10px; /* Match input-field padding */
    border: 1px solid #ddd; /* Match input-field border */
    border-radius: 4px; /* Match input-field border-radius */
    font-size: 14px; /* Ensure standard font size */
    font-family: inherit; /* Ensure textareas use body font */
}
.characteristics-textarea:focus {
    outline: none;
    border-color: #3498db; /* Highlight on focus */
}


.settings-no-selection {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 4px;
    color: #7f8c8d;
    text-align: center;
}
/* --- End Settings Tab Specific Styles --- */


/* --- Custom Alert System --- */
#alert-container {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    z-index: 1050; /* High z-index to appear above other elements */
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.alert-message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    width: auto; /* Fit content */
    max-width: 100%;
    text-align: center;
}

.alert-message.show {
    opacity: 1;
    transform: translateY(0);
}

.alert-message.error {
    background-color: #e74c3c; /* Red for errors */
}

.alert-message.success {
    background-color: #2ecc71; /* Green for success */
}

.alert-message.info {
    background-color: #3498db; /* Blue for info */
}

/* Styles for action buttons inside alerts */
.alert-actions {
    display: flex;
    gap: 15px; /* Increased space between action buttons */
    flex-shrink: 0; /* Prevent buttons from shrinking */
    margin-left: 20px; /* Space between message and buttons */
}

.alert-action-btn {
    padding: 8px 18px; /* Increased padding for larger buttons */
    border: 1px solid rgba(0, 0, 0, 0.2); /* Slightly darker border */
    background-color: rgba(255, 255, 255, 0.8); /* Lighter background */
    color: #333; /* Darker text */
    border-radius: 5px; /* Slightly more rounded corners */
    cursor: pointer;
    font-size: 14px; /* Larger font size */
    font-weight: bold;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.alert-action-btn:hover {
    background-color: rgba(255, 255, 255, 1); /* Fully opaque on hover */
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.alert-action-btn:active {
    transform: translateY(1px); /* Subtle press effect */
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

/* Specific styles for buttons within INFO alerts (confirmations) */
.alert-message.info .alert-action-btn:first-of-type { /* Assuming Confirm is first */
    background-color: #e74c3c; /* Red background for confirm/delete */
    color: white;
    border-color: #c0392b;
}
.alert-message.info .alert-action-btn:first-of-type:hover {
    background-color: #c0392b; /* Darker red on hover */
}

.alert-message.info .alert-action-btn:last-of-type { /* Assuming Cancel is last */
    background-color: #bdc3c7; /* Grey background for cancel */
    color: #333;
    border-color: #95a5a6;
}
.alert-message.info .alert-action-btn:last-of-type:hover {
    background-color: #95a5a6; /* Darker grey on hover */
}

/* Style for the manual close button (X) */
.alert-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px; /* Larger close button */
    font-weight: bold;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    margin-left: 15px; /* Space from message/actions */
    flex-shrink: 0;
}

.alert-close-btn:hover {
    color: white;
}

/* Adjust alert message layout for buttons */
.alert-message {
    display: flex; /* Use flexbox for layout */
    justify-content: space-between; /* Space between message and actions/close */
    align-items: center; /* Vertically align items */
    text-align: left; /* Align text left */
}

.alert-message span:first-child { /* Style for the message text itself */
    flex-grow: 1; /* Allow message to take available space */
    margin-right: 15px; /* Space between message and buttons */
}


#error-log-icon {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: #e74c3c; /* Red background */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1040;
    transition: transform 0.2s ease;
}

#error-log-icon:hover {
    transform: scale(1.1);
}

#error-log-icon svg {
    width: 20px; /* Adjust icon size */
    height: 20px;
}

#error-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #c0392b; /* Darker red for badge */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px; /* Ensure circle shape for single digit */
    text-align: center;
    line-height: 14px; /* Adjust line height for vertical centering */
    display: none; /* Hidden by default */
}

#error-count-badge.visible {
    display: block;
}

#error-log-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px; /* Adjust width as needed */
    height: 100%;
    background-color: #f8f9fa;
    border-left: 1px solid #ddd;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    z-index: 1100; /* Ensure it's above other elements */
    transform: translateX(100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#error-log-sidebar.active {
    transform: translateX(0); /* Slide in */
}

#error-log-sidebar h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: #2c3e50;
}

#close-error-log-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    font-weight: bold;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
#close-error-log-btn:hover {
    color: #34495e;
}

#error-log-list {
    flex-grow: 1; /* Allow list to take remaining space */
    font-size: 13px;
}

#error-log-list .error-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin-bottom: 10px;
}
#error-log-list .error-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

#error-log-list .error-timestamp {
    font-size: 0.8em;
    color: #7f8c8d;
    display: block;
    margin-bottom: 3px;
}

#error-log-list .error-message-text {
    word-wrap: break-word; /* Wrap long messages */
}

#error-log-list .error-item.error .error-message-text {
    color: #c0392b; /* Darker red for error messages */
}
#error-log-list .error-item.success .error-message-text {
    color: #27ae60; /* Darker green for success */
}
#error-log-list .error-item.info .error-message-text {
    color: #2980b9; /* Darker blue for info */
}

/* Styles for input within alert */
.alert-input {
    display: block; /* Take full width */
    width: calc(100% - 40px); /* Adjust width considering padding */
    padding: 8px 10px;
    margin: 10px auto 15px auto; /* Center and add spacing */
    border: 1px solid #bdc3c7; /* Neutral border */
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.alert-input:focus {
    outline: none;
    border-color: #3498db; /* Highlight on focus */
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.5);
}

/* Adjust alert layout for input */
.alert-message.input {
    flex-direction: column; /* Stack message, input, buttons */
    align-items: stretch; /* Stretch items */
    text-align: center; /* Center message */
}
.alert-message.input span:first-child { /* Message text */
    margin-bottom: 10px;
    margin-right: 0; /* Remove right margin */
}
.alert-message.input .alert-actions {
    margin-top: 5px; /* Space above buttons */
    margin-left: 0; /* Remove left margin */
    justify-content: center; /* Center buttons */
    width: 100%;
}
.alert-message.input .alert-close-btn {
    position: absolute; /* Position close button top-right */
    top: 5px;
    right: 5px;
}


/* --- End Custom Alert System --- */

/* --- Generating Content Indicator --- */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 0.4; }
    100% { opacity: 0.6; }
}

.generating-content {
    opacity: 0.6; /* Initial faded state */
    pointer-events: none; /* Disable clicks/typing */
    cursor: wait; /* Indicate waiting */
    animation: pulse 1.5s infinite ease-in-out; /* Apply pulsing animation */
    background-color: #f0f0f0; /* Optional: slight grey background */
}

/* Apply to specific editor/textarea elements */
#content-editor .editor-content.generating-content,
#email-editor .editor-content.generating-content,
#social-editor .social-textarea.generating-content {
    /* Styles defined in .generating-content will apply */
}
/* --- End Generating Content Indicator --- */


/* --- Editor Locked State (for Notes Approval) --- */
.editor-locked .content-tab:not([data-content-tab="notes"]) {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #e9ecef; /* Grey out inactive tabs */
}

.editor-locked .content-tab:not([data-content-tab="notes"]):hover {
    background-color: #e9ecef; /* Prevent hover effect */
}

.editor-locked .generate-content-btn {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #bdc3c7 !important; /* Grey out generate button */
}

.editor-locked #approve-notes-btn {
    display: block !important; /* Ensure the approve button is visible when locked */
}
/* --- End Editor Locked State --- */

/* Specific style for Approve Notes button container spacing */
.notes-actions {
    margin-top: 10px;
    /* Add other styles if needed, e.g., text-align: right; */
}
