/* ============================================
   Edit Generation Page Styles v39.2
   Clean version - все legacy удалено
   ============================================ */

/* Компактный вид без лишних отступов */
#view-editor {
    padding-top: calc(var(--header-height) + 8px) !important; /* 64px + 8px = 72px вместо 80px */
}

/* Заголовок с минимальными отступами */
#view-editor .header {
    padding: 0 !important;
    margin-bottom: 16px !important;
}

/* Секция исходного изображения */
#view-editor .original-image-section {
    max-width: 600px;
    margin: 0 auto 16px auto; /* Уменьшено с 24px */
    padding: 0 16px;
}

/* Превью сохраняет пропорции */
#view-editor .original-image-container {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: #1a1a2e;
    position: relative;
}

#view-editor .original-image-container img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#view-editor .original-image-container img.loaded {
    opacity: 1;
}

/* Skeleton loader для изображения */
#view-editor .original-image-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #1a1a2e 25%, #2a2a3e 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Слайдер профилей - базовые стили из components.css */
#view-editor .profiles-selector {
    margin: 0 auto 16px auto; /* Уменьшено с 20px */
    padding: 0 16px;
    max-width: 600px;
}

/* Секция промпта с Tiptap */
#view-editor .prompt-section {
    max-width: 600px;
    margin: 0 auto 180px auto; /* Уменьшен отступ под селектор */
    padding: 0 16px;
}

#view-editor .textarea-container {
    position: relative;
    background: #1a1a2e;
    border: 2px solid #2a2a3e;
    border-radius: 16px;
    padding: 16px;
    transition: border-color 0.3s ease;
    min-height: 120px;
}

#view-editor .textarea-container:focus-within {
    border-color: #6A2CFF;
    box-shadow: 0 0 0 3px rgba(106, 44, 255, 0.1);
}

#view-editor .prompt-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0;
    background: transparent;
    border: none;
    color: #F5F7FA;
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.5;
    outline: none;
}

/* Tiptap styles */
#view-editor .prompt-textarea .tiptap {
    outline: none;
}

#view-editor .prompt-textarea .tiptap p.is-editor-empty:first-child::before,
#view-editor .prompt-textarea .tiptap.is-empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    height: 0;
    float: left;
}

/* ❌ УДАЛЕНО - все стили .profile-badge перенесены в components.css */

/* Clear button */
#view-editor .clear-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(106, 44, 255, 0.2);
    border: 1px solid rgba(106, 44, 255, 0.4);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0;
    line-height: 1;
}

#view-editor .clear-btn.show {
    display: flex;
}

#view-editor .clear-btn:active {
    transform: scale(0.95);
    background: rgba(106, 44, 255, 0.4);
}

/* Editor specific: селектор над нижней кнопкой */
#view-editor .models-selector-section {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-max-width);
    padding: 16px 16px 20px 16px;
    border-radius: 32px 32px 0 0; /* Только верхние углы */
    z-index: 99;
    box-sizing: border-box;
}
