/* Notion Style Base */
.write-container.notion-style {
    max-width: 800px;
    /* Match standard post view */
    margin: 0 auto;
    padding: 4rem 0 10rem;
    /* Remove side padding to align exactly with text */
    position: relative;
    min-height: 100vh;
}

/* Header Section */
.notion-header {
    margin-bottom: 3rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Title Input */
.notion-title-input {
    width: 100%;
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-primary);
    border: none;
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.notion-title-input::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

.notion-title-input:focus {
    outline: none;
}

/* Properties Section */
.notion-properties {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.property-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 32px;
}

.property-label {
    width: 120px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-label i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
}

.property-value {
    flex: 1;
    display: flex;
    align-items: center;
}

/* Notion Style Selects */
.notion-select {
    appearance: none;
    border: none;
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9375rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.notion-select:hover {
    background: var(--border-medium);
}

.notion-select:focus {
    outline: none;
    background: var(--bg-hover);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Tag Input Inline */
.tag-input-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    position: relative;
}

.notion-tag-input {
    border: none;
    background: transparent;
    font-size: 0.9375rem;
    min-width: 100px;
    padding: 4px 0;
    color: var(--text-primary);
}

.notion-tag-input:focus {
    outline: none;
}

/* Inline Selected Tags */
.selected-tags-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Tag chip styles removed - now using global tags.css */
.tag-chip .tag-remove {
    margin-left: 4px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    background: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.tag-chip .tag-remove:hover {
    opacity: 1;
}

/* Inline Suggestions */
.tag-suggestions-inline {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    padding-left: 120px;
    /* Align with values */
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tag-suggestions-inline:hover {
    opacity: 1;
}

.suggestion-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-emoji {
    font-size: 1rem;
}

.tag-suggestion {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 6px;
}

.tag-suggestion:hover {
    text-decoration: underline;
    color: var(--primary);
}

/* Autocomplete Dropdown */
.tag-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    z-index: 100;
    min-width: 250px;
    max-width: 400px;
    max-height: 200px;
    overflow-y: auto;
}

.tag-autocomplete.hidden {
    display: none;
}

.tag-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tag-autocomplete-item .tag-badge {
    flex-shrink: 0;
}

.tag-create-label {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.tag-autocomplete-item:hover {
    background: var(--bg-hover);
}

/* Editor.js Container */
.notion-editor {
    min-height: 500px;
    /* Ensure visible click area */
    padding-bottom: 30vh;
    /* Bottom padding for scroll */
    cursor: text;
    /* Indicate clickable */
}

/* Editor.js Clean Reset */
.codex-editor__redactor {
    padding-bottom: 200px !important;
}

.ce-block__content {
    max-width: 100%;
}

.ce-popover--opened {
    z-index: 1000;
}

.ce-toolbar__content {
    max-width: 100%;
}

.ce-inline-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.ce-toolbar__plus,
.ce-toolbar__settings-btn {
    color: var(--text-muted);
}

.ce-toolbar__plus:hover,
.ce-toolbar__settings-btn:hover {
    color: var(--text-primary);
}

/* Editor.js Typography - Matches post view */
.ce-block {
    font-family: 'Pretendard', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--text-primary);
    max-width: 100%;
    padding: 3px 0;
}

/* Paragraph spacing - Matches post view */
.ce-paragraph {
    margin: 1rem 0;
    padding: 0;
    min-height: 1.8em;
    /* Match line-height */
}

/* Empty paragraph placeholder */
.ce-paragraph[data-placeholder]:empty::before {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Header spacing - Matches post view */
.ce-header {
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 0;
    color: var(--text-primary);
}

h1.ce-header {
    font-size: 2rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h2.ce-header {
    font-size: 1.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

h3.ce-header {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.ce-block__content {
    max-width: 100%;
    margin: 0;
}

/* Paragraph spacing between blocks - Matches post view */
.ce-block+.ce-block .ce-paragraph {
    margin-top: 1rem;
}

.image-tool__image-picture {
    border-radius: 8px;
    width: 100%;
}

.image-tool__caption {
    display: none;
}

.codex-editor__redactor {
    padding-bottom: 100px !important;
    margin-right: 0 !important;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    gap: 0.75rem;
    z-index: 1000;
}

.action-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.action-btn.cancel {
    background: transparent;
    color: var(--text-secondary);
}

.action-btn.cancel:hover {
    background: var(--bg-secondary);
}

.action-btn.submit {
    background: var(--primary);
    color: white;
}

.action-btn.submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ========================================
   Embed Styles (YouTube, SoundCloud, etc.)
   ======================================== */

/* Editor.js Embed Tool Container */
.embed-tool {
    margin: 2rem 0;
    width: 100%;
}

/* Embed Content (iframe container) */
.embed-tool__content {
    position: relative;
    width: 100%;
    max-width: 640px;
    /* Constrain width to standard video size */
    margin: 2rem auto;
    /* Center align */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

/* YouTube - 16:9 Aspect Ratio */
.embed-tool__content iframe[src*="youtube"] {
    aspect-ratio: 16 / 9;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* SoundCloud - Standard Slim Player */
.embed-tool__content iframe[src*="soundcloud"] {
    width: 100%;
    height: 166px !important;
    background: transparent;
    border-radius: 12px;
}

/* Embed Caption - Hidden as requested */
.embed-tool__caption {
    display: none;
}

/* Embed Preloader */
.embed-tool__preloader {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    justify-content: center;
    height: 200px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

/* Loading state */
.embed-tool--loading .embed-tool__content {
    opacity: 0.5;
}

/* General iframe in editor */
.ce-block iframe {
    border-radius: 8px;
    border: none;
    max-width: 100%;
}

/* ========================================
   Sophisticated Quote Style (Editor.js Override)
   Matches standard post view
   ======================================== */
/* ========================================
   Sophisticated Quote Style (Editor.js Override)
   Matches standard post view
   ======================================== */
.cdx-quote {
    margin: 2rem 0 1rem;
    /* Reduced bottom margin */
    text-align: center;
}

/* The actual text input area */
.cdx-quote__text {
    position: relative;
    min-height: 20px;
    margin: 0 auto;
    padding: 1rem 2rem;
    max-width: 85%;
    background: transparent;
    border: none;
    font-family: 'Times New Roman', serif;
    /* Emotional Serif Look */
    font-style: italic;
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--text-primary);
    box-shadow: none;
    text-align: center;
}

[data-theme="dark"] .cdx-quote__text {
    background: transparent;
    box-shadow: none;
    color: var(--text-primary);
}

/* Remove decorative quotes entirely as requested */
/* Remove decorative quotes entirely as requested */
.cdx-quote__text::before {
    content: none;
}

.cdx-quote__text::after {
    content: none;
}

/* Caption Input - Hidden as requested */
.cdx-quote__caption {
    display: none;
}

/* Placeholder styles override */
.cdx-quote__text:empty::before {
    color: var(--text-muted);
    opacity: 0.6;
    font-style: normal;
    font-size: 0.9em;
    content: '인용구를 입력하세요...';
}