﻿#game-container {
    width: 100%;
    height: calc(80vh - 1vh);
    overflow: hidden; /* Ocultamos las barras de scroll */
    position: relative;
    cursor: grab; /* Cursor de agarre */
}

#game-board {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
}

.token {
    width: 40px;
    height: 40px;
    background-color: red;
    border-radius: 50%;
    position: absolute;
    cursor: grab;
}

.context-menu-container {
    position: relative;
    display: inline-block; /* Para que el botón y el menú estén en línea y el menú se posicione respecto a él */
    margin-left: 10px; /* Opcional: para separar los botones si hay varios en la misma línea */
}

.context-menu {
    position: absolute;
    top: 100%; /* Posiciona el menú justo debajo del botón */
    left: 0;
    background-color: #2c2f33; /* Color de fondo oscuro, coincide con el original */
    border: 1px solid #555; /* Borde, coincide con el original */
    border-radius: 8px; /* Bordes redondeados, coincide con el original */
    padding: 5px; /* Relleno, coincide con el original */
    z-index: 1000; /* Siempre encima */
    min-width: 180px; /* Ancho mínimo */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Sombra sutil para un aspecto moderno */
    /* Propiedades de animación */
    opacity: 0; /* Inicialmente oculto y transparente */
    transform: translateY(10px); /* Ligeramente desplazado para la animación de entrada */
    transition: opacity 0.2s ease-out, transform 0.2s ease-out; /* Transición suave */
    pointer-events: none; /* Permite clics a través si no es visible (importante para la animación de salida) */
}

    .context-menu.show {
        opacity: 1; /* Visible */
        transform: translateY(0); /* Posición final */
        pointer-events: all; /* Permite interacciones cuando es visible */
    }

    /* Estilos para los ítems dentro del menú */
    .context-menu .menu-item {
        padding: 8px 12px;
        cursor: pointer;
        color: white; /* Texto blanco para contraste con fondo oscuro */
        font-size: 0.95em;
        display: flex; /* Para alinear el icono y el texto */
        align-items: center;
        gap: 8px; /* Espacio entre el icono y el texto */
        border-radius: 5px; /* Bordes redondeados para cada ítem */
    }

        .context-menu .menu-item:hover {
            background-color: #444a50; /* Un gris ligeramente más claro al pasar el ratón */
        }

/* Animación para el icono de la flecha en los botones (opcional, pero mejora el feedback) */
.rz-button-icon-right {
    margin-left: 8px; /* Espacio entre el texto del botón y la flecha */
    transition: transform 0.2s ease-out; /* Animación de rotación */
}

.rz-button-icon-rotated {
    transform: rotate(180deg); /* Rota la flecha cuando el menú está abierto */
}

/*----------------------------MENU LATERAL DE OPCIONES------------------------------*/
.main-layout {
    display: flex;
    flex-direction: row;
    height: 93vh;
    overflow: hidden;
    position: relative;
}

/* El área donde está el tablero */
.game-area {
    flex: 1;
    transition: margin-right 0.3s ease;
}

/* Cuando el sidebar está abierto, dejamos espacio al tablero.
   OJO: acotado a .game-area porque la clase suelta .sidebar-open
   la usa NavMenu en el RadzenSidebar y el margin-right:250px
   desplazaba el body a la derecha en TODAS las paginas (escritorio). */
.game-area.sidebar-open {
    margin-right: 250px; /* Igual al ancho del sidebar */
}

/* Asegura que el #game-container no se desborde */
#game-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
    cursor: grab;
}

/* Acotados a .main-layout para que no colisionen con otras clases
   genericas de la app (mismo motivo que .sidebar-open). */
.main-layout .sidebar-show {
    transform: translateX(0%);
    display:block;
}

.main-layout .sidebar-hide {
    transform: translateX(100%);
}

.sidebar .close-button {
    background: none;
    border: none;
    font-size: 24px;
    position: relative;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

/* Para los botones de menú ya existentes */
.context-menu-container {
    margin-bottom: 10px;
}

/*----------MEJORAS DE ESTILO*/
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 93vh;
    background-color: var(--rz-body-background-color);
    color: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5); /*Borde del sidebar lateral para las opciones*/
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Acotados igual que arriba: clases genericas que no deben fugarse. */
.main-layout .sidebar-show {
    transform: translateX(0);
}

.main-layout .sidebar-hide {
    transform: translateX(100%);
    display:none;
}

.sidebar-content {
    flex: 1;
    display: block;
    flex-direction: column;
    gap: 20px;
}

.toggle-sidebar-button {
    position: fixed;
    top: 70px;
    right: 20px;
    background-color: #444;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1200;
    box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
}

.close-button {
    margin-bottom:30px;
    align-self: flex-end;
    background: none;
    color: #bbb;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .close-button:hover {
        color: #fff;
    }

/* Menús contextuales */
.context-menu-container button {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 500;
    background-color: #34373b;
    border: 1px solid #555;
    color: #eee;
    transition: background-color 0.2s;
}

    .context-menu-container button:hover {
        background-color: #4a4d52;
    }

.context-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background-color: #2a2c30;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 0;
    min-width: 100%;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.25);
    z-index: 2000;
    animation: fadeInMenu 0.2s ease forwards;
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    padding: 8px 14px;
    color: #ccc;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

    .menu-item:hover {
        background-color: #3a3c40;
        color: #fff;
    }

.rz-button-icon-right {
    float: right;
    transition: transform 0.2s ease;
}

.rz-button-icon-rotated {
    transform: rotate(180deg);
}

/* --- CSS para las fichas minimizadas --- */
/* Estilos para el contenedor de las fichas (el área principal) */
.fichas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Permite que los clics pasen a través del contenedor si no hay fichas */
}

/* Estilos para la ventana de la ficha (simula un diálogo) */
/* Estilos para la ventana de la ficha (simula un diálogo) */
.ficha-dialog {
    /* (resto de los estilos de ficha-dialog) */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    width: 97%;
    height: 95%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dialog-header {
    /* Usar flexbox para alinear los elementos */
    display: flex;
    align-items: center; /* Centra verticalmente los elementos */
    padding: 8px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

    .dialog-header .ficha-title {
        flex-grow: 1; /* Esto hace que el título ocupe el espacio disponible */
        text-align: center; /* Centra el texto del título */
        /* Añade margen para que no choque con los botones */
        margin-right: 16px;
        margin-left: 16px;
        font-weight: bold;
    }

.minimize-button, .close-button-ficha {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
    order: 2; /* Opcional: Define el orden para que los botones se muestren después del título */
}

    /* Puedes añadir estilos para el hover de los botones para una mejor experiencia */
    .minimize-button:hover, .close-button-ficha:hover {
        color: #007bff;
    }

.close-button-ficha {
    order: 3; /* Asegura que el botón de cerrar esté al final */
    margin-bottom:0px;
    color:black;
}

.dialog-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px; /* Opcional: añade padding al contenido para que no se pegue a los bordes */
}

/* Mantén los estilos para las fichas minimizadas, ya que no cambian */
.minimized-bar {
    position: fixed;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 10px;
    z-index: 1001;
    font-size:50px;
}

.minimized-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
    transition: transform 0.2s;
}

    .minimized-icon:hover {
        transform: scale(1.05);
    }

    .minimized-icon img {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 5px;
    }

    .minimized-icon span {
        font-size: 0.8rem;
        text-align: center;
        max-width: 60px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* --- BARRA LATERAL DE ESTADÍSTICAS --- */
.stats-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 220px;
    background: var(--rz-body-background-color, #1e1e1e);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    z-index: 1500;
    overflow: hidden;
    animation: slideInLeft 0.3s ease;
}

@keyframes slideInLeft {
    from { transform: translateY(-50%) translateX(-100%); }
    to { transform: translateY(-50%) translateX(0); }
}

.stats-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.stats-sidebar-foto {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rz-primary, #0d6efd);
}

.stats-sidebar-foto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #444;
    color: #aaa;
    font-weight: 700;
    font-size: 18px;
}

.stats-sidebar-nombre {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--rz-text-color, #eee);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stats-sidebar-cerrar {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 6px;
    border-radius: 4px;
}

.stats-sidebar-cerrar:hover {
    background: rgba(255,255,255,0.1);
    color: #e74c3c;
}

.stats-sidebar-body {
    padding: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.stats-sidebar-stat {
    margin-bottom: 12px;
}

.stats-sidebar-label {
    display: block;
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 4px;
}

.stats-sidebar-barra {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2px;
}

.stats-sidebar-barra-relleno {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
}

.stats-sidebar-valor {
    font-size: 12px;
    color: #aaa;
}



.stats-sidebar-editor-vida {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.stats-sidebar-campo-vida {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stats-sidebar-campo-vida label {
    font-size: 10px;
    color: #888;
    margin-bottom: 2px;
}

.stats-sidebar-input-vida {
    width: 50px;
    padding: 3px 6px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    outline: none;
}

.stats-sidebar-input-vida:focus {
    border-color: #00bcd4;
}

.stats-sidebar-separador {
    font-size: 18px;
    font-weight: bold;
    color: #666;
    margin-top: 14px;
}

.stats-sidebar-separador-mini {
    font-size: 14px;
    font-weight: bold;
    color: #666;
}

.stats-sidebar-barras-custom,
.stats-sidebar-estados {
    margin-top: 14px;
}

.stats-sidebar-colapsable {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.stats-sidebar-colapsable:hover {
    color: #00bcd4;
}

.stats-sidebar-contador {
    font-size: 10px;
    color: #888;
    margin-left: 4px;
}

.stats-sidebar-barra-nombre {
    display: block;
    font-size: 11px;
    color: #aaa;
    margin-bottom: 3px;
}

.stats-sidebar-barra-nombre small {
    opacity: 0.7;
}

.stats-sidebar-estados {
    display: flex;
    flex-direction: column;
}

.stats-sidebar-estados-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.stats-sidebar-estado-chip {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 17px;
    cursor: default;
}

.stats-sidebar-btn-barras {
    width: 100%;
    margin-top: 14px;
    padding: 8px 10px;
    background: #00bcd4;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.stats-sidebar-btn-barras:hover {
    background: #0097a7;
}

.stats-sidebar-vacio {
    font-size: 11px;
    color: #555;
    font-style: italic;
    padding: 4px 0;
}

.stats-sidebar-barra-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}

.stats-sidebar-quitar-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    padding: 0 4px;
    line-height: 1;
    border-radius: 3px;
}

.stats-sidebar-quitar-btn:hover {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.15);
}

.stats-sidebar-color-barra {
    width: 24px;
    height: 24px;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 1px;
    cursor: pointer;
    background: transparent;
    flex-shrink: 0;
}

.stats-sidebar-color-barra::-webkit-color-swatch-wrapper {
    padding: 1px;
}

.stats-sidebar-color-barra::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

.stats-sidebar-estado-quitar {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.stats-sidebar-estado-chip {
    position: relative;
}

.stats-sidebar-estado-chip:hover .stats-sidebar-estado-quitar {
    display: flex;
}

.stats-sidebar-agregar-seccion {
    margin-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 10px;
}

.stats-sidebar-agregar-fila {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.stats-sidebar-input-nueva-barra {
    flex: 1;
    min-width: 0;
    padding: 4px 6px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    outline: none;
}

.stats-sidebar-input-nueva-barra:focus {
    border-color: #00bcd4;
}

.stats-sidebar-input-nueva-valor {
    width: 42px;
    padding: 4px 3px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    text-align: center;
    outline: none;
}

.stats-sidebar-input-nueva-valor:focus {
    border-color: #00bcd4;
}

.stats-sidebar-input-nueva-icono {
    width: 32px;
    padding: 4px 3px;
    background: #333;
    border: 1px solid #555;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    text-align: center;
    outline: none;
}

.stats-sidebar-input-nueva-icono:focus {
    border-color: #00bcd4;
}

.stats-sidebar-agregar-btn {
    width: 24px;
    height: 24px;
    background: #00bcd4;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.stats-sidebar-agregar-btn:hover {
    background: #0097a7;
}

.stats-sidebar-icono-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-width: 140px;
}

.stats-sidebar-icono-btn {
    width: 24px;
    height: 24px;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.stats-sidebar-icono-btn:hover {
    background: #444;
    border-color: #00bcd4;
}

.stats-sidebar-icono-btn.seleccionado {
    background: #00bcd4;
    border-color: #00bcd4;
}

/* --- FICHAS FLOTANTES --- */
.fichas-flotantes-contenedor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
}

.ficha-flotante {
    position: fixed;
    top: 5%;
    left: 10%;
    width: 80%;
    height: 90%;
    min-width: 400px;
    min-height: 300px;
    max-width: 95vw;
    max-height: 95vh;
    background: var(--rz-body-background-color, #1e1e1e);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    overflow: hidden;
    animation: fichaFadeIn 0.25s ease;
}

/* --- HANDLES DE REDIMENSIÓN (bordes) --- */
.ficha-flotante-n-resize,
.ficha-flotante-s-resize,
.ficha-flotante-e-resize,
.ficha-flotante-w-resize {
    position: absolute;
    z-index: 10;
}

.ficha-flotante-n-resize { top: -4px; left: 10px; right: 10px; height: 8px; cursor: n-resize; }
.ficha-flotante-s-resize { bottom: -4px; left: 10px; right: 10px; height: 8px; cursor: s-resize; }
.ficha-flotante-e-resize { right: -4px; top: 10px; bottom: 10px; width: 8px; cursor: e-resize; }
.ficha-flotante-w-resize { left: -4px; top: 10px; bottom: 10px; width: 8px; cursor: w-resize; }

/* --- HANDLES DE REDIMENSIÓN (esquinas) --- */
.ficha-flotante-nw-resize,
.ficha-flotante-ne-resize,
.ficha-flotante-sw-resize,
.ficha-flotante-se-resize {
    position: absolute;
    z-index: 11;
    width: 16px;
    height: 16px;
}

.ficha-flotante-nw-resize { top: -5px; left: -5px; cursor: nwse-resize; }
.ficha-flotante-ne-resize { top: -5px; right: -5px; cursor: nesw-resize; }
.ficha-flotante-sw-resize { bottom: -5px; left: -5px; cursor: nesw-resize; }
.ficha-flotante-se-resize { bottom: -5px; right: -5px; cursor: nwse-resize; }
.ficha-flotante-se-resize::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255,255,255,0.4);
    border-bottom: 2px solid rgba(255,255,255,0.4);
    border-radius: 0 0 4px 0;
}

@keyframes fichaFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.ficha-flotante-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.ficha-flotante-titulo {
    font-weight: 600;
    font-size: 1rem;
    color: var(--rz-text-color, #eee);
}

.ficha-flotante-acciones {
    display: flex;
    gap: 8px;
}

.ficha-flotante-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--rz-text-color, #eee);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.ficha-flotante-btn:hover {
    background: rgba(255,255,255,0.2);
}

.ficha-flotante-btn-cerrar:hover {
    background: #e74c3c;
    color: white;
}

.ficha-flotante-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* --- MODAL DE FORMULARIO DE MAPA --- */
.modal-form-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fichaFadeIn 0.2s ease;
}

.modal-form-card {
    background: var(--rz-body-background-color, #1e1e1e);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    flex-shrink: 0;
}

.modal-form-header h4 {
    margin: 0;
    color: var(--rz-text-color, #eee);
    font-weight: 600;
}

.modal-form-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* --- FICHAS MINIMIZADAS --- */
.fichas-minimizadas-barra {
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2001;
}

.ficha-minimizada-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ficha-minimizada-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 24px;
    border: 2px solid var(--rz-primary, #0d6efd);
    background: var(--rz-body-background-color, #333);
    color: var(--rz-text-color, #fff);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 0;
    max-width: 200px;
}

.ficha-minimizada-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.ficha-minimizada-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rz-primary, #0d6efd);
    flex-shrink: 0;
}

.ficha-minimizada-inicial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rz-primary, #0d6efd);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.ficha-minimizada-nombre {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ficha-minimizada-cerrar {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--rz-body-background-color, #333);
    background: #e74c3c;
    color: white;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 1;
}

.ficha-minimizada-wrapper:hover .ficha-minimizada-cerrar {
    opacity: 1;
}