/* === DOC-ONLY CONTENT (static reader skin) === */
.doc-only { display: none; }
body.document-view .doc-only { display: block; font-style: italic; }

/* === EMPTY STATE (moved from index.html) === */
.content-container:empty::before {
    content: "Welcome! Ask me to create a presentation about any topic to get started.";
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.7;
    font-style: italic;
}
/* Ambient animations during voice playback */
@media (prefers-reduced-motion: no-preference) {
  body.voice-playing .emoji, 
  body.voice-playing .emoji-list-item .emoji,
  body.voice-playing .emoji-list-item .emoji-icon {
    animation: emojiScalePulse 16s ease-in-out infinite alternate;
    transform-origin: center center;
    display: inline-block;
    will-change: transform;
  }

  @keyframes emojiScalePulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.25); }
  }

  body.voice-playing .content-item .sis-image-col img.slide-image:not([data-ambient-optout]),
  body.voice-playing .content-item img:not(.background-image):not([data-ambient-optout]) {
    animation: imageDrift 15s ease-in-out infinite alternate;
    transform-origin: center center;
    will-change: transform;
    /* use parent col's border radius for cropping */
    border-radius: inherit;
    clip-path: inset(0 round var(--border-radius, 12px));
    display: block;
  }

  @keyframes imageDrift {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
  }

  /* Title/heading gentle "breath" effect */
  body.voice-playing .slide-title,
  body.voice-playing .emoji-list-title,
  body.voice-playing .title-slide h1 {
    animation: titleBreath 30s ease-in-out infinite alternate;
  }

  @keyframes titleBreath {
    0% { letter-spacing: 0px; opacity: 1; }
    100% { letter-spacing: 2.5px; opacity: 0.97; }
  }
}
/* GENERAL LAYOUT */
body {
    overflow: hidden; /* Prevent scrolling on the body itself */
}

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

.content-wrapper {
    flex: 1;
    position: relative; /* Needed for positioning children like view-toggle */
    overflow-y: auto; /* Allow scrolling only on the content */
    height: 100vh;
}


/* === SHARE SECTION === */


.share-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.share-btn:focus {
    outline: none;
}

.share-btn:active {
    outline: none;
}

.share-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.share-btn:hover .share-icon {
    opacity: 1;
}

/* === SHARE MODAL RADIO BUTTONS === */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.radio-item:hover {
    background-color: #f8fafc;
}

.radio-item input[type="radio"] {
    display: none;
}

.radiomark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.radio-item input[type="radio"]:checked + .radiomark {
    border-color: #495e8c;
    background-color: #495e8c;
}

.radio-item input[type="radio"]:checked + .radiomark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background-color: white;
    border-radius: 50%;
}

.radio-item span:not(.radiomark) {
    flex: 1;
    line-height: 1.4;
    color: #1e293b;
    font-size: 14px;
}

/* === SHARE SUCCESS SCREEN === */
.applied-rules {
    margin: 16px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #10b981;
}

.applied-rules h4 {
    margin: 0 0 8px 0;
    color: #065f46;
    font-size: 14px;
}

.applied-rules ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.applied-rules li {
    color: #065f46;
    font-size: 13px;
    margin: 4px 0;
}

.custom-instructions {
    margin: 16px 0;
    padding: 12px;
    background: #ebf7fb;
    border-radius: 8px;
}

.custom-instructions h4 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 14px;
}

.custom-instructions p {
    margin: 0;
    color: #1e293b;
    font-size: 13px;
    font-style: italic;
}

.share-link-section {
    margin: 20px 0;
}

.share-link-section h4 {
    margin: 0 0 12px 0;
    color: #1e293b;
    font-size: 14px;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.share-url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #f8fafc;
    color: #1e293b;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.share-url-input:focus {
    outline: none;
    border-color: #495e8c;
    background: #ffffff;
}

.copy-btn {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
    color: #495e8c;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #495e8c;
    color: #ffffff;
    border-color: #495e8c;
}

.copy-btn.copied {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
}

.share-description {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* === LEARNER MODE RESTRICTIONS === */
body.learner-mode .control-add,
body.learner-mode .control-delete,
body.learner-mode .control-layouts,
body.learner-mode .control-up,
body.learner-mode .control-down,
body.learner-mode .image-edit-icon,
body.learner-mode .share-btn {
    display: none !important;
}

/* Disable all text editing in learner mode */
body.learner-mode [contenteditable] {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    -webkit-user-modify: read-only !important;
    pointer-events: none !important;
}

/* Re-enable pointer events for non-text interactions */
body.learner-mode [contenteditable] * {
    pointer-events: auto;
}

/* Ensure text can still be selected for copying */
body.learner-mode .content-item h1,
body.learner-mode .content-item h2,
body.learner-mode .content-item h3,
body.learner-mode .content-item p,
body.learner-mode .content-item .slide-subtitle,
body.learner-mode .content-item .author-info {
    user-select: text !important;
    -webkit-user-select: text !important;
    cursor: default !important;
}

/* Hide editing buttons in whiteboard learner mode */
 

/* Visual indicator for learner mode - REMOVED */

/* === TOOLBAR DIVIDER === */
.toolbar-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 8px;
}



/* === VIEW TOGGLE === */
.view-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.toggle-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.toggle-btn.active {
    background: #495e8c;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.toggle-btn:hover:not(.active) {
    background: #f8fafc;
    color: #1e293b;
}

 

/* === VOICE CONTROLS === */
.voice-controls {
    position: relative;
    display: none; /* Hidden by default, shown only in Prezi view */
    margin-left: 4px;
}

.voice-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.video-view .view-toggle #video-toggle.active .voice-btn {
    background: transparent;
    color: #ffffff;
    margin-left: 6px;
    padding: 0 6px;
}
body.video-view .view-toggle #video-toggle.active .voice-btn:hover {
    background: transparent;
}

.voice-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.voice-btn:focus {
    outline: none;
}

.voice-btn:active {
    outline: none;
}

.voice-btn img {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.voice-btn:hover img {
    opacity: 1;
}

.voice-panel {
    position: fixed;
    top: 100%;
    right: 20px;
    top: 60px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1001;
    margin-top: 22px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.voice-section {
    margin-bottom: 16px;
}

.voice-section label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1e293b;
    font-size: 14px;
}

/* Toggle switch for Add voice to presentation */
.voice-autoplay-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e2e8f0;
    transition: 0.2s;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #ffffff;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider {
    background: #495e8c;
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}
.toggle-text {
    color: #1e293b;
    font-size: 14px;
}

.voice-section select,
.voice-section input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.voice-section select:focus,
.voice-section input[type="text"]:focus {
    outline: none;
    border-color: #495e8c;
    box-shadow: 0 0 0 3px rgba(73, 94, 140, 0.1);
}

.voice-section input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #495e8c;
}

.voice-basic-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.voice-advanced-toggle {
    text-align: left;
    margin: 16px 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.voice-toggle-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 3px 3px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: left;
    gap: 6px;
    margin: 0 auto;
}

.voice-toggle-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.voice-advanced {
    border-top: 1px solid #e2e8f0;
    padding-top: 16px;
    margin-top: 16px;
}

.voice-advanced-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.voice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.voice-action-btn {
    flex: 1;
    min-width: 20px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.voice-action-btn.voice-primary {
    background: #495e8c;
    color: #ffffff;
    border-color: #495e8c;
    font-weight: 600;
}

.voice-action-btn.voice-primary:hover:not(:disabled) {
    background: #3d4f73;
    border-color: #3d4f73;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(73, 94, 140, 0.3);
}

.voice-action-btn:hover:not(:disabled) {
    background: #495e8c;
    color: #ffffff;
    border-color: #495e8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(73, 94, 140, 0.2);
}

.voice-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.voice-progress {
    margin-top: 16px;
    text-align: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #495e8c;
    width: 0%;
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.progress-text {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* === CHAT STYLES (SIDEBAR) === */
#chat-container {
    width: 350px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 16px; 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    height: calc(100vh - 20px); /* Add vertical margin */
    box-sizing: border-box;
    margin: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#chat-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

#chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat-header h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e293b;
    text-align: left;
    margin-left: 10px; /* Add space between button and title */
    flex: 1;
}

#chat-mode-icon {
    margin-right: 10px;
    opacity: 0.8;
}

#chat-mode-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.header-action-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.header-action-btn:hover {
    background-color: #f1f5f9;
}

.header-action-btn img {
    width: 20px;
    height: 20px;
}

#chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* For scrollbar */
}

#chat-input-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Chat options container */
#chat-options-container {
    padding: 8px 12px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

#internet-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

#internet-toggle {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#internet-toggle:checked + .toggle-text {
    color: #3b82f6;
    font-weight: 500;
}

.toggle-text {
    transition: color 0.2s ease;
}

#chat-input {
    flex-grow: 1;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    resize: none;
    height: 72px;
    overflow-y: auto;
    font-family: inherit;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

#chat-input:focus {
    outline: none;
    border-color: #495e8c;
}

#chat-send {
    padding: 12px 16px;
    border: none;
    background-color: #495e8c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.2s ease;
    height: 44px;
    flex-shrink: 0;
    white-space: nowrap;
}

#chat-send:hover {
    background-color: #3e5077;
}

.chat-message {
    margin-bottom: 5px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.assistant {
    align-items: flex-start;
}

.chat-message p {
    padding: 10px 15px;
    border-radius: 15px;
    display: inline-block;
    max-width: 90%;
    line-height: 1.5;
}

.chat-message.user p {
    background-color: #495e8c;
    color: white;
    border-bottom-right-radius: 5px;
}

.chat-message.assistant p {
    background-color: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 5px;
}

.chat-message.system p {
    opacity: 0.5;
    font-size: 12px;
    font-family: 'SF Mono', Consolas, monospace;
    padding-top: 4px;
    padding-bottom: 4px;
}


/* === DEBUG CONSOLE STYLES === */
/* Debug console styles moved to debug.css */ 

 

.add-card-bubble {
    min-width: 220px;
    max-width: 360px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(73, 94, 140, 0.13);
    padding: 14px 16px 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    z-index: 2001;
}

.add-card-input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 1rem;
    transition: border-color 0.2s;
    outline: none;
}
.add-card-input:focus {
    border-color: #495e8c;
}
.add-card-submit {
    background: #495e8c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s;
    box-shadow: 0 2px 8px rgba(73, 94, 140, 0.13);
}
.add-card-submit:hover {
    background: #64748b;
}

/* === PRESENTATION VIEW ENHANCEMENTS === */
/* Remove section header backgrounds but keep text content */
body.video-view .section-header {
    background-image: none !important;
    background-color: transparent !important;
    background: transparent !important;
    /* Remove the box/card styling that creates the gray rectangle */
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* === TEXT TYPE CONVERTER TOOLBAR === */
.text-type-toolbar {
    position: fixed;
    display: none;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 4px;
    gap: 2px;
    z-index: 10000;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toolbar-btn {
    background: none;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.toolbar-btn:hover {
    background: #f1f5f9;
    transform: scale(1.05);
}

.toolbar-btn:active {
    background: #e2e8f0;
    transform: scale(0.95);
}

.toolbar-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.toolbar-btn.disabled:hover {
    background: #f1f5f9;
    transform: none;
}

.toolbar-icon {
    font-size: 12px;
    line-height: 1;
    font-weight: 500;
    font-family: monospace;
}

/* Only show toolbar in slide and document views */
body.video-view .text-type-toolbar,
 

/* Prevent text editing in presentation view while keeping interactive elements functional */
body.video-view [contenteditable] {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-modify: read-only;
}

/* === IMAGE SELECTOR UI === */
.image-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.image-selector-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 600px;
    min-height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.image-selector-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-selector-title {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0;
}

.image-selector-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.image-selector-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.image-selector-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.image-selector-search {
    margin-bottom: 20px;
}

.image-selector-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.image-selector-search input {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.image-selector-search input:focus {
    outline: none;
    border-color: #495e8c;
}

.image-selector-search-btn {
    padding: 12px 16px;
    border: none;
    background: #495e8c;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.image-selector-search-btn:hover {
    background: #3e5077;
}

.image-selector-options-toggle {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.image-selector-options-toggle:hover {
    border-color: #495e8c;
    color: #495e8c;
}

.image-selector-options {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    background: #f8fafc;
    margin-bottom: 16px;
}

.image-selector-option-group {
    margin-bottom: 16px;
}

.image-selector-option-group-row {
    display: flex;
    gap: 32px;
    align-items: center;
    margin-bottom: 16px;
}

.image-selector-field-inline {
    display: flex;
    flex-direction: column;
    min-width: 140px;
    margin-bottom: 0;
}

.image-selector-metaphors-options,
.image-selector-images-options {
    margin-bottom: 0;
}

.image-selector-checkbox {
    margin-top: 24px;
}

.image-selector-radio {
    display: flex;
    align-items: center;
    margin-right: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1e293b;
}

.image-selector-radio input[type="radio"] {
    margin-right: 8px;
    accent-color: #495e8c;
}

.image-selector-field {
    margin-bottom: 12px;
}

.image-selector-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
}

.image-selector-select {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s ease;
}

.image-selector-select:focus {
    outline: none;
    border-color: #495e8c;
}

.image-selector-input {
    width: 100%;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.2s ease;
}

.image-selector-input:focus {
    outline: none;
    border-color: #495e8c;
}

.image-selector-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1e293b;
}

.image-selector-checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #495e8c;
}

.image-selector-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.image-selector-item {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.image-selector-item:hover {
    border-color: #495e8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-selector-item.selected {
    border-color: #495e8c;
    background: #f0f4ff;
}

.image-selector-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-selector-item-info {
    padding: 12px;
}

.image-selector-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.image-selector-item-description {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
    line-height: 1.4;
}

.image-selector-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.image-selector-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: #495e8c;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.image-selector-actions {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-selector-actions-right {
    display: flex;
    gap: 12px;
}

.image-selector-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-selector-btn.cancel {
    background: #f1f5f9;
    color: #64748b;
}

.image-selector-btn.cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.image-selector-btn.apply {
    background: #495e8c;
    color: white;
}

.image-selector-btn.apply:hover {
    background: #3e5077;
}

.image-selector-btn.apply:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

.image-selector-advanced-link-row {
    margin-top: 2px;
    margin-bottom: 8px;
    text-align: left;
}

.image-selector-advanced-link {
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    transition: color 0.2s;
}

.image-selector-advanced-link:hover {
    color: #495e8c;
    text-decoration: underline;
}

/* Image edit icon */
.content-item img,
.content-item .section-background-image,
.content-item.section-header {
    position: relative;
}

.image-edit-icon {
    position: absolute;
    top: 28px;
    right: 28px;
    background: white;
    padding: 6px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    opacity: 1;
    transform: scale(0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.image-edit-icon::before {
    content: '';
    width: 32px;
    height: 32px;
    background-image: url('assets/slide-imageedit.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.image-edit-icon:hover {
    border: 1px solid rgba(73, 94, 140, 0.9);
    transform: scale(1.1);
}

/* Only show edit icons in slide view */
body.slide-view .image-edit-icon {
    opacity: 1;
    transform: scale(1);
}

/* Hide edit icons in other views */
body.video-view .image-edit-icon,
body.document-view .image-edit-icon,
 

/* Hide slide controls in non-slide views */
body.video-view .slide-controls,
body.document-view .slide-controls,
 

/* For section headers, position the icon on the section header element */
.content-item.section-header[data-bg-search] .image-edit-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 20;
}

/* === SLIDE VIEW SPACING === */
body.slide-view .content-item {
    position: relative; /* For absolute positioning of controls */
}

/* === SLIDE CONTROLS (Slide View Only, Bottom Center) === */
body.slide-view .slide-controls {
    position: absolute;
    left: 50%;
    bottom: -0px;
    transform: translateX(-50%);
    height: 46px;
    background: white;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    padding-right: 5px;
    gap: 2px;
    transition: opacity 0.18s, background 0.18s;
    z-index: 2;
}
body.slide-view .content-item:hover .slide-controls {
    opacity: 1;
}
body.slide-view .slide-controls:active {
    cursor: grabbing;
    background: #64748b;
}

body.slide-view .slide-controls .control-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: #495e8c;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1px;
    margin: 0;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
body.slide-view .slide-controls .control-btn:hover {
    background: rgba(73, 94, 140, 0.12);
}

/* AI button styling with SVG icon */
body.slide-view .slide-controls .control-btn.control-ai {
    background-image: url('assets/ai-sparkle.svg?v=2');
    background-size: 26px 26px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Add slide button styling with SVG icon */
body.slide-view .slide-controls .control-btn.control-add {
    background-image: url('assets/newslide.svg');
    background-size: 26px 26px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Up button styling with SVG icon */
body.slide-view .slide-controls .control-btn.control-up {
    background-image: url('assets/up.svg');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

/* Down button styling with SVG icon */
body.slide-view .slide-controls .control-btn.control-down {
    background-image: url('assets/down.svg');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

/* === TYPE ANYWHERE TEXT BOXES === */
.type-anywhere-textbox {
    margin: 0.5rem 0;
    min-height: 1.5em;
}

 

/* Layouts popup for slide controls */
.layouts-popup {
  position: absolute;
  z-index: 3000;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 5px 5px;
  font-size: 0.75rem;
  color: #222;
  min-width: 180px;
  max-width: 320px;
}
.layouts-popup ul {
  padding: 0;
  list-style: none;
}
.layouts-popup li {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}
.layouts-popup li:hover {
    background-color: #f1f5f9;
}

/* === Layouts Preview Modal === */
.layouts-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.25);
    z-index: 4000;
}

.layouts-preview-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 32px;
    z-index: 4100;
    width: 90vw;
    max-width: 1100px;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
}

.layouts-preview-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #495e8c;
    line-height: 1;
}

.layouts-preview-title {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.layouts-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px 24px;
    justify-items: center;
    align-items: start;
}

.preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.preview-box {
    width: 240px;
    height: 135px;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.preview-scale-wrapper {
    width: 1200px;
    height: 675px;
    transform-origin: top left;
}

.preview-label {
    font-size: 0.85rem;
    color: #495e8c;
    margin-top: 8px;
    text-align: center;
    max-width: 240px;
}

/* === Modal Tabs === */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
    margin-left: -32px;
    margin-right: -32px;
    padding-left: 32px;
}
.modal-tab {
    padding: 8px 16px;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-bottom: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
}
.modal-tab.active {
    color: #1e293b;
    border-color: #e2e8f0;
    border-bottom: 1px solid white;
    border-radius: 8px 8px 0 0;
}
.modal-tab-panel {
    display: none;
}
.modal-tab-panel.active {
    display: block;
}

/* === Theme Browser Styles === */
.themes-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.theme-row {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.theme-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e293b;
    border-bottom: none;
}

.theme-author {
    font-size: 0.8rem;
    color: #64748b;
    margin-left: 8px;
    font-weight: 400;
}

.theme-previews {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: 200px; /* Matches .preview-box width */
    gap: 10px;
    height: 245px; /* Accommodates two rows, gap, and padding */
    overflow-y: hidden;
    overflow-x: hidden;
    padding-bottom: 10px;
    padding-left: 2px;
    padding-right: 2px;
}

/* Make the previews within the theme list smaller but correctly proportioned */
.theme-previews .preview-box {
    width: 200px;
    aspect-ratio: 16 / 9 !important;
    height: auto;
    flex-shrink: 0; /* Prevent shrinking */
}

.theme-previews .preview-box:hover {
    border-color: #3b82f6;
}

.apply-theme-btn {
    align-self: flex-start;
    padding: 8px 16px;
    border: none;
    background-color: #495e8c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    flex-shrink: 0; /* Prevent button from shrinking */
}

.apply-theme-btn:hover {
    background-color: #3e5077;
}

/* === Welcome Modal === */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.18);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.welcome-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    padding: 40px 32px 32px 32px;
    z-index: 5100;
    width: 95vw;
    max-width: 800px; /* Widen the modal */
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.welcome-modal-close {
    position: absolute;
    top: 16px;
    right: 24px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #495e8c;
    line-height: 1;
}
.welcome-actions-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
}

.welcome-action-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 1.1rem;
    color: #495e8c;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin: 0;
    outline: none;
}
.welcome-action-btn.hover,
.welcome-action-btn:focus,
.welcome-action-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.welcome-updates-text {
    width: 100%;
    text-align: center;
}
.welcome-updates-text h3 {
    font-size: 1.2rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 8px;
}
.welcome-updates-text p {
    font-size: 1rem;
    color: #64748b;
}
.welcome-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    margin-top: 24px;
}
.welcome-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}
.welcome-action-item img {
    width: 170px;
    height: 170px;
    border-radius: 10%;
    object-fit: cover;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}
.welcome-action-item:hover img {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.welcome-action-item .label {
    font-size: 0.95rem;
    color: #495e8c;
}

/* Citation links styling */
.citation-link {
    color: #007acc;
    text-decoration: none;
    font-size: 0.9em;
    border-bottom: 1px dotted #007acc;
    transition: all 0.2s ease;
}

.citation-link:hover {
    color: #005999;
    border-bottom-style: solid;
    background-color: rgba(0, 122, 204, 0.1);
    padding: 1px 2px;
    border-radius: 2px;
}

/* === AI STRUCTURING OVERLAY === */
.ai-structuring-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ai-structuring-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ai-structuring-content {
    background: var(--background-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
}

.ai-structuring-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.ai-structuring-content p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ai-structuring-content small {
    color: var(--text-secondary);
    opacity: 0.7;
}

.ai-structuring-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* === SHARE MODAL === */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.share-modal-overlay.active {
    display: flex;
}

.share-modal-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 30px;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.share-modal-title {
    margin: 0 0 16px 0;
    color: #1e293b;
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
}

/* Mode Selection */
.share-mode-selection {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.share-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50%;
    text-align: left;
    padding-left: 20px;
    padding-right: 20px;
    margin: 0;
    padding-top: 20px;
    padding-bottom: 20px;
    opacity: 0.4;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.share-mode-option.active {
    opacity: 1;
    background-color: #f8fafc;
}

.mode-icon {
    flex-shrink: 0;
}

.mode-content {
    flex: 1;
}

.mode-icon img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.mode-content .mode-title {
    margin: 0;
    padding: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 4px;
}

.mode-content p {
    margin: 0;
    padding: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.4;
}

/* Input Sections */
.share-input-sections {
    display: flex;
    gap: 20px;
    margin-bottom: 32px;
}

.input-section {
    flex: 1;
    transition: opacity 0.3s ease;
}

.input-section.faded {
    opacity: 0.3;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
}

.textarea-container {
    position: relative;
}

.share-textarea {
    width: 100%;
    min-height: 160px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #1e293b;
}

.check-icon {
    position: absolute;
    bottom: -17px;
    right: 0px;
    width: 20px;
    height: 20px;
    background: #495e8c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    z-index: 1;
}

.check-icon:hover {
    background: #3d4f7a;
    transform: scale(1.1);
}

.share-textarea:focus {
    outline: none;
    border-color: #495e8c;
}

.share-textarea:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
    border-color: #e5e7eb;
}

.share-textarea::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Modal Actions */
.share-modal-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

.share-btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.share-btn-secondary:hover {
    background: #f8fafc;
    color: #1e293b;
}

.share-btn-primary {
    padding: 8px 16px;
    border: none;
    border-radius: 50px;
    background: #495e8c;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(73, 94, 140, 0.3);
}

.share-btn-primary:hover {
    background: #3d4f7a;
}

.share-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon,
.btn-check-icon {
    font-size: 0.9rem;
}

.btn-check-icon {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .share-modal-content {
        padding: 24px;
        max-width: 95%;
    }
    
    .share-mode-selection {
        flex-direction: column;
        align-items: center;
    }
    
    .share-mode-option {
        min-width: 100%;
        max-width: 400px;
    }
    
    .share-input-sections {
        flex-direction: column;
    }
    
    .share-modal-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    
    .share-btn-secondary,
    .share-btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.share-modal-content h3 {
    margin: 0 0 20px 0;
    color: #1e293b;
    font-size: 1.3rem;
    font-weight: 600;
}

.rules-section {
    margin-bottom: 24px;
}

.rules-section h4 {
    margin: 0 0 12px 0;
    color: #495e8c;
    font-size: 1rem;
    font-weight: 600;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #1e293b;
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.checkbox-item:hover .checkmark {
    border-color: #495e8c;
}

.checkbox-item input:checked ~ .checkmark {
    background-color: #495e8c;
    border-color: #495e8c;
}

.checkbox-item input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.custom-rules-section {
    margin-bottom: 24px;
}

.custom-rules-section h4 {
    margin: 0 0 12px 0;
    color: #495e8c;
    font-size: 1rem;
    font-weight: 600;
}

#custom-rules-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#custom-rules-input:focus {
    outline: none;
    border-color: #495e8c;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.cancel-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.modal-btn.share-btn {
    background: #ffffff;
    color: #495e8c;
    border: 2px solid #495e8c;
}

.modal-btn.share-btn:hover {
    background: #f8fafc;
    border-color: #3d4f7a;
}

/* === WELCOME MESSAGE EDITOR === */
.welcome-message-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.welcome-message-section h4 {
    margin: 0 0 8px 0;
    color: #495e8c;
    font-size: 1rem;
    font-weight: 600;
}

.welcome-preview-note {
    margin: 0 0 12px 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

.welcome-message-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    background: #ffffff;
    color: #1e293b;
    transition: border-color 0.2s ease;
}

.welcome-message-textarea:focus {
    outline: none;
    border-color: #495e8c;
    box-shadow: 0 0 0 3px rgba(73, 94, 140, 0.1);
}

.welcome-message-textarea::placeholder {
    color: #9ca3af;
}

/* === ESSENCE SECTION STYLES === */


.essence-section h4 {
    margin: 0 0 8px 0;
    color: #495e8c;
    font-size: 1rem;
    font-weight: 600;
}

.essence-note {
    margin: 0 0 12px 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-style: italic;
}

.essence-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.4;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    background: #ffffff;
    color: #1e293b;
    transition: border-color 0.2s ease;
}

.essence-textarea:focus {
    outline: none;
    border-color: #495e8c;
    box-shadow: 0 0 0 3px rgba(73, 94, 140, 0.1);
}

.essence-textarea::placeholder {
    color: #9ca3af;
}

/* === LOADING MESSAGE STYLES === */
.loading-message .message-text {
    color: #6b7280;
    font-style: italic;
    opacity: 0.8;
}

.loading-message .message-content {
    background: #f8fafc;
    border-left: 3px solid #e2e8f0;
}

/* === CHAT ACTIONS BUTTONS === */
#chat-actions {
    display: flex;
    gap: 10px;
    padding: 15px 0 0 0;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

.action-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    background-color: #ffffff;
    color: #495e8c;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover {
    background-color: #f8fafc;
    border-color: #495e8c;
}

.action-btn:active {
    transform: translateY(1px);
}

/* === AI RULES MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    line-height: 1;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    padding: 24px;
    max-height: 50vh;
    overflow-y: auto;
}

.rules-section {
    margin-bottom: 24px;
}

.rules-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #1e293b;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #495e8c;
}

.custom-instructions-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #1e293b;
}

#custom-instructions {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.2s ease;
}

#custom-instructions:focus {
    outline: none;
    border-color: #495e8c;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e2e8f0;
    justify-content: flex-end;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.cancel-btn {
    background-color: #f1f5f9;
    color: #64748b;
}

.cancel-btn:hover {
    background-color: #e2e8f0;
}

.primary-btn {
    background-color: #495e8c;
    color: white;
}

.primary-btn:hover {
    background-color: #3d5a85;
}

/* === SHARED MODE INDICATORS - REMOVED === */

/* === ADVENTURE MODE STYLES === */

/* New slide container with transparent background */
.adventure-new-slide-container {
    width: 100%;
    background: #ffffff;
    border-radius: 15px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

/* Input interface layout - horizontal */
.adventure-input-interface {
    display: flex;
    width: 100%;
    gap: 12px;
    padding: 20px 40px 0px 20px;
    align-items: center;
    position: relative;
}

/* Left side - text input */
.adventure-left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adventure-input-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.adventure-description-input {
    flex: 1;
    min-height: 50px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #1e293b;
}

.adventure-description-input:focus {
    outline: none;
    border-color: #495e8c;
    box-shadow: 0 0 0 3px rgba(73, 94, 140, 0.1);
}

.adventure-description-input::placeholder {
    color: #94a3b8;
}

/* Button container - horizontal layout */
.adventure-button-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Right side - suggestions */
.adventure-right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adventure-suggestions-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.adventure-suggestion-btn {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: all 0.2s;
    color: #64748b;
}

.adventure-suggestion-btn:hover {
    border-color: #495e8c;
    background-color: #f8fafc;
    color: #1e293b;
}

.adventure-suggestion-btn.adventure-suggestion-loading {
    opacity: 0.5;
    font-style: italic;
    cursor: not-allowed;
}

.adventure-suggestion-btn.adventure-suggestion-loading:hover {
    border-color: #e2e8f0;
    background-color: #ffffff;
}

/* Action buttons - match share dialog style */
.adventure-action-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    margin-top: auto;
}

.adventure-cancel-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 50px;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.adventure-cancel-btn:hover {
    background: #f8fafc;
    color: #1e293b;
}

.adventure-generate-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #495e8c;
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(73, 94, 140, 0.3);
    white-space: nowrap;
}

.adventure-generate-btn:hover {
    background: #3d4f7a;
}

.adventure-blank-btn {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: inherit;
    white-space: nowrap;
}
.adventure-blank-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.adventure-cancel-btn .btn-icon {
    font-size: 0.9rem;
}

/* Cancel X button - top right */
.adventure-cancel-btn.adventure-cancel-x {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adventure-cancel-btn.adventure-cancel-x:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Options container for streaming results */
.adventure-options-container {
    width: 100%;
    padding: 20px 20px 10px 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Individual option wrapper */
.adventure-option {
    flex: 1;
    max-width: 400px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.adventure-option:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Option placeholder while loading */
.adventure-option-placeholder {
    flex: 1;
    max-width: 400px;
    height: 200px;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.5);
}

/* Generating animation - subtle pulsing */
.adventure-option-placeholder.adventure-generating {
    animation: adventure-pulse 2s ease-in-out infinite;
}

@keyframes adventure-pulse {
    0%, 100% {
        background-color: #f8fafc;
        border-color: #e2e8f0;
    }
    50% {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
    }
}

/* Clean slide preview */
.adventure-slide-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: white;
}




/* === VIEW MODES: slide/document/video wrappers (duplicated from index.html; inline remains source of truth) === */
body.slide-view .content-wrapper {
    padding: var(--spacing-lg) var(--spacing-sm);
}
body.slide-view .content-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xl);
    max-width: var(--container-max-width);
    margin: 0 auto;
}
body.video-view .content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    overflow: hidden;
}
body.video-view .content-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
body.video-view .content-item {
    width: 90vw;
    max-width: var(--slide-max-width);
    aspect-ratio: var(--slide-aspect-ratio);
    display: flex;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    overflow: hidden;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}
body.video-view .content-item.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 10;
}
body.video-view .content-item > * {
    max-width: 100%;
    max-height: 100%;
}
body.video-view #chat-container {
    display: none !important;
}
.content-item[data-slide]::after {
    content: attr(data-slide);
    position: absolute;
    bottom: var(--spacing-sm);
    right: var(--spacing-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
    font-weight: 500;
    padding: 4px 8px;
}
/* === DOCUMENT VIEW STATIC SKIN (migrated from index.html, non-editable) === */
/* Reader layout and typography for document view; slide content remains editable logically. */
/* Force neutral white reader background regardless of theme */
body.document-view {
    background-color: #ffffff !important;
    background-image: none !important;
}
body.document-view .content-wrapper {
    padding: var(--spacing-xl) var(--spacing-md);
}
body.document-view .content-container {
    max-width: var(--document-max-width);
    margin: 0 auto;
    font-family: var(--font-secondary);
    background: #ffffff !important;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    line-height: 1.8;
}
body.document-view .content-item {
    width: auto;
    max-width: none;
    aspect-ratio: unset;
    background: var(--color-transparent);
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    display: block;
    position: static;
    transition: none;
    margin-bottom: var(--spacing-lg);
}
body.document-view .content-item:not(:last-child) {
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px dashed var(--border-color);
}
body.document-view .content-item[data-slide]::after {
    display: none;
}
body.document-view .content-item:hover {
    box-shadow: none;
    transform: none;
}
/* Document Typography */
body.document-view .content-item h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: #1e293b;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: var(--spacing-sm);
    line-height: 1.2;
}
body.document-view .content-item h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    color: #1e293b;
    line-height: 1.3;
}
body.document-view .content-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
    color: #1e293b;
}
/* Default body text color to near-black; headings handled separately */
body.document-view .content-item,
body.document-view .content-item p,
body.document-view .content-item li {
    color: #111827 !important;
}
body.document-view .content-item p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    text-align: justify;
    line-height: 1.8;
}
body.document-view .content-item ul,
body.document-view .content-item ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}
body.document-view .content-item li {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.6;
}
body.document-view .content-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}
/* Neutralize utility surfaces in document view */
body.document-view .chip,
body.document-view .card,
body.document-view .card-120,
body.document-view .circle-120,
body.document-view .overlay-block {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}
body.document-view .content-item blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    font-style: italic;
    color: #495e8c;
    font-size: 1.1rem;
}
/* Document Layout Adjustments */
body.document-view .comparison-grid {
    display: block;
    grid-template-columns: none;
    gap: 0;
    margin-top: 0;
}
body.document-view .comparison-section {
    margin-bottom: var(--spacing-md);
}
body.document-view .comparison-section h4 {
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}
body.document-view .comparison-section.before h4 {
    color: var(--color-danger);
}
body.document-view .comparison-section.after h4 {
    color: var(--color-success);
}
/* Overrides for New Layouts in Document View */
body.document-view .title-slide .title-icon {
    display: none;
}
body.document-view .title-slide .title-text {
    border-left: none;
    padding-left: 0;
}
body.document-view .hero-slide {
    padding: 0;
    color: inherit;
}
body.document-view .hero-slide .section-background-image,
body.document-view .hero-slide .section-overlay,
body.document-view .hero-slide .section-divider {
    display: none;
}
body.document-view .hero-slide .section-content {
    position: static;
}
body.document-view .hero-slide .section-text-block h2,
body.document-view .hero-slide .section-text-block p {
    background: transparent !important;
    padding: 0 !important;
    color: #1e293b !important;
}
body.document-view .simple-image-slide {
    display: block;
    padding: 0;
}
/* In document view, show image as a small thumbnail below text */
body.document-view .sis-image-col {
    display: block;
    max-width: 240px;
    margin: var(--spacing-md) 0 0 0;
}
body.document-view .sis-image-col .slide-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: none;
}
body.document-view .sis-text-col {
    padding: 0;
}
body.document-view .sis-divider {
    display: none;
}
/* Remove special formatting for hero/section in document view */
body.document-view .hero-slide,
body.document-view .hero-slide .section-content,
body.document-view .hero-slide .section-text-block h2,
body.document-view .hero-slide .section-text-block p {
    color: var(--text-primary) !important;
    background: none !important;
    padding: 0 !important;
}
body.document-view .hero-slide .section-background-image,
body.document-view .hero-slide .section-overlay,
body.document-view .hero-slide .section-divider {
    display: none !important;
}
body.document-view .section-header {
    padding: 0;
    color: inherit;
    background: none !important;
}
body.document-view .section-header .section-background-image,
body.document-view .section-header .section-overlay,
body.document-view .section-header .section-divider {
    display: none;
}
body.document-view .section-header .section-content {
    position: static;
    background: none !important;
}
body.document-view .section-header .section-text-block h2,
body.document-view .section-header .section-text-block p {
    background: transparent !important;
    padding: 0 !important;
    color: #1e293b !important;
}
/* Ensure no backgrounds on any titles in document view */
body.document-view .content-item h1,
body.document-view .content-item h2,
body.document-view .content-item h3,
body.document-view .content-item h4 {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}
/* Normalize lists in document view */
body.document-view .content-item ul,
body.document-view .content-item ol {
    display: block !important;
    list-style-position: outside !important;
    padding-left: var(--spacing-lg) !important;
    margin: var(--spacing-md) 0 !important;
    gap: 0 !important;
}
body.document-view .content-item li {
    display: list-item !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 var(--spacing-xs) 0 !important;
}
/* Visual list/boxes become simple stacked text lists */
body.document-view .icon-list-slide .emoji-list-grid,
body.document-view .boxes-list-slide .box-grid {
    display: block !important;
}
body.document-view .icon-list-slide .emoji-list-item,
body.document-view .boxes-list-slide .box-item {
    display: list-item !important;
    list-style: disc !important;
    margin-left: var(--spacing-lg) !important;
    background: none !important;
    box-shadow: none !important;
    border: none !important;
    width: auto !important;
    height: auto !important;
}
/* Comprehensive override for any background colors in document view */
body.document-view .hero-slide *,
body.document-view .section-header * {
    background: none !important;
    background-color: transparent !important;
}
body.document-view .hero-slide,
body.document-view .section-header {
    background: none !important;
    background-color: transparent !important;
}
body.document-view .hero-slide .section-background-image {
    display: none !important;
}
/* Hide progress arrows in document view */
body.document-view .progress-slide .progress-arrow {
    display: none;
}
/* Hide emoji icons in document view */
body.document-view .icon-list-slide .emoji-list-emoji {
    display: none;
}
/* === DOC VIEW: Boxes list becomes a simple text list === */
body.document-view .boxes-list-slide .boxes-list-layout {
    display: block !important;
}
body.document-view .boxes-list-slide .boxes-list-title-col,
body.document-view .boxes-list-slide .boxes-list-grid-col {
    flex: none !important;
    width: auto !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}
body.document-view .boxes-list-slide .boxes-list-title-divider { display: none !important; }
body.document-view .boxes-list-slide .box-grid { display: block !important; margin-top: var(--spacing-sm); }
body.document-view .boxes-list-slide .box-item {
    display: list-item !important;
    list-style: disc outside !important;
    margin-left: var(--spacing-lg) !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    align-items: normal !important;
    justify-content: flex-start !important;
    text-align: left !important;
}

/* === DOC VIEW: Pros/Cons becomes stacked text lists === */
body.document-view .pros-cons-slide .pros-cons-layout { display: block !important; }
body.document-view .pros-cons-slide .pros-cons-divider { display: none !important; }
body.document-view .pros-cons-slide .pros-col,
body.document-view .pros-cons-slide .cons-col {
    flex: none !important;
    width: auto !important;
    display: block !important;
    padding: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}
body.document-view .pros-cons-slide .pros-label,
body.document-view .pros-cons-slide .cons-label {
    text-align: left !important;
    margin: var(--spacing-md) 0 var(--spacing-xs) 0 !important;
}
body.document-view .pros-cons-slide .pros-cons-item {
    display: list-item !important;
    list-style: disc outside !important;
    margin-left: var(--spacing-lg) !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}