/* ============================================================================
   Ayuda de fichas (HelpTutor) - contenido del documento y diálogos del editor.
   Los estilos del panel (marco, cabecera, barra de herramientas) estan en
   Componentes\Ayuda\AyudaTutorPanel.razor.css. Este fichero es global porque el
   HTML guardado se inyecta en tiempo de ejecucion y no lleva el atributo de ambito.
   ============================================================================ */

.ayuda-tutor-editor-surface {
    min-height: calc(100vh - 44px);
    max-width: 1380px;
    margin: 0 auto;
    padding: 36px 44px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
    color: #0f172a;
    font-size: 15px;
    line-height: 1.55;
    outline: none;
}

.ayuda-tutor-editor-surface:focus {
    border-color: #2563eb;
}

.ayuda-tutor-editor-surface.readonly {
    border-color: #e2e8f0;
}

.ayuda-tutor-editor-surface h1 {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 28px;
}

.ayuda-tutor-editor-surface h2 {
    margin-top: 26px;
    color: #0f766e;
    font-size: 21px;
}

.ayuda-tutor-editor-surface h3 {
    margin-top: 20px;
    color: #334155;
    font-size: 17px;
}

.ayuda-tutor-editor-surface p,
.ayuda-tutor-editor-surface li {
    font-size: 15px;
    line-height: 1.55;
}

.ayuda-tutor-editor-surface a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.ayuda-tutor-editor-surface a:hover {
    text-decoration: underline;
}

.ayuda-tutor-editor-surface .ayuda-nota {
    margin-top: 22px;
    padding: 12px 14px;
    border-left: 4px solid #2f6eb5;
    background: #eef5fc;
    color: #172b45;
}

.ayuda-tutor-editor-surface .ayuda-tabla {
    width: 100%;
    margin: 10px 0 4px;
    border-collapse: collapse;
    font-size: 14px;
}

.ayuda-tutor-editor-surface .ayuda-tabla th,
.ayuda-tutor-editor-surface .ayuda-tabla td {
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: top;
}

.ayuda-tutor-editor-surface .ayuda-tabla th {
    background: #eef2f7;
    font-weight: 800;
}

.ayuda-tutor-editor-surface img {
    max-width: 100%;
    height: auto;
}

.ayuda-tutor-editor-surface .ayuda-image-resize-box {
    position: relative;
    display: inline-block;
    min-width: 80px;
    min-height: 60px;
    max-width: 100%;
    overflow: hidden;
    resize: both;
    vertical-align: middle;
    border: 1px dashed transparent;
    background: #f8fafc;
}

.ayuda-tutor-editor-surface .ayuda-image-resize-box:hover,
.ayuda-tutor-editor-surface .ayuda-image-resize-box.is-resizing {
    border-color: #60a5fa;
}

.ayuda-tutor-editor-surface .ayuda-image-resize-box::after {
    content: "";
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-right: 3px solid #2563eb;
    border-bottom: 3px solid #2563eb;
    opacity: 0;
    pointer-events: none;
}

.ayuda-tutor-editor-surface .ayuda-image-resize-box:hover::after,
.ayuda-tutor-editor-surface .ayuda-image-resize-box.is-resizing::after {
    opacity: 1;
}

.ayuda-tutor-editor-surface .ayuda-image-resize-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.ayuda-tutor-muted {
    margin-bottom: 22px;
    color: #64748b;
    font-size: 13px;
}

.ayuda-tutor-video {
    margin-top: 28px;
}

.ayuda-tutor-video iframe,
.ayuda-tutor-video video {
    width: 100%;
    max-width: 760px;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

/*------------------------------ diálogos del editor ------------------------------*/

.ayuda-js-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 28, 39, .42);
}

.ayuda-js-dialog {
    width: min(92vw, 560px);
    padding: 1rem;
    border: 1px solid #c8d6e1;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.ayuda-js-dialog h2 {
    margin: 0 0 .85rem;
    color: #082949;
    font-size: 1.15rem;
    font-weight: 900;
}

.ayuda-js-dialog-fields {
    display: grid;
    gap: .75rem;
}

.ayuda-js-dialog-fields label {
    display: grid;
    gap: .3rem;
    margin: 0;
    color: #17324d;
    font-size: .86rem;
    font-weight: 900;
}

.ayuda-js-dialog-fields input,
.ayuda-js-dialog-fields textarea {
    width: 100%;
    padding: .45rem .55rem;
    border: 1px solid #b8c8d6;
    border-radius: 4px;
    font: inherit;
    font-weight: 400;
}

.ayuda-js-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: 1rem;
}

/*------------------------------ estructura del panel ------------------------------*/
.ayuda-tutor-backdrop {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(15, 28, 39, 0.42);
}

.ayuda-tutor-window {
    position: fixed;
    inset: 0;
    z-index: 5001;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #f1f5f9;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.ayuda-tutor-window button {
    font-weight: 400 !important;
}

.ayuda-tutor-head {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid #cbd5e1;
    background: #f5f8fc;
}

.ayuda-tutor-head.edit {
    align-items: start;
}

.ayuda-tutor-head label {
    display: grid;
    gap: .25rem;
    margin: 0;
    color: #17324d;
    font-size: .86rem;
    font-weight: 900;
}

.ayuda-tutor-head.edit label:nth-of-type(1) {
    width: min(410px, 28vw);
}

.ayuda-tutor-head.edit label:nth-of-type(2) {
    width: min(560px, 38vw);
}

.ayuda-tutor-title-block {
    display: grid;
    min-width: 220px;
    gap: .2rem;
}

.ayuda-tutor-title-block h2 {
    margin: 0;
    color: #082949;
    font-size: 1.5rem;
    font-weight: 900;
}

.ayuda-tutor-title-block span {
    color: #475569;
    font-size: .9rem;
}

.ayuda-tutor-cerrar {
    margin-left: auto;
    min-height: 2.2rem;
    padding: 0 1rem;
    border: 1px solid #e21e2b;
    border-radius: 4px;
    background: #fff;
    color: #e21e2b;
    font-weight: 400;
}

.ayuda-tutor-tools {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid #cbd5e1;
    background: #f5f5f5;
}

.ayuda-tutor-tools button,
.ayuda-tutor-select {
    min-height: 30px;
    padding: 2px 8px;
    border: 1px solid #9fb3c3;
    border-radius: 4px;
    background: #ffffff;
    color: #17324d;
    font: inherit;
    font-weight: 400;
}

.ayuda-tutor-size {
    min-width: 76px;
}

.ayuda-tutor-color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px !important;
}

.ayuda-tutor-aviso {
    flex: 0 0 auto;
    margin: .75rem 1rem 0;
    padding: .65rem .75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    color: #17324d;
    font-weight: 800;
}

.ayuda-tutor-aviso.success {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.ayuda-tutor-aviso.error {
    border-color: #fecaca;
    background: #fee2e2;
    color: #991b1b;
}

.ayuda-tutor-aviso.warning {
    border-color: #facc15;
    background: #fef9c3;
    color: #713f12;
}

.ayuda-tutor-cargando {
    flex: 0 0 auto;
    margin: .75rem 1rem 0;
    color: #475569;
    font-weight: 700;
}

.ayuda-tutor-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    background: #e2e8f0;
}

.ayuda-tutor-document {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: auto;
    padding: 22px 32px;
}