.editor-grid {
    display: flex;
    font-family: var(--font-family-base);
    height: calc(100vh - 100px);
    overflow: hidden;
}

.editor-panel {
    flex-direction: column;
    overflow: hidden;
    /* elimină paddingul care împinge conținutul: */
    padding: 0;
}

.preview-wrapper {
    overflow: auto;
}

.preview-wrapper,
.chat-output-area {
    flex: 1;
    overflow: auto;
}

.column.preview {
    background-color: #f1f8e9;
}

.column.preview iframe {
    background-color: white;
    border: none;
    display: block;
}

.column.chat {
    background-color: #f3e5f5;
    flex-direction: column;
    overflow: hidden;
}

.chat-output-area {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    overflow-y: auto;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    flex: 1;
}

.chat-controls {
    align-items: center;
    gap: 8px;
}

.chat-controls button {
    border-radius: 8px;
    font-size: 13px;
    padding: 8px 14px;
}

.chat-controls button:hover {
    background-color: #254eda;
}

textarea,
input[type="text"] {
    padding: 10px;
    resize: vertical;
}

.image-response {
    margin-top: 8px;
    max-width: 200px;
}

.image-response img {
    display: block;
    object-fit: contain;
}

.bubble {
    max-width: 90%;
    padding: 5px 10px;
    margin: 3px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.3;
    word-break: break-word;
    white-space: pre-wrap;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    display: inline-block;
}

.bubble p {
    margin: 0;
}

.bubble.user {
    background-color: #d9ecff;
    color: #000;
    align-self: flex-end;
    margin-left: auto;
    text-align: left;
}

.bubble.bot {
    background-color: #f8f8fc;
    color: #111;
    align-self: flex-start;
    margin-right: auto;
    text-align: left;
}

.bubble strong {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
    line-height: 1;
}

.bubble img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    margin-top: 6px;
}


button,
.copy-btn {
    font-size: 11px;
    line-height: 1.2;
    padding: 6px 10px;
}

.copy-btn,
.fullscreen-btn {
    border-radius: 8px;
}

pre {
    background: #f9f9f9;
    margin-top: 10px;
    overflow-x: auto;
    padding: 12px;
    position: relative;
}

pre code {
    white-space: pre-wrap;
}

.fullscreen-btn {
    background: #333;
    right: 10px;
    top: 10px;
    z-index: 10;
}


@media (max-width: 1024px) {
    .main-content {
        position: static;
        min-height: 100vh;
        padding: 20px;
    }

    .column.preview iframe,
    .column.html textarea {
        max-height: 470px;
        min-height: 320px;
    }

    .chat-output-area img {
        height: auto !important;
        margin: 10px 0;
        max-width: 200px !important;
        object-fit: contain;
    }

    .chat-output-area .image-response {
        max-width: 100%;
        padding: 8px 12px;
    }
}