/* Poster Editor Styles */

/* Fonts */
@import url('https://rsms.me/inter/inter.css');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css');
@import url('/fonts/d2coding.css');

body {
    font-family: 'Pretendard', 'Inter', sans-serif;
}

/* Code Block Styles */
pre code {
    font-family: 'D2Coding', 'Consolas', 'Monaco', monospace;
}

/* Page Break Control */
.break-inside-avoid {
    break-inside: avoid;
}

/* Block Add Button Animation */
.add-block-btn {
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

.block-container:hover .add-block-btn {
    opacity: 1;
}

.add-block-btn:hover {
    transform: scale(1.1);
}

/* Textarea Scrollbar Hide */
textarea {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

textarea::-webkit-scrollbar {
    display: none;
}

/* Prose Markdown Header Styles */
.prose h1 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.prose h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.6rem;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}

.prose h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.prose h4 {
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 0.4rem;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

/* Prose List Styles */
.prose :where(ul):not(:where([class~="not-prose"] *)) {
    padding-left: 1.2em;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.5em;
}

/* Drag and Drop Styles */

/* Placeholder animation */
.drop-placeholder {
    animation: placeholder-pulse 1s ease-in-out infinite;
    transition: height 0.2s ease;
}

@keyframes placeholder-pulse {
    0%, 100% {
        background-color: #dbeafe;
    }
    50% {
        background-color: #bfdbfe;
    }
}

/* Dragging clone styles */
.dragging-clone {
    border-radius: 8px;
    background: white;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.dragging-clone > div:first-child {
    border-color: #3b82f6 !important;
    background-color: #f0f9ff !important;
}

/* Other blocks should smoothly animate when placeholder moves */
.block-container {
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Drag Handle Cursor */
.drag-handle {
    cursor: grab;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.drag-handle:hover {
    background-color: #dbeafe;
    color: #2563eb;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Dropdown Menu Styles */
#download-dropdown-menu {
    transform-origin: top right;
    transition: all 0.2s ease-out;
}

#download-dropdown-menu.show {
    display: block;
    animation: dropdown-fade-in 0.2s ease-out;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive labels in header */
@media (max-width: 768px) {
    .responsive-label {
        display: none !important;
    }
    #help-btn {
        width: 2rem;
        padding-left: 0;
        padding-right: 0;
        border-radius: 9999px;
    }
}

/* Inline Editable Preview styles */
.preview-editable {
    position: relative;
    cursor: pointer;
    transition: outline 0.15s ease, outline-offset 0.15s ease;
}

.preview-editable:hover {
    outline: 2px dashed #013d75 !important;
    outline-offset: 4px;
    border-radius: 4px;
}

.preview-editable::after {
    content: '더블클릭하여 편집';
    position: absolute;
    top: -24px;
    right: 0;
    background-color: #013d75;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 6px center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px 2px 22px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.preview-editable:hover::after {
    opacity: 1;
}

/* Hide editable tooltip while editing inline */
.preview-editable.editing-active::after {
    display: none !important;
}

.preview-editable.editing-active:hover {
    outline: none !important;
}


