/* Fresh HTML Editor Container Styles - No Quill Overrides */

/* Editor container */
.html-editor-container {
    margin-bottom: 1rem;
}

/* Mode controls */
.html-editor-controls {
    margin-bottom: 0.5rem;
}

.html-editor-controls .btn-group {
    display: flex;
    gap: 0;
}

.html-editor-controls .btn {
    border-radius: 0;
    border: 1px solid #dee2e6;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.html-editor-controls .btn:first-child {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.html-editor-controls .btn:last-child {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.html-editor-controls .btn + .btn {
    border-left: none;
}

.html-editor-controls .btn-primary {
/*    background-color: #0d6efd;*/
    color: white;
    border-color: #0d6efd;
}

    .html-editor-controls .btn-secondary {
        background-color: #f4f4f4;
        color: #6c757d;
        border-color: #dee2e6;
    }

        .html-editor-controls .btn-secondary:hover {
            background-color: #002244;
        }

/* Quill editor container - minimal styling */
.quill-editor {
    min-height: 300px;
}

/* Style images in Quill editor - native Quill structure */
.quill-editor .ql-editor img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: baseline;
}

/* Style videos (iframes) in Quill editor - native Quill structure */
.quill-editor .ql-editor iframe {
    display: block;
    max-width: 100%;
}

/* Quill video default size */
.quill-editor .ql-video {
    width: 560px;
    height: 315px;
    max-width: 100%;
}

/* Local video files in editor - show as video player */
.quill-editor .ql-editor iframe.local-video {
    width: 560px;
    height: 315px;
    max-width: 100%;
    background-color: #000;
    border: 1px solid #ccc;
}

/* Preview mode - respect Quill alignment classes */
.html-editor-preview {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 15px;
    min-height: 300px;
}

.html-editor-preview img,
.html-editor-preview iframe {
    max-width: 100%;
    height: auto;
}

.html-editor-preview .ql-align-center {
    text-align: center;
}

.html-editor-preview .ql-align-right {
    text-align: right;
}

.html-editor-preview .ql-align-justify {
    text-align: justify;
}

/* HTML textarea mode */
.html-editor-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.875rem;
    resize: vertical;
}

.html-editor-footer {
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .html-editor-controls .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .quill-editor .ql-editor img,
    .quill-editor .ql-editor iframe,
    .quill-editor .ql-video {
        max-width: 100% !important;
        width: 100% !important;
    }
}
