/* ==========================================================================
   Visor de CV — RT 2026-08-12
   ==========================================================================

   Hoja propia y no un bloque en dashboard_style.css porque el visor también se
   abre desde el perfil del talento, y esa página nunca carga la hoja del
   dashboard.

   El PDF es el contenido; todo lo demás es una barra de 48 px que dice de quién
   es el CV y de cuándo, en letra pequeña, y tres botones.
   ========================================================================== */

.cv-viewer__dialog {
    max-width: min(1400px, 96vw);
    height: 96vh;
    margin: 2vh auto;
}

.cv-viewer__content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: #fff;
}

/* --- Barra superior ------------------------------------------------------ */

.cv-viewer__bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    height: 48px;
    padding: 0 0.75rem;
    border-bottom: 1px solid #ececf5;
    background: #fff;
}

.cv-viewer__avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f1f6;
}

.cv-viewer__id {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    line-height: 1.2;
}

.cv-viewer__name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-viewer__meta {
    font-size: 0.72rem;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-viewer__actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.cv-viewer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}
.cv-viewer__btn:hover,
.cv-viewer__btn:focus-visible {
    background: #F3EEFF;
    color: #6d28d9;
}

/* El icono que se enseña depende de si estamos ya en pantalla completa. */
.cv-viewer__ic-exit { display: none; }
.cv-viewer.is-fullscreen .cv-viewer__ic-enter { display: none; }
.cv-viewer.is-fullscreen .cv-viewer__ic-exit  { display: inline; }

/* --- El documento -------------------------------------------------------- */

.cv-viewer__stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #f4f4f7;
}

.cv-viewer__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.cv-viewer__error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* --- Pantalla completa --------------------------------------------------- */

/* El fullscreen se pide sobre `.modal-content`, no sobre el iframe, para que la
   barra —y con ella el botón de salir— siga estando. */
.cv-viewer__content:fullscreen {
    border-radius: 0;
    background: #fff;
}

/* Respaldo para navegadores sin Fullscreen API sobre elementos (iOS Safari). */
.cv-viewer.is-maximized .cv-viewer__dialog {
    position: fixed;
    inset: 0;
    max-width: none;
    width: 100vw;
    height: 100vh;
    margin: 0;
}
.cv-viewer.is-maximized .cv-viewer__content { border-radius: 0; }

/* --- Móvil --------------------------------------------------------------- */

@media (max-width: 767px) {
    .cv-viewer__dialog {
        max-width: 100vw;
        width: 100vw;
        height: 100dvh;
        margin: 0;
    }
    .cv-viewer__content { border-radius: 0; }
}
