/**
 * Стили главной страницы Siteolite (демо редактора, CTA, карточки)
 */

/* ——— Визуальный редактор (демо) ——— */
.interface-demo {
    position: relative;
    margin: 60px auto;
    max-width: 1200px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #1a1a1c;
}

.demo-header {
    background: #252528;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.demo-header-left {
    color: rgba(255, 255, 255, 0.8);
}

.demo-header-back {
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
}

.demo-header-title {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.demo-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--vt-theme);
    flex-shrink: 0;
}

.demo-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-toolbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

.demo-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: default;
    transition: color 0.2s, background 0.2s;
}

.demo-toolbar-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
}

.demo-toolbar-btn.active {
    color: var(--vt-theme);
    background: rgba(var(--vt-theme-rgb), 0.15);
}

.demo-toolbar-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.demo-preview-btn {
    margin-left: 8px;
    padding: 8px 14px;
    font-size: 13px;
    background: rgba(var(--vt-theme-rgb), 0.2);
    color: var(--vt-theme);
    border: 1px solid rgba(var(--vt-theme-rgb), 0.4);
    border-radius: 8px;
    cursor: default;
}

.demo-save-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    background: var(--vt-theme);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: default;
}

.demo-content {
    display: grid;
    grid-template-columns: 260px 1fr 280px;
    min-height: 520px;
    background: #1a1a1c;
}

.demo-sidebar {
    background: #1e1e21;
    padding: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

.demo-elements-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.9);
}

.demo-elements-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.demo-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.demo-tab {
    padding: 8px 12px;
    font-size: 13px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    cursor: default;
}

.demo-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.demo-search {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.demo-category {
    margin-bottom: 12px;
}

.demo-category-header {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

.demo-category-count {
    opacity: 0.7;
}

.demo-component-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.demo-component-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    cursor: default;
}

.demo-component-item .icon {
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    flex-shrink: 0;
}

.demo-component-item .tag {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.demo-category.collapsed .demo-component-list {
    display: none;
}

.demo-canvas {
    padding: 24px;
    background: #161618;
    position: relative;
    overflow: auto;
}

.demo-canvas-inner {
    max-width: 640px;
    margin: 0 auto;
}

.demo-canvas-badge {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 8px;
}

.demo-canvas-h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: white;
}

.demo-canvas-h2 {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
}

.demo-selected-block {
    position: relative;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.demo-selected-block.selected,
.demo-dropped-block.selected {
    border-color: var(--vt-theme);
    box-shadow: 0 0 0 2px rgba(var(--vt-theme-rgb), 0.25);
}

.demo-floating-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.demo-floating-toolbar {
    color: rgba(255, 255, 255, 0.85);
}

.demo-floating-toolbar .ico,
.demo-floating-toolbar svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
}

.demo-magic-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(var(--vt-theme-rgb), 0.2);
    border: 1px solid rgba(var(--vt-theme-rgb), 0.4);
    border-radius: 6px;
    color: var(--vt-theme);
    cursor: default;
    transition: transform 0.2s, box-shadow 0.2s;
}

.demo-magic-btn.pulse {
    animation: demo-magic-pulse 0.6s ease;
}

@keyframes demo-magic-pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--vt-theme-rgb), 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(var(--vt-theme-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--vt-theme-rgb), 0); }
}

.demo-selected-text {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.demo-selected-text.rewriting {
    animation: demo-rewrite 0.5s ease;
}

@keyframes demo-rewrite {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.demo-selected-block.magic-glow,
.demo-dropped-block.magic-glow {
    box-shadow: 0 0 20px rgba(var(--vt-theme-rgb), 0.3);
}

.demo-canvas-btns {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.demo-canvas-btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 8px;
    border: none;
    cursor: default;
}

.demo-canvas-btn.primary {
    background: var(--vt-theme);
    color: white;
}

.demo-canvas-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.demo-insert-zone {
    min-height: 60px;
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.demo-insert-zone.drop-target {
    border-color: var(--vt-theme);
    background: rgba(var(--vt-theme-rgb), 0.08);
}

.demo-insert-zone:not(:empty) {
    padding: 12px;
}

.demo-col-block,
.demo-grid-block {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    transition: opacity 0.3s, transform 0.3s;
}

.demo-col-block.removing,
.demo-grid-block.removing,
.demo-dropped-block.removing {
    opacity: 0;
    transform: scale(0.98);
}

.demo-col-inner,
.demo-grid-inner {
    min-height: 40px;
}

.demo-col-inner.drop-target {
    border: 2px dashed var(--vt-theme);
    border-radius: 8px;
    background: rgba(var(--vt-theme-rgb), 0.06);
}

.demo-grid-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.demo-grid-cell {
    min-height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
}

.demo-grid-cell.drop-target {
    border-color: var(--vt-theme);
    background: rgba(var(--vt-theme-rgb), 0.06);
}

.demo-dropped-block {
    position: relative;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.demo-grid-col-block {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
}

.demo-grid-col-inner {
    min-height: 36px;
}

.demo-grid-col-inner.drop-target {
    border: 2px dashed var(--vt-theme);
    border-radius: 6px;
    background: rgba(var(--vt-theme-rgb), 0.06);
}

.demo-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.3);
}

.demo-img-placeholder svg {
    width: 32px;
    height: 32px;
    color: rgba(255, 255, 255, 0.35);
    stroke: currentColor;
    fill: none;
}

.demo-component-item.dragging {
    opacity: 0.5;
}

.demo-panel {
    background: #1e1e21;
    padding: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    overflow-y: auto;
}

.demo-panel-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.demo-panel-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.demo-panel-tab {
    padding: 6px 12px;
    font-size: 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    cursor: default;
}

.demo-panel-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.demo-props-section {
    margin-bottom: 20px;
}

.demo-props-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-prop-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.demo-prop-label {
    color: rgba(255, 255, 255, 0.6);
}

.demo-prop-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.demo-prop-swatch--black {
    background: #000;
}
.demo-prop-swatch--white {
    background: rgba(255, 255, 255, 0.7);
}

.demo-prop-value {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.demo-panel-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.demo-panel-actions button {
    padding: 8px 14px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    cursor: default;
}

.demo-ghost {
    position: fixed;
    padding: 8px 14px;
    font-size: 13px;
    background: rgba(var(--vt-theme-rgb), 0.9);
    color: white;
    border-radius: 8px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: left 0.4s ease, top 0.4s ease, opacity 0.2s;
}

.demo-ghost.visible {
    opacity: 1;
}

.demo-ghost.animate {
    transition: left 0.4s ease, top 0.4s ease;
}

.demo-ai-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.demo-ai-modal.active {
    opacity: 1;
    visibility: visible;
}

.demo-ai-modal-box {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: #252528;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.demo-ai-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.demo-ai-modal-title svg {
    flex-shrink: 0;
    color: var(--vt-theme);
}

.demo-ai-modal-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

.demo-ai-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.demo-ai-preset {
    padding: 10px 14px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: default;
    transition: border-color 0.2s, background 0.2s;
}

.demo-ai-preset:hover,
.demo-ai-preset.selected {
    border-color: var(--vt-theme);
    background: rgba(var(--vt-theme-rgb), 0.15);
}

.demo-ai-input {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    margin-bottom: 16px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: white;
    resize: vertical;
}

.demo-ai-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.demo-ai-cancel {
    padding: 10px 18px;
    font-size: 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    cursor: default;
}

.demo-ai-apply {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    background: var(--vt-theme);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: default;
}

@media (max-width: 900px) {
    .demo-content {
        grid-template-columns: 1fr;
    }
    .demo-sidebar,
    .demo-panel {
        display: none;
    }
}

/* CTA, карточки — в base.css (.cta-section, .download-grid, .instruction-card и т.д.) */
