/* ============================================
   ESTILOS PARA EDITOR QUILL EN ADMIN
   ============================================ */

/* Contenedor del editor Quill */
#quillEditorContainer {
    margin-bottom: 16px;
}

/* Editor Quill */
#productDescriptionEditor {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
}

#productDescriptionEditor:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Toolbar de Quill */
.ql-toolbar {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 8px 8px 0 0;
    padding: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.ql-toolbar.ql-snow {
    padding: 12px;
    background: #f9fafb;
    border-color: #e5e7eb;
}

.ql-toolbar.ql-snow .ql-stroke {
    stroke: #6b7280;
}

.ql-toolbar.ql-snow .ql-fill {
    fill: #6b7280;
}

.ql-toolbar.ql-snow .ql-picker-label {
    color: #6b7280;
}

/* Botones de la toolbar */
.ql-toolbar button,
.ql-toolbar button:hover,
.ql-toolbar button.ql-active,
.ql-toolbar select,
.ql-toolbar select:hover,
.ql-toolbar select.ql-active {
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ql-toolbar button:hover {
    background: #f3f4f6;
    border-color: #3b82f6;
    color: #3b82f6;
}

.ql-toolbar button.ql-active {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Separadores en la toolbar */
.ql-toolbar.ql-snow::after {
    display: none;
}

.ql-toolbar.ql-snow .ql-formats {
    display: flex;
    gap: 4px;
}

/* Selectores */
.ql-toolbar.ql-snow .ql-picker {
    font-size: 14px;
    padding: 4px 8px;
}

.ql-toolbar.ql-snow select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
    font-size: 13px;
}

.ql-toolbar.ql-snow select:hover {
    border-color: #3b82f6;
}

/* Contenedor del editor */
.ql-container {
    border: none;
    font-family: inherit;
    font-size: 15px;
}

.ql-container.ql-snow {
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
}

/* Editor editable */
.ql-editor {
    padding: 16px;
    min-height: 250px;
    max-height: 500px;
    line-height: 1.6;
}

.ql-editor p {
    margin: 12px 0;
}

.ql-editor ol,
.ql-editor ul {
    padding-left: 2em;
    margin: 12px 0;
}

.ql-editor li {
    margin-bottom: 6px;
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
    margin: 16px 0 12px 0;
    font-weight: 700;
}

.ql-editor h1 { font-size: 2rem; }
.ql-editor h2 { font-size: 1.75rem; }
.ql-editor h3 { font-size: 1.5rem; }
.ql-editor h4 { font-size: 1.25rem; }
.ql-editor h5 { font-size: 1.1rem; }
.ql-editor h6 { font-size: 1rem; }

.ql-editor strong {
    font-weight: 700;
}

.ql-editor em {
    font-style: italic;
}

.ql-editor u {
    text-decoration: underline;
}

.ql-editor s {
    text-decoration: line-through;
}

.ql-editor a {
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
}

.ql-editor a:hover {
    color: #2563eb;
}

/* Placeholder */
.ql-editor.ql-blank::before {
    color: #9ca3af;
    font-style: italic;
    font-size: 15px;
}

/* ============================================
   ESTILOS PARA VISUALIZACIÓN DE DESCRIPCIÓN
   ============================================ */

.product-description-display {
    line-height: 1.8;
    color: #1f2937;
    font-size: 15px;
    white-space: normal;
    word-wrap: break-word;
    display: block;
}

.product-description-display p {
    margin: 16px 0 !important;
    line-height: 1.6;
    white-space: normal;
}

.product-description-display ol,
.product-description-display ul {
    margin: 16px 0 16px 24px !important;
    padding-left: 1.5em;
}

.product-description-display li {
    margin-bottom: 8px;
}

.product-description-display strong,
.product-description-display b {
    font-weight: 700;
    color: #111827;
}

.product-description-display em,
.product-description-display i {
    font-style: italic;
}

.product-description-display u {
    text-decoration: underline;
}

.product-description-display s {
    text-decoration: line-through;
    color: #6b7280;
}

.product-description-display h1,
.product-description-display h2,
.product-description-display h3,
.product-description-display h4,
.product-description-display h5,
.product-description-display h6 {
    margin: 20px 0 12px 0;
    font-weight: 700;
    color: #111827;
}

.product-description-display h1 { font-size: 1.875rem; }
.product-description-display h2 { font-size: 1.5rem; }
.product-description-display h3 { font-size: 1.25rem; }
.product-description-display h4 { font-size: 1.1rem; }
.product-description-display h5 { font-size: 1rem; }
.product-description-display h6 { font-size: 0.875rem; }

.product-description-display a {
    color: #3b82f6;
    text-decoration: underline;
}

.product-description-display a:hover {
    color: #2563eb;
    text-decoration-thickness: 2px;
}

/* Colores personalizados en el contenido */
.product-description-display [style*="color"] {
    font-weight: 500;
}

/* Bloques de código si existen */
.product-description-display code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Responsivo para móviles */
@media (max-width: 768px) {
    .ql-toolbar {
        padding: 8px;
        gap: 4px;
    }

    .ql-toolbar button,
    .ql-toolbar select {
        padding: 4px 8px;
        font-size: 12px;
    }

    #productDescriptionEditor {
        min-height: 150px;
        max-height: 300px;
    }

    .ql-editor {
        padding: 12px;
        font-size: 14px;
    }

    .product-description-display {
        font-size: 14px;
    }

    .product-description-display h1 { font-size: 1.5rem; }
    .product-description-display h2 { font-size: 1.25rem; }
    .product-description-display h3 { font-size: 1.1rem; }
    .product-description-display h4 { font-size: 1rem; }
}
