/**
 * Estilos Frontend - Mosaico Fotográfico
 * Paleta de colores: #002E52 (azul oscuro), #85CCD5 (azul claro)
 */

/* Variables CSS */
:root {
    --mosaico-primary: #002E52;
    --mosaico-secondary: #85CCD5;
    --mosaico-white: #ffffff;
    --mosaico-light-gray: #f8f9fa;
    --mosaico-gray: #6c757d;
    --mosaico-dark-gray: #343a40;
    --mosaico-success: #28a745;
    --mosaico-danger: #dc3545;
    --mosaico-warning: #ffc107;
    --mosaico-border-radius: 8px;
    --mosaico-box-shadow: 0 2px 10px rgba(0, 46, 82, 0.1);
    --mosaico-transition: all 0.3s ease;
}

/* Reset y aislamiento local del formulario para evitar estilos del tema */
.mosaico-upload-form-container {
    all: revert;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}
.mosaico-upload-form-container *, .mosaico-upload-form-container *::before, .mosaico-upload-form-container *::after {
    box-sizing: inherit;
}

/* Reset y aislamiento local de la galería de votación */
.mosaico-voting-gallery {
    all: revert;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}
.mosaico-voting-gallery *, .mosaico-voting-gallery *::before, .mosaico-voting-gallery *::after {
    box-sizing: inherit;
}

/* Reset opcional para modales que caen en body por fallback */
.mosaico-modal-root {
    all: revert;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}
.mosaico-modal-root *, .mosaico-modal-root *::before, .mosaico-modal-root *::after {
    box-sizing: inherit;
}

/* Reset y base */
.mosaico-upload-form-container *,
.mosaico-voting-container *,
.mosaico-employee-microsite *,
.mosaico-user-images-container * {
    box-sizing: border-box;
}

/* Contenedores principales */
.mosaico-upload-form-container,
.mosaico-voting-container,
.mosaico-employee-microsite,
.mosaico-user-images-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--mosaico-dark-gray);
}

/* Formulario de subida */

/* Contenedor intro */
.mosaico-upload-intro{
    text-align: justify;
    background: var(--mosaico-primary);
    padding: 3%;
    border-radius: var(--mosaico-border-radius);
}
.mosaico-intro-before{
    background-color: var(--mosaico-secondary);
    color: var(--mosaico-primary);
    padding: 2%;
    border-radius: var(--mosaico-border-radius);
    margin-bottom: 20px;
    font-size: 22px;
}
.mosaico-intro-before h2 {
    font-size: 40px;
    color: var(--mosaico-white);
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
}
.mosaico-upload-button{
    text-align: center;
}
.mosaico-upload-button button{
    height: 10vh;
    font-size: 30px;
    background: var(--mosaico-white);
}
.mosaico-intro-after{
    color: var(--mosaico-white);
    padding: 2%;
    margin-bottom: 20px;
    font-size: 22px;
}

span.mosaic-end-date {
    font-size: 26px;
    color: #85ccd6;
}

/* Formulario */

.mosaico-upload-form-container {
    /* background: var(--mosaico-white); */
    border-radius: var(--mosaico-border-radius);
    box-shadow: var(--mosaico-box-shadow);
    overflow: hidden;
}

.mosaico-upload-form {
    padding: 30px;
}

.mosaico-form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--mosaico-light-gray);
}

.mosaico-form-header h3 {
    color: var(--mosaico-primary);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.mosaico-form-header p {
    color: var(--mosaico-gray);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

.mosaico-guest-notice {
    background: var(--mosaico-secondary);
    color: var(--mosaico-primary);
    padding: 15px;
    border-radius: var(--mosaico-border-radius);
    margin-top: 15px !important;
    font-weight: 500;
}

/* Secciones del formulario */
.mosaico-form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
}

.mosaico-form-section h4 {
    color: var(--mosaico-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--mosaico-secondary);
}

/* Grupos de formulario */
.mosaico-form-group {
    margin-bottom: 20px;
}

.mosaico-form-group label {
    display: block;
    color: var(--mosaico-primary);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.mosaico-form-group input[type="text"],
.mosaico-form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: var(--mosaico-border-radius);
    font-size: 16px;
    transition: var(--mosaico-transition);
    background: var(--mosaico-white);
}

.mosaico-form-group input[type="text"]:focus,
.mosaico-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--mosaico-secondary);
    box-shadow: 0 0 0 3px rgba(133, 204, 213, 0.1);
}

.mosaico-field-help {
    display: block;
    color: var(--mosaico-gray);
    font-size: 12px;
    margin-top: 5px;
    font-style: italic;
}

/* Input de archivo */
.mosaico-file-input-wrapper {
    position: relative;
    display: block;
}

.mosaico-file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mosaico-file-input-display {
    display: block;
    padding: 20px;
    border: 2px dashed var(--mosaico-secondary);
    border-radius: var(--mosaico-border-radius);
    text-align: center;
    background: var(--mosaico-white);
    transition: var(--mosaico-transition);
    cursor: pointer;
}

.mosaico-file-input-display:hover {
    border-color: var(--mosaico-primary);
    background: rgba(133, 204, 213, 0.05);
}

.mosaico-file-placeholder {
    display: block;
    color: var(--mosaico-primary);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.mosaico-file-requirements {
    display: block;
    color: var(--mosaico-gray);
    font-size: 12px;
}

/* Checkboxes */
.mosaico-checkbox-group {
    margin: 20px 0;
}

.mosaico-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal !important;
    margin-bottom: 0 !important;
}

.mosaico-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    transform: scale(1.2);
    accent-color: var(--mosaico-primary);
}

.mosaico-checkbox-text {
    color: var(--mosaico-dark-gray);
    font-size: 14px;
    line-height: 1.4;
}

/* Botones */
.mosaico-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--mosaico-border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--mosaico-transition);
    min-width: 120px;
}

.mosaico-btn-primary {
    background-color: var(--mosaico-secondary);
    color: var(--mosaico-primary);
}

.mosaico-btn-primary:hover {
    background-color: var(--mosaico-primary);
    color: var(--mosaico-white);
    transform: translateY(-2px);
    box-shadow: var(--mosaico-box-shadow);
}

.mosaico-btn-secondary {
    background-color: var(--mosaico-light-gray);
    color: var(--mosaico-primary);
    border: 2px solid var(--mosaico-secondary);
}

.mosaico-btn-secondary:hover {
    background-color: var(--mosaico-secondary);
    color: var(--mosaico-primary);
}

.mosaico-btn-danger {
    background-color: var(--mosaico-danger);
    color: var(--mosaico-white);
}

.mosaico-btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.mosaico-btn:disabled,
.mosaico-btn.disabled {
    background-color: var(--mosaico-gray);
    color: var(--mosaico-white);
    cursor: not-allowed;
    opacity: 0.6;
}

.mosaico-btn:disabled:hover,
.mosaico-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Acciones del formulario */
.mosaico-form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--mosaico-light-gray);
}

/* Barra de progreso */
.mosaico-upload-progress {
    margin-top: 20px;
    padding: 15px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
}

.mosaico-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mosaico-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mosaico-secondary), var(--mosaico-primary));
    width: 0%;
    transition: width 0.3s ease;
}

.mosaico-progress-text {
    display: block;
    text-align: center;
    color: var(--mosaico-primary);
    font-weight: 600;
    font-size: 14px;
}

/* Mensajes */
.mosaico-upload-messages {
    margin-top: 20px;
}

.mosaico-message {
    padding: 12px 16px;
    border-radius: var(--mosaico-border-radius);
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
}

.mosaico-message-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--mosaico-success);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.mosaico-message-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--mosaico-danger);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.mosaico-message-info {
    background: rgba(133, 204, 213, 0.1);
    color: var(--mosaico-primary);
    border: 1px solid rgba(133, 204, 213, 0.2);
}

/* Imagen completada */
.mosaico-upload-complete {
    text-align: center;
    padding: 40px 30px;
}

.mosaico-success-message h3 {
    color: var(--mosaico-success);
    font-size: 24px;
    margin-bottom: 10px;
}

.mosaico-success-message p {
    color: var(--mosaico-gray);
    font-size: 16px;
    margin-bottom: 30px;
}

.mosaico-user-image-preview {
    max-width: 300px;
    margin: 0 auto;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
    padding: 20px;
}

.mosaico-preview-image {
    width: 100%;
    height: auto;
    border-radius: var(--mosaico-border-radius);
    margin-bottom: 15px;
    box-shadow: var(--mosaico-box-shadow);
}

.mosaico-image-info p {
    margin: 5px 0;
    color: var(--mosaico-dark-gray);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .mosaico-upload-form-container {
        margin: 10px;
    }
    
    .mosaico-upload-form {
        padding: 20px;
    }
    
    .mosaico-form-header h3 {
        font-size: 24px;
    }
    
    .mosaico-form-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .mosaico-form-section h4 {
        font-size: 16px;
    }
    
    .mosaico-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .mosaico-file-input-display {
        padding: 15px;
    }
    
    .mosaico-checkbox-label {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .mosaico-upload-form {
        padding: 15px;
    }
    
    .mosaico-form-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .mosaico-form-header h3 {
        font-size: 20px;
    }
    
    .mosaico-form-section {
        padding: 12px;
    }
}

/* Formularios */
.mosaico-upload-form {
    background: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
    padding: 30px;
    box-shadow: var(--mosaico-box-shadow);
    margin-bottom: 30px;
}

.mosaico-form-group {
    margin-bottom: 20px;
}

.mosaico-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--mosaico-primary);
}

.mosaico-form-group input[type="text"],
.mosaico-form-group input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--mosaico-secondary);
    border-radius: var(--mosaico-border-radius);
    font-size: 16px;
    transition: var(--mosaico-transition);
}

.mosaico-form-group input[type="text"]:focus,
.mosaico-form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--mosaico-primary);
    box-shadow: 0 0 0 3px rgba(133, 204, 213, 0.3);
}

/* File input personalizado */
.mosaico-file-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.mosaico-file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.mosaico-file-input-text {
    display: block;
    padding: 20px;
    border: 2px dashed var(--mosaico-secondary);
    border-radius: var(--mosaico-border-radius);
    text-align: center;
    background: var(--mosaico-light-gray);
    transition: var(--mosaico-transition);
}

.mosaico-file-input-wrapper:hover .mosaico-file-input-text {
    border-color: var(--mosaico-primary);
    background: rgba(133, 204, 213, 0.1);
}

.mosaico-file-placeholder {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--mosaico-primary);
    margin-bottom: 8px;
}

.mosaico-file-requirements {
    display: block;
    font-size: 14px;
    color: var(--mosaico-gray);
}

/* Checkbox personalizado */
.mosaico-form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Barra de progreso */
.mosaico-upload-progress {
    margin-top: 20px;
    padding: 20px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
}

.mosaico-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mosaico-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mosaico-secondary), var(--mosaico-primary));
    width: 0%;
    transition: width 0.3s ease;
}

.mosaico-progress-text {
    font-weight: 600;
    color: var(--mosaico-primary);
}

/* Estados de acceso */
.mosaico-login-required,
.mosaico-access-denied,
.mosaico-upload-complete {
    text-align: center;
    padding: 40px 20px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
    border-left: 4px solid var(--mosaico-secondary);
}

.mosaico-upload-complete {
    border-left-color: var(--mosaico-success);
}

/* Galería de votación */
.mosaico-voting-header {
    text-align: center;
    margin-bottom: 30px;
}

.mosaico-voting-header h2 {
    color: var(--mosaico-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.mosaico-voting-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.mosaico-stat-card {
    background: var(--mosaico-white);
    padding: 20px;
    border-radius: var(--mosaico-border-radius);
    box-shadow: var(--mosaico-box-shadow);
    text-align: center;
}

.mosaico-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--mosaico-primary);
    margin-bottom: 5px;
}

.mosaico-stat-label {
    display: block;
    font-size: 14px;
    color: var(--mosaico-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mosaico-stat-status {
    font-size: 2rem;
    margin-bottom: 5px;
}

.mosaico-stat-status.voted {
    color: var(--mosaico-success);
}

.mosaico-stat-status.pending {
    color: var(--mosaico-warning);
}

/* Filtros de votación */
.mosaico-voting-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mosaico-filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--mosaico-secondary);
    background: var(--mosaico-white);
    color: var(--mosaico-primary);
    border-radius: var(--mosaico-border-radius);
    cursor: pointer;
    transition: var(--mosaico-transition);
    font-weight: 600;
}

.mosaico-filter-btn:hover,
.mosaico-filter-btn.active {
    background: var(--mosaico-secondary);
    color: var(--mosaico-primary);
}

/* Grid de votación */
.mosaico-voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
	padding: 0 20px;
}

/* Ajustes específicos por tamaño de pantalla */
@media (max-width: 480px) {
    .mosaico-voting-grid {
        grid-template-columns: 1fr; /* 1 columna en móviles */
		grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 10px;
    }
	.mosaico-voting-grid .mosaico-voting-card{
		height: auto;
	}
	.mosaico-voting-grid .mosaico-voting-card .mosaico-voting-actions {
		flex-direction: column;
	}
	.mosaico-voting-grid .mosaico-voting-card .mosaico-vote-btn {
    	padding: 6px 14px;
    	min-width: 100%;
	}
}

@media (min-width: 481px) and (max-width: 768px) {
    .mosaico-voting-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablets pequeñas */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .mosaico-voting-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columnas en tablets grandes y notebooks pequeños */
    }
}

@media (min-width: 1025px) and (max-width: 1440px) {
    .mosaico-voting-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 columnas en notebooks grandes */
    }
}

@media (min-width: 1441px) {
    .mosaico-voting-grid {
        grid-template-columns: repeat(auto-fit, 300px); /* Columnas automáticas en grandes pantallas */
    }
}

.mosaico-voting-card {
    background: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
    overflow: hidden;
    box-shadow: var(--mosaico-box-shadow);
    transition: var(--mosaico-transition);
    display: flex;
    flex-direction: column;
    height: 300px; /* Altura fija de 300px como solicitado */
}

.mosaico-voting-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 46, 82, 0.15);
}

.mosaico-voting-image {
    position: relative;
    width: 100%;
    height: 200px; /* Altura fija para la imagen */
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0; /* Evita que la imagen se contraiga */
}

.mosaico-voting-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--mosaico-transition);
}

.mosaico-voting-card:hover .mosaico-voting-image img {
    transform: scale(1.05);
}

/* Bloque informativo entre imagen y acciones */
.mosaico-card-info {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1; /* Permite que este elemento crezca y ocupe el espacio disponible */
    min-height: 0; /* Permite que se contraiga si el contenido es muy pequeño */
}
.mosaico-card-info .mosaico-user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--mosaico-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mosaico-card-info .mosaico-user-email {
    font-size: 13px;
    color: var(--mosaico-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Overlay con información de la imagen */
.mosaico-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 46, 82, 0.8));
    color: var(--mosaico-white);
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: var(--mosaico-transition);
    /* Evitar que intercepte clics: queremos que el clic llegue a la imagen */
    pointer-events: none;
}

.mosaico-voting-card:hover .mosaico-image-overlay {
    transform: translateY(0);
}

.mosaico-image-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mosaico-user-name {
    font-weight: 600;
    font-size: 16px;
}

.mosaico-user-department {
    font-size: 14px;
    opacity: 0.9;
}

.mosaico-vote-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--mosaico-secondary);
}

/* Badges */
.mosaico-own-image-badge,
.mosaico-voted-badge,
.mosaico-voting-complete {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    margin-bottom: 5px;
}

.mosaico-own-image-badge {
    background: var(--mosaico-primary);
    color: var(--mosaico-white);
}

.mosaico-voted-badge {
    background: var(--mosaico-success);
    color: var(--mosaico-white);
}

.mosaico-voting-complete {
    background: var(--mosaico-gray);
    color: var(--mosaico-white);
}

.mosaico-voting-actions {
    padding: 15px;
    border-top: 1px solid var(--mosaico-light-gray);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0; /* Evita que esta sección se contraiga */
}

/* Botones de votación por puntos */
.mosaico-vote-btn {
    padding: 10px 14px;
    border: none;
    border-radius: var(--mosaico-border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--mosaico-transition);
    font-size: 14px;
    min-width: 44px;
    text-align: center;
}

.mosaico-vote-3 {
    background: #28a745;
    color: var(--mosaico-white);
}

.mosaico-vote-3:hover {
    background: #218838;
}

.mosaico-vote-2 {
    background: #ffc107;
    color: var(--mosaico-primary);
}

.mosaico-vote-2:hover {
    background: #e0a800;
}

.mosaico-vote-1 {
    background: var(--mosaico-secondary);
    color: var(--mosaico-primary);
}

.mosaico-vote-1:hover {
    background: var(--mosaico-primary);
    color: var(--mosaico-white);
}

.mosaico-vote-btn.disabled,
.mosaico-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Barra de confirmación de votación */
.mosaico-confirm-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
}
.mosaico-confirm-hint {
    color: var(--mosaico-gray);
    font-size: 14px;
}
.mosaico-confirm-content {
    width: 80dvw;
    max-width: 1100px;
    max-height: 75dvh; /* include header + body + footer in this height */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: #fff;
}
.mosaico-confirm-body {
    flex: 1; /* take remaining space inside content */
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto; /* only scroll if items overflow the total 75dvh */
}
.mosaico-confirm-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
}
.mosaico-confirm-item {
    background: var(--mosaico-white);
    padding: 12px;
    border-radius: var(--mosaico-border-radius);
    box-shadow: var(--mosaico-box-shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mosaico-confirm-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}
.mosaico-confirm-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--mosaico-dark-gray);
}

/* Responsive ajustes para el modal de confirmación */
.mosaico-confirm-content {
    overflow: hidden;
}
@media (max-width: 1024px) {
    .mosaico-confirm-list { grid-template-columns: repeat(2, 1fr); }
    .mosaico-confirm-item img { height: 160px; }
}
@media (max-width: 640px) {
    .mosaico-confirm-content { width: 95dvw; }
    .mosaico-confirm-body { padding: 12px; }
    .mosaico-confirm-list { grid-template-columns: 1fr; gap: 12px; }
    .mosaico-confirm-item img { height: 140px; }
}
@media (max-height: 700px) {
    .mosaico-confirm-item img { height: 150px; }
}
@media (max-height: 560px) {
    .mosaico-confirm-item img { height: 130px; }
}

.mosaico-vote-btn.selected {
    outline: 2px solid var(--mosaico-primary);
}

/* Microsite de empleados */
.mosaico-welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--mosaico-primary), var(--mosaico-secondary));
    color: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
}

.mosaico-welcome-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.mosaico-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.mosaico-dashboard-card {
    background: var(--mosaico-white);
    padding: 25px;
    border-radius: var(--mosaico-border-radius);
    box-shadow: var(--mosaico-box-shadow);
}

.mosaico-dashboard-card h3 {
    color: var(--mosaico-primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.mosaico-status-voted,
.mosaico-status-pending {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: var(--mosaico-border-radius);
    margin-bottom: 15px;
}

.mosaico-status-voted {
    background: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--mosaico-success);
}

.mosaico-status-pending {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--mosaico-warning);
}

.mosaico-status-icon {
    font-size: 1.5rem;
}

.mosaico-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.mosaico-stat {
    text-align: center;
    padding: 15px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
}

/* Imágenes del usuario */
.mosaico-user-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.mosaico-user-image-card {
    background: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
    overflow: hidden;
    box-shadow: var(--mosaico-box-shadow);
    position: relative;
}

.mosaico-user-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.mosaico-user-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mosaico-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 46, 82, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--mosaico-transition);
    pointer-events: none;
}

.mosaico-user-image-card:hover .mosaico-image-overlay {
    opacity: 1;
}

.mosaico-user-image-info {
    padding: 15px;
}

.mosaico-image-state {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.mosaico-state-pendiente-revision {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.mosaico-state-aprobado {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.mosaico-state-rechazado {
    background: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.mosaico-image-votes,
.mosaico-image-date {
    font-size: 14px;
    color: var(--mosaico-gray);
    margin-bottom: 5px;
}

.mosaico-image-votes {
    font-weight: 600;
    color: var(--mosaico-secondary);
}

/* Ranking */
.mosaico-ranking-list {
    space-y: 10px;
}

.mosaico-ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
    margin-bottom: 10px;
}

.mosaico-ranking-position {
    width: 30px;
    height: 30px;
    background: var(--mosaico-primary);
    color: var(--mosaico-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.mosaico-ranking-name {
    flex: 1;
    font-weight: 600;
    color: var(--mosaico-primary);
}

.mosaico-ranking-votes {
    color: var(--mosaico-secondary);
    font-weight: 600;
}

/* Estados de carga */
.mosaico-loading {
    text-align: center;
    padding: 40px;
    color: var(--mosaico-gray);
    font-style: italic;
}

.mosaico-no-images {
    text-align: center;
    padding: 40px;
    color: var(--mosaico-gray);
    background: var(--mosaico-light-gray);
    border-radius: var(--mosaico-border-radius);
}

/* Centrar el estado "sin imágenes" dentro del grid de votación */
.mosaico-voting-grid .mosaico-no-images {
    grid-column: 1 / -1; /* ocupar todas las columnas del grid */
    justify-self: center; /* centrar horizontalmente el bloque dentro del grid */
}

.mosaico-load-more-container {
    text-align: center;
    margin-top: 30px;
}

/* Notificaciones */
.mosaico-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: var(--mosaico-border-radius);
    color: var(--mosaico-white);
    font-weight: 600;
    z-index: 9999;
    transform: translateX(400px);
    transition: var(--mosaico-transition);
}

.mosaico-notification.show {
    transform: translateX(0);
}

.mosaico-notification.success {
    background: var(--mosaico-success);
}

.mosaico-notification.error {
    background: var(--mosaico-danger);
}

.mosaico-notification.warning {
    background: var(--mosaico-warning);
    color: var(--mosaico-dark-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .mosaico-upload-form-container,
    .mosaico-voting-container,
    .mosaico-employee-microsite,
    .mosaico-user-images-container {
        padding: 15px;
    }
    
    .mosaico-voting-grid,
    .mosaico-user-images-list {
        grid-template-columns: 1fr;
    }
    
    .mosaico-dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .mosaico-voting-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .mosaico-filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .mosaico-welcome-section h1 {
        font-size: 2rem;
    }
    
    .mosaico-voting-header h2 {
        font-size: 2rem;
    }
    
    .mosaico-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mosaico-ranking-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .mosaico-notification {
        left: 20px;
        right: 20px;
        transform: translateY(-100px);
    }
    
    .mosaico-notification.show {
        transform: translateY(0);
    }
}

/* Estilos para errores de validación */
.mosaico-form-group input.error,
.mosaico-form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.mosaico-field-error {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    font-weight: 500;
}

@media (max-width: 480px) {
    .mosaico-upload-form {
        padding: 20px;
    }
    
    .mosaico-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .mosaico-voting-card,
    .mosaico-user-image-card {
        margin-bottom: 20px;
    }
    
    .mosaico-dashboard-card {
        padding: 20px;
    }
}

/* Modal de imagen ampliada (idéntico al del visualizador) */
.mosaico-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.mosaico-modal-content {
    background: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
    /* Limitar tamaño del contenedor del modal */
    max-width: 80dvw;
    max-height: 85dvh;
    position: relative;
    overflow: hidden; /* Evitar overflow horizontal */
    padding: 16px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mosaico-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: var(--mosaico-white);
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--mosaico-transition);
}

.mosaico-modal-close:hover {
    background: var(--mosaico-primary);
}

.mosaico-modal-body {
    /* Grid: la imagen ocupa el espacio disponible (1fr) y la info se sitúa debajo */
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    height: 75dvh;
    width: 100%; /* Evitar overflow horizontal */
    gap: 0;
    position: relative;
}

/* Evitar scroll de fondo cuando el modal está abierto */
body.mosaico-modal-open {
    overflow: hidden;
}
.mosaico-modal-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    cursor: default;
}

.mosaico-modal-info {
    padding: 20px;
    background: var(--mosaico-light-gray);
}

.mosaico-modal-info h3 {
    margin: 0 0 10px 0;
    color: var(--mosaico-primary);
    font-size: 1rem; /* título ligeramente más pequeño para hasta ~50 caracteres */
    line-height: 1.25;
}

.mosaico-modal-info p {
    margin: 0;
    color: var(--mosaico-gray);
}

/* Responsive para modal */
@media (max-width: 768px) {
    .mosaico-modal-content {
        /* El visualizador no fuerza margin ni tamaños especiales en mobile */
    }
}

/* Mis Votos (lista de votos del usuario) */
.mosaico-my-votes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mosaico-my-vote-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mosaico-white);
    border-radius: var(--mosaico-border-radius);
    box-shadow: var(--mosaico-box-shadow);
    padding: 8px 10px;
}

.mosaico-my-vote-thumb {
    width: 140px;
    height: 90px;
    border-radius: var(--mosaico-border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.mosaico-my-vote-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mosaico-my-vote-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--mosaico-dark-gray);
}

.mosaico-my-vote-points {
    font-weight: 600;
    color: var(--mosaico-secondary);
}

.mosaico-my-vote-owner {
    color: var(--mosaico-primary);
}

/* Responsive ajustes para Mis Votos */
@media (max-width: 768px) {
    .mosaico-my-vote-thumb {
        width: 120px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .mosaico-my-vote-thumb {
        width: 100px;
        height: 70px;
    }
}
/* Overlay informativo desactivado */
.mosaico-modal-body:hover::after {
    content: none;
}