/* =========================================
   TIPOGRAFIAS DEL LIBRO
   -----------------------------------------
   Los .ttf ya estaban en wwwroot/fonts pero NADIE los declaraba, asi que el navegador nunca los
   descargaba: las clases .font-montserrat, .font-calibri, etc. solo funcionaban si el cliente tenia
   esa fuente instalada en su equipo. Cuando no la tenia, el editor mostraba una fuente de reserva
   mientras que el PDF si usaba la de verdad, o sea que la vista previa no correspondia con lo impreso.
   Se declaran aqui, apuntando a LOS MISMOS archivos que usa el generador del PDF.

   Cormorant Garamond y Great Vibes se usan SOLO en los titulos de capitulo; no entran en el selector
   de fuente del libro, que sigue siendo Roboto / Times / Lato / Calibri.
   ========================================= */
@font-face { font-family: 'Roboto';           src: url('/fonts/Roboto.ttf') format('truetype');            font-display: swap; }
@font-face { font-family: 'Lato';             src: url('/fonts/Lato-Regular.ttf') format('truetype');      font-display: swap; }
@font-face { font-family: 'Montserrat';       src: url('/fonts/Montserrat.ttf') format('truetype');        font-display: swap; }
@font-face { font-family: 'Calibri';          src: url('/fonts/calibri-regular.ttf') format('truetype');   font-display: swap; }
@font-face { font-family: 'Times New Roman';  src: url('/fonts/times.ttf') format('truetype');             font-display: swap; }
@font-face { font-family: 'Helvetica';        src: url('/fonts/Helvetica.ttf') format('truetype');         font-display: swap; }

@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-Regular.ttf') format('truetype');  font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Great Vibes';        src: url('/fonts/GreatVibes-Regular.ttf') format('truetype');         font-weight: 400; font-display: swap; }

/* =========================================
   TIPOGRAFIAS DE LAS PLANTILLAS DE PORTADA
   -----------------------------------------
   Solo las usan las plantillas del editor de portada (ver wwwroot/plantillas). El navegador no las
   descarga hasta que una portada las pinta, y el lienzo espera a tenerlas antes de dibujar (ver
   coverCanvas._cargarFuentes): si dibujara antes, el PNG de imprenta saldria con la de reserva.
   Las "-VF" son fuentes variables: un solo archivo con todos los gruesos, por eso llevan rango.
   Montserrat va con otro nombre para no cambiar como se ve el resto de la web, que la usa a 400.
   ========================================= */
@font-face { font-family: 'Josefin Sans';     src: url('/fonts/JosefinSans-VF.ttf') format('truetype');      font-weight: 100 700; font-display: swap; }
@font-face { font-family: 'Patrick Hand';     src: url('/fonts/PatrickHand-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Dancing Script';   src: url('/fonts/DancingScript-VF.ttf') format('truetype');    font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Amatic SC';        src: url('/fonts/AmaticSC-Bold.ttf') format('truetype');       font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('/fonts/PlayfairDisplay-VF.ttf') format('truetype');  font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Oswald';           src: url('/fonts/Oswald-VF.ttf') format('truetype');           font-weight: 200 700; font-display: swap; }
@font-face { font-family: 'Pinyon Script';    src: url('/fonts/PinyonScript-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo Black';    src: url('/fonts/ArchivoBlack-Regular.ttf') format('truetype'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'League Spartan';   src: url('/fonts/LeagueSpartan-VF.ttf') format('truetype');    font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Lilita One';       src: url('/fonts/LilitaOne-Regular.ttf') format('truetype');   font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Montserrat VF';    src: url('/fonts/Montserrat.ttf') format('truetype');          font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Fredoka';          src: url('/fonts/Fredoka-VF.ttf') format('truetype');          font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Forum';            src: url('/fonts/Forum-Regular.ttf') format('truetype');       font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter';            src: url('/fonts/Inter-VF.ttf') format('truetype');            font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Caveat Brush';     src: url('/fonts/CaveatBrush-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Open Sans';        src: url('/fonts/OpenSans-VF.ttf') format('truetype');         font-weight: 300 800; font-display: swap; }
@font-face { font-family: 'Cormorant Garamond'; src: url('/fonts/CormorantGaramond-Italic-VF.ttf') format('truetype'); font-weight: 300 700; font-style: italic; font-display: swap; }

/* =========================================
   PANTALLA DE RECONEXI�N (Centrado Perfecto)
   ========================================= */

/* 1. El fondo que tapa toda la pantalla */
.reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Ocupa el 100% de la altura visible */
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 10000;
    /* Centra la caja de contenido en medio de la pantalla */
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* 2. ACTIVACI�N AUTOM�TICA */
.components-reconnect-show,
.components-reconnect-failed,
.components-reconnect-rejected {
    display: flex !important;
    opacity: 1;
}

/* 3. EL CONTENEDOR INTERNO (Aqu� estaba el fallo antes) */
.reconnect-content {
    /* Esto obliga al spinner y al texto a alinearse al centro horizontalmente */
    display: flex;
    flex-direction: column;
    align-items: center; /* <--- ESTA ES LA CLAVE DEL CENTRADO */
    justify-content: center;
    width: 100%; /* Asegura que tenga espacio para centrar */
}

/* 4. EL SPINNER */
.spinner {
    width: 50px;
    height: 50px;
    margin-bottom: 20px; /* Separaci�n con el texto */
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff; /* Azul */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 5. EL TEXTO */
.reconnect-modal p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
    text-align: center; /* Asegura que si el texto es largo, se centre */
}



/* Styles g�n�raux */
/*html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}*/

/* Styles sp�cifiques au composant livre */
/*.editor-container {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f5f5f5;
}

.input-section {
    width: 300px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.file-input {
    margin-bottom: 15px;
}

.sender-select, .color-section {
    margin-bottom: 20px;
}

    .sender-select label, .color-section label {
        display: block;
        margin-bottom: 5px;
        font-weight: bold;
    }

    .sender-select select {
        width: 100%;
        padding: 8px;
        border-radius: 5px;
        border: 1px solid #ccc;
    }

    .color-section div {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
    }

.book-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
}

.book-container {
    position: relative;
    width: 800px;
    perspective: 1000px;
}

.book-open {
    display: flex;
    background: #8b5a2b;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-radius: 5px;
    padding: 10px;
}

.book-page {
    width: 380px;
    min-height: 550px;
    background: #fffef0;
    border: 1px solid #d4d4d4;
    padding: 20px;
    position: relative;
}

.left-page {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    box-shadow: -5px 5px 10px rgba(0,0,0,0.2);
}

.right-page {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
}

.page-header {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 10px;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
}

.message-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    margin: 10px 0;
}

    .message-container.sent {
        align-items: flex-end;
    }

    .message-container.received {
        align-items: flex-start;
    }

.message-image {
    max-width: 200px;
    height: auto;
    margin: 5px 0;
    border-radius: 8px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    margin: 5px 0;
}

    .message-bubble .timestamp {
        font-size: 10px;
        color: #666;
        display: block;
        margin-bottom: 5px;
    }

    .message-bubble p {
        margin: 0;
    }

.sender-name {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.navigation-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

    .navigation-buttons button {
        padding: 10px 20px;
        background: #0078ff;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background 0.3s;
    }

        .navigation-buttons button:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .navigation-buttons button:hover:not(:disabled) {
            background: #0056b3;
        }

.message-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.message-edit {
    width: 100%;
}

.edit-buttons {
    margin-top: 5px;
    display: flex;
    gap: 5px;
}

.delete-btn, .edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}*/

/* Banderas de los menús de idioma (imagen y no emoji: Windows no dibuja los emojis de bandera). */
.bandera-idioma { width: 18px; height: 18px; margin-right: 8px; vertical-align: -3px; }
