/* ============================================ Markdown Editor Styles UPDATED: Added Audiobook Maker Panel (fixed) UPDATED: Added starting-block highlight UPDATED: Added Sidebar Outline & Section Dividers ============================================= */ /* ============================================ Audiobook Maker Panel (Fixed at top of editor) ============================================= */ .audiobook-maker-panel { position: sticky; top: 0; z-index: 200; background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #3730a3 100%); border-radius: var(--border-radius); padding: 16px 24px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; box-shadow: 0 4px 20px rgba(30, 27, 75, 0.35); color: white; } .amp-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .amp-right { display: flex; align-items: center; gap: 10px; } .amp-label { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255,255,255,0.7); white-space: nowrap; } .amp-voice-select { min-width: 200px; padding: 8px 12px; border: 2px solid rgba(255,255,255,0.25); border-radius: 8px; background: rgba(255,255,255,0.1); color: white; font-size: 0.88rem; font-weight: 500; cursor: pointer; transition: border-color 0.2s; } .amp-voice-select:focus { outline: none; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.15); } .amp-voice-select option { background: #1e1b4b; color: white; } /* Block count input group */ .amp-block-count-group { display: flex; align-items: center; gap: 8px; } .amp-block-count-label { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.7); white-space: nowrap; } .amp-block-count-input { width: 72px; padding: 8px 10px; border: 2px solid rgba(255,255,255,0.25); border-radius: 8px; background: rgba(255,255,255,0.1); color: white; font-size: 0.95rem; font-weight: 700; text-align: center; transition: border-color 0.2s; -moz-appearance: textfield; } .amp-block-count-input::-webkit-outer-spin-button, .amp-block-count-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } .amp-block-count-input:focus { outline: none; border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.15); } .amp-count-arrows { display: flex; flex-direction: column; gap: 2px; } .amp-count-arrow { width: 24px; height: 18px; border: none; background: rgba(255,255,255,0.12); color: white; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; transition: background 0.2s; padding: 0; } .amp-count-arrow:hover { background: rgba(255,255,255,0.25); } /* Starting block indicator */ .amp-start-indicator { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.2); border-radius: 20px; font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.85); white-space: nowrap; cursor: pointer; transition: all 0.2s; } .amp-start-indicator:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.4); } .amp-start-indicator .start-block-num { background: #fbbf24; color: #1e1b4b; font-weight: 800; font-size: 0.72rem; padding: 2px 8px; border-radius: 10px; min-width: 24px; text-align: center; } .amp-start-indicator.pick-mode { background: rgba(251, 191, 36, 0.2); border-color: #fbbf24; color: #fbbf24; animation: pickPulse 1.5s ease-in-out infinite; } @keyframes pickPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); } 50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); } } /* Generate button on panel */ .amp-generate-btn { padding: 10px 24px; border: none; border-radius: 10px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px; white-space: nowrap; box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3); } .amp-generate-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4); } .amp-generate-btn:active { transform: translateY(0); } .amp-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; } /* Stats/info line */ .amp-info { width: 100%; display: flex; align-items: center; gap: 16px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4px; } .amp-stat { font-size: 0.72rem; color: rgba(255,255,255,0.5); display: flex; align-items: center; gap: 4px; } .amp-stat strong { color: rgba(255,255,255,0.8); } /* ============================================ Layout for Sidebar and Editor ============================================= */ .editor-layout { display: flex; gap: 24px; align-items: flex-start; } .document-outline { width: 250px; flex-shrink: 0; position: sticky; top: 120px; background: white; border-radius: var(--border-radius); padding: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); max-height: calc(100vh - 140px); overflow-y: auto; } .outline-title { font-weight: 700; font-size: 0.9rem; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 12px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; } .outline-list { list-style: none; padding: 0; margin: 0; } .outline-list li { padding: 8px 12px; font-size: 0.85rem; color: var(--text-primary); cursor: pointer; border-radius: 6px; transition: background 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .outline-list li:hover { background: var(--bg-tertiary); color: var(--primary-color); } .editor-container { flex: 1; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--border-radius); min-height: 500px; padding: 24px 48px; position: relative; } /* ============================================ Section Dividers (Automated Chapter Markers) ============================================= */ .section-divider { display: flex; align-items: center; margin: 32px 0; position: relative; } .divider-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #cbd5e1, transparent); } .divider-content { display: flex; align-items: center; gap: 12px; padding: 0 16px; position: relative; } .section-title { font-size: 0.9rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: 1px; padding: 4px 12px; background: #f8fafc; border-radius: 20px; border: 1px solid #e2e8f0; outline: none; transition: all 0.2s; } .section-title:focus { border-color: var(--primary-color); background: white; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); } .btn-merge-section { opacity: 0; background: #fee2e2; color: #dc2626; border: none; border-radius: 6px; font-size: 0.7rem; padding: 4px 8px; cursor: pointer; transition: opacity 0.2s; position: absolute; left: 100%; white-space: nowrap; } .section-divider:hover .btn-merge-section { opacity: 1; } /* ============================================ Starting Block Highlight ============================================= */ .md-block.starting-block { border-left: 4px solid #fbbf24 !important; background: rgba(251, 191, 36, 0.06); } .md-block.starting-block::before { content: 'START'; position: absolute; top: -1px; left: -4px; background: #fbbf24; color: #1e1b4b; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.5px; padding: 1px 8px; border-radius: 0 0 6px 0; z-index: 5; } /* Blocks in generation range */ .md-block.in-gen-range { border-left: 4px solid #a78bfa !important; background: rgba(167, 139, 250, 0.04); } /* Pick mode: blocks glow on hover */ .editor-pick-mode .md-block:not(.editing):hover { border-color: #fbbf24 !important; background: rgba(251, 191, 36, 0.08); cursor: crosshair; } /* ============================================ Markdown Block ============================================= */ .md-block { position: relative; margin: 8px 0; padding: 12px 16px; border-radius: var(--border-radius-sm); border: 2px solid transparent; transition: all 0.2s; min-height: 48px; } .md-block:hover { background: var(--bg-tertiary); border-color: var(--border-color); } .md-block.editing { background: #eff6ff; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); } /* Block Content */ .md-block-content { font-family: var(--font-serif); font-size: 1.125rem; line-height: 1.8; color: var(--text-primary); } .md-block-content h1 { font-size: 2rem; font-weight: 700; margin: 0; padding-bottom: 8px; } .md-block-content h2 { font-size: 1.5rem; font-weight: 700; margin: 0; } .md-block-content h3 { font-size: 1.25rem; font-weight: 600; margin: 0; } .md-block-content p { margin: 0; } .md-block-content blockquote { border-left: 4px solid var(--primary-color); padding-left: 16px; margin: 0; font-style: italic; color: var(--text-secondary); } .md-block-content ul, .md-block-content ol { margin: 0; padding-left: 24px; } .md-block-content img { max-width: 100%; height: auto; border-radius: var(--border-radius-sm); margin: 8px auto; display: block; } .md-block-content table { width: 100%; border-collapse: collapse; margin: 8px 0; } .md-block-content th, .md-block-content td { border: 1px solid var(--border-color); padding: 8px 12px; text-align: left; } .md-block-content th { background: var(--bg-tertiary); font-weight: 600; } /* Block Edit Mode */ .md-block-edit { display: none; } .md-block.editing .md-block-content { display: none; } .md-block.editing .md-block-edit { display: block; } .md-block-textarea { width: 100%; min-height: 100px; padding: 12px; border: none; border-radius: var(--border-radius-sm); font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.6; resize: vertical; background: white; } .md-block-textarea:focus { outline: none; } /* Block Toolbar */ .md-block-toolbar { display: none; position: absolute; top: -45px; /* Adjust top for new buttons */ left: 0; background: white; border: 1px solid var(--border-color); border-radius: var(--border-radius-sm); padding: 4px; box-shadow: var(--shadow-md); z-index: 100; gap: 4px; } .md-block.editing .md-block-toolbar { display: flex; } .toolbar-btn { width: 32px; height: 32px; border: none; background: transparent; border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s; } .toolbar-btn:hover { background: var(--bg-tertiary); color: var(--primary-color); } .toolbar-btn.active { background: var(--primary-color); color: white; } .toolbar-divider { width: 1px; background: var(--border-color); margin: 4px; } .action-btn-text { font-size: 0.75rem; font-weight: 600; padding: 0 6px; width: auto; } /* Empty Block Placeholder */ .md-block-placeholder { color: var(--text-muted); font-style: italic; } /* ============================================ New Block Line ============================================= */ .new-block-line { height: 24px; position: relative; cursor: text; } .new-block-line:hover::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--primary-color); opacity: 0.3; } .new-block-line:hover .add-line-buttons { display: flex; } .add-line-buttons { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); gap: 8px; z-index: 50; } .add-line-btn { width: 28px; height: 28px; border: none; border-radius: 50%; background: var(--primary-color); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; transition: all 0.2s; } .add-line-btn:hover { transform: scale(1.1); } /* Image add button - teal */ .add-line-btn.image-btn { background: #06b6d4; } .add-line-btn.image-btn:hover { background: #0891b2; } .add-line-btn.image-btn:hover { background: #0891b2; } /* Section add button - purple */ .add-line-btn.section-btn { background: #8b5cf6; } .add-line-btn.section-btn:hover { background: #7c3aed; } /* ============================================ Image Block - Centered ============================================= */ .image-block { text-align: center; padding: 24px; border: 2px dashed var(--border-color); border-radius: var(--border-radius); background: var(--bg-tertiary); cursor: pointer; transition: all 0.2s; } .image-block:hover { border-color: var(--primary-color); background: rgba(79, 70, 229, 0.05); } .image-block img { max-width: 100%; height: auto; border-radius: var(--border-radius-sm); margin: 0 auto; display: block; } .image-upload-placeholder { color: var(--text-muted); } .image-upload-placeholder i { font-size: 2rem; margin-bottom: 8px; display: block; } /* ============================================ Audio Indicator ============================================= */ .audio-indicator { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; } .audio-indicator.has-audio { background: var(--success-color); color: white; } .audio-indicator.no-audio { background: var(--bg-tertiary); color: var(--text-muted); } /* ============================================ Block Actions Indicator (Edit + Delete) ============================================= */ .block-actions-indicator { position: absolute; top: 8px; right: 40px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; z-index: 10; } .md-block:hover .block-actions-indicator { opacity: 1; } .action-indicator-btn { width: 28px; height: 28px; border: none; background: var(--bg-tertiary); border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.2s; padding: 0; } .action-indicator-btn.edit-block-btn:hover { background: var(--primary-color); color: white; } .action-indicator-btn.delete-block-btn:hover { background: var(--danger-color); color: white; } /* Hide the old block-edit-indicator since we replaced it */ .block-edit-indicator { display: none !important; } /* ============================================ Responsive ============================================= */ @media (max-width: 768px) { .audiobook-maker-panel { flex-direction: column; align-items: stretch; padding: 14px 16px; } .amp-left { flex-direction: column; gap: 10px; } .amp-right { justify-content: center; } .amp-voice-select { min-width: 100%; } .amp-info { flex-wrap: wrap; gap: 8px; } .editor-layout { flex-direction: column; } .document-outline { width: 100%; position: relative; top: 0; max-height: 200px; } }