/* Editor Profesional de Blog - Dual Service Electronic */
.wysiwyg-wrapper {
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wysiwyg-wrapper:focus-within {
    border-color: #185adb;
    box-shadow: 0 0 0 4px rgba(24, 90, 219, 0.12);
}

/* Modos del editor: Pantalla Completa */
.wysiwyg-wrapper.fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
}

.wysiwyg-wrapper.fullscreen .wysiwyg-content,
.wysiwyg-wrapper.fullscreen .wysiwyg-code-editor {
    flex-grow: 1 !important;
    max-height: none !important;
    height: calc(100vh - 90px) !important;
}

/* Toolbar superior */
.wysiwyg-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    user-select: none;
}

.wysiwyg-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.wysiwyg-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    padding: 5px 9px;
    color: #334155;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 32px;
    height: 32px;
}

.wysiwyg-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.wysiwyg-btn.active {
    background: #e2e8f0;
    color: #185adb;
    border-color: #185adb;
    font-weight: bold;
}

.wysiwyg-divider {
    width: 1px;
    height: 24px;
    background: #cbd5e1;
    margin: 0 4px;
}

/* Área editable de contenido */
.wysiwyg-content {
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
    padding: 18px 22px;
    outline: none;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: #1e293b;
    background: #ffffff;
}

.wysiwyg-content p {
    margin-bottom: 1rem;
}

.wysiwyg-content h1 { font-size: 2rem; font-weight: 800; color: #0f172a; margin-top: 1.5rem; margin-bottom: 0.8rem; }
.wysiwyg-content h2 { font-size: 1.6rem; font-weight: 700; color: #1e293b; margin-top: 1.3rem; margin-bottom: 0.7rem; }
.wysiwyg-content h3 { font-size: 1.3rem; font-weight: 700; color: #334155; margin-top: 1.1rem; margin-bottom: 0.6rem; }
.wysiwyg-content h4 { font-size: 1.1rem; font-weight: 600; color: #475569; margin-top: 1rem; margin-bottom: 0.5rem; }

/* Cajas Destacadas (Callouts) para Blog Técnico */
.wysiwyg-content .callout-box {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.2rem 0;
    border-left: 5px solid #3b82f6;
    background: #eff6ff;
    color: #1e3a8a;
}
.wysiwyg-content .callout-box.callout-info { border-left-color: #3b82f6; background: #eff6ff; color: #1e3a8a; }
.wysiwyg-content .callout-box.callout-success { border-left-color: #22c55e; background: #f0fdf4; color: #14532d; }
.wysiwyg-content .callout-box.callout-warning { border-left-color: #f59e0b; background: #fffbeb; color: #78350f; }
.wysiwyg-content .callout-box.callout-danger { border-left-color: #ef4444; background: #fef2f2; color: #7f1d1d; }

/* Bloques de Código Técnico */
.wysiwyg-content pre {
    background: #0f172a;
    color: #f8fafc;
    padding: 1.2rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 14px;
    margin: 1.2rem 0;
    border: 1px solid #1e293b;
}

.wysiwyg-content code {
    background: #f1f5f9;
    color: #0f172a;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.wysiwyg-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Tablas */
.wysiwyg-content table {
    width: 100%;
    margin: 1.2rem 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
}

.wysiwyg-content table th, 
.wysiwyg-content table td {
    border: 1px solid #cbd5e1;
    padding: 10px 14px;
}

.wysiwyg-content table th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.wysiwyg-content blockquote {
    border-left: 4px solid #185adb;
    padding-left: 1rem;
    margin: 1.2rem 0;
    font-style: italic;
    color: #475569;
}

.wysiwyg-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Editor de Código Fuente HTML */
.wysiwyg-code-editor {
    min-height: 300px;
    max-height: 600px;
    width: 100%;
    padding: 16px;
    background: #0f172a;
    color: #38bdf8;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    border: none;
    outline: none;
    resize: vertical;
}

/* Footer de Estado */
.wysiwyg-statusbar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding: 6px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}
