/* Estilos agrupados del módulo público */
/* Copia aquí todos los estilos de los bloques <style> de las vistas public_*.php */

/* Ejemplo de estructura, debes completar con los estilos reales de cada vista */

/* public_free_module_calendar_view.php */
html,
body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
    font-size: 14px;
}

#calendar {
    max-width: 1100px;
    margin: 40px auto;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table-responsive table {
    width: 100%;
    margin-bottom: 0;
}

.circle {
    font-size: 2em;
    /* Ajusta este valor para cambiar el tamaño del círculo */
}

td {
    padding: 10px;
    /* Ajusta este valor para cambiar el espacio entre los elementos */
}

.px-10 {
    padding-right: 10rem !important;
    padding-left: 18rem !important;
}

.btn.btn-primary {
    color: #fff;
    background-color: #5b6483;
    border-color: #5b6483;
}

/* Crear un spinner centrado en la pantalla */
.spinner {
    position: fixed;
    z-index: 9999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Añadir animación al spinner */
.spinner::before {
    content: '';
    display: block;
    position: absolute;
    left: calc(50% - 20px);
    top: calc(50% - 20px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #ccc;
    border-top-color: #333;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Cuando la página carga, ocultar spinner y mostrar contenido */
.loaded .spinner {
    opacity: 0;
}

.loaded .content {
    opacity: 1;
}

/* Mientras se carga la página, ocultar contenido */
.content {
    opacity: 0;
    transition: opacity .5s;
}

@media print {
    body {
        filter: grayscale(100%);
    }
}

.bg-teal {
    --bs-bg-opacity: 1;
    background-color: #5b6483 !important;
}

/* public_docentes_calendar_view.php */
/* ... estilos ... */

/* public_docentes_asistencia_view.php */
/* ... estilos ... */

/* public_carrera_correlatividades.php */
/* ... estilos ... */

/* public_calendar_view_consultas.php */
/* ... estilos ... */

/* public_calendar_instrumentos_view.php */
/* ... estilos ... */

/* public_asistencia_docentes_calendar_view.php */
/* ... estilos ... */



/* Estilos para las pestañas de Bootstrap */
.nav-tabs .nav-link {
    color: #7a6710;
    border-bottom-width: 3px;
    border-bottom-color: transparent;
}

.nav-tabs .nav-link.active {
    color: #5b6483;
    border-color: #dee2e6 #dee2e6 #5b6483;
    font-weight: 500;
}

.tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    padding: 1.5rem;
    border-bottom-left-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
    background-color: #ffffff;
}

/* Estilos para el visor de planos integrado */
#planViewerControls {
    padding: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

#planViewerControls .btn.active {
    background-color: #5b6483;
    color: white;
    border-color: #5b6483;
}

#zoomControls,
#fullscreenControls,
#filterControls {
    margin-left: 15px;
}

#zoomControls .btn,
#fullscreenControls .btn,
#filterControls .btn,
#filterControls select {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#viewerCanvas {
    display: block;
    margin: auto;
    border: 1px solid #ced4da;
    max-width: 100%;
    cursor: grab;
}

#viewerCanvas:active {
    cursor: grabbing;
}

/* Leyenda del visor de planos */
.canvas-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.powered-by-pellit {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.powered-by-pellit a {
    color: #5b6483;
    text-decoration: none;
    font-weight: bold;
}

.powered-by-pellit a:hover {
    text-decoration: underline;
}

/* Leyenda escritorio - debajo del visor */
#planLegend {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
}

.legend-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.legend-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    min-width: 100px;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #333;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-color.occupied {
    background: rgba(147, 255, 1, 0.3);
    border-color: #BFFA00;
}

.legend-color.soon {
    background: rgba(251, 192, 45, 0.3);
    border-color: #FBC02D;
}

.legend-color.free {
    background: rgba(91, 100, 131, 0.7);
    border-color: #5b6483;
}

.legend-color.accessibility {
    background: rgba(255, 165, 0, 0.6);
    border: none;
}

.legend-color.elevator {
    background: rgba(139, 69, 19, 0.6);
    border-color: #8B4513;
}

.legend-color.bathroom {
    background: rgba(0, 191, 255, 0.6);
    border-color: #0080FF;
}

.legend-color.stairs {
    background: rgba(128, 128, 128, 0.6);
    border-color: #696969;
}

.legend-color.default {
    background: rgba(200, 200, 200, 0.3);
    border-color: #ccc;
}

/* Estilos para leyenda interactiva */
.legend-desktop .legend-item {
    position: relative;
    user-select: none;
    transition: all 0.2s ease;
}

.legend-desktop .legend-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.legend-desktop .legend-item.active {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border-left: 3px solid #007bff !important;
    font-weight: bold !important;
}

.legend-desktop .legend-item:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.legend-desktop .legend-item:active {
    transform: scale(0.98);
}

#planStatus {
    font-size: 0.9em;
    color: #6c757d;
}

.plan-viewer-container {
    position: relative;
}

/* Estilos responsive para el header consolidados */
.container-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 1.5rem;
}

.header-logo-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo-container {
    background-color: #5b6483;
    padding: 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 70px;
    width: auto;
    min-width: 70px;
    box-sizing: border-box;
}

.header-logo {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    display: block;
}

.header-title {
    flex: 1;
    text-align: center;
    margin: 0;
    font-size: 2.0rem;
    font-weight: 600;
    color: #3e455e;
    min-width: 200px;
    flex-grow: 1;
}

.current-time-banner {
    background-color: #ffffff;
    color: #5b6483;
    padding: 5px 10px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #5b6483;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-width: 220px;
    height: auto;
    gap: 10px;
}

.live-indicator {
    background-color: #ffffff;
    color: #000000;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.live-dot {
    font-size: 1em;
    margin-right: 4px;
    animation: pulse 2s infinite;
}

.time-banner-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.time-display {
    font-size: 1.5rem;
    font-weight: 600;
    color: #5b6483;
    display: block;
    line-height: 1.1;
}

.date-display {
    font-size: 0.8rem;
    color: #5b6483;
    opacity: 0.9;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Animación adicional para el live-dot */
@keyframes blink {
    50% {
        opacity: 0;
    }
}
/* Responsive breakpoints */
@media (max-width: 1200px) {
    .header-title {
        font-size: 1.6rem;
    }

    .header-logo {
        height: 50px;
    }
}

@media (max-width: 768px) {
    .header-main-row {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 0 0 15px 0; /* Eliminar padding superior para pegar al top */
    }

    .header-title {
        font-size: 1.4rem;
        order: 2;
        min-width: unset;
    }

    .header-logo-wrapper {
        order: 1;
        width: 100%;
        margin: 0 -15px; /* Compensar el padding del container-main */
        position: relative;
    }

    .header-logo-container {
        width: 100%;
        margin: 0;
        border-radius: 0 0 15px 15px; /* Solo esquinas inferiores redondeadas */
        min-width: 100%;
        height: 80px; /* Aumentar altura para móvil */
        position: relative;
        top: 0;
    }

    .current-time-banner {
        order: 3;
        flex-direction: row;
        gap: 15px;
        padding: 8px 12px;
        min-width: unset;
        width: 100%;
        height: auto;
        max-width: 300px;
        justify-content: space-between;
    }

    .live-indicator {
        margin-bottom: 0;
        font-size: 0.75rem;
    }

    .time-display {
        font-size: 1.1rem;
    }

    .date-display {
        font-size: 0.8rem;
    }

    .header-logo {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container-main {
        padding: 0 5px;
    }

    .header-main-row {
        padding: 0 0 10px 0; /* Eliminar padding superior para pegar al top */
        gap: 8px;
    }

    .header-logo-wrapper {
        width: 100%;
        margin: 0 -5px; /* Compensar el padding reducido del container-main */
        position: relative;
    }

    .header-logo-container {
        width: 100%;
        margin: 0;
        border-radius: 0 0 12px 12px; /* Solo esquinas inferiores redondeadas */
        min-width: 100%;
        height: 70px;
        position: relative;
        top: 0;
    }

    .header-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .current-time-banner {
        flex-direction: column;
        gap: 5px;
        padding: 6px 10px;
        max-width: 250px;
        height: auto;
    }

    .live-indicator {
        margin-bottom: 3px;
        font-size: 0.7rem;
    }

    .time-display {
        font-size: 1rem;
    }

    .date-display {
        font-size: 0.75rem;
    }

    .header-logo {
        height: 40px;
    }
}

@media (max-width: 360px) {
    .header-title {
        font-size: 1.1rem;
    }

    .header-logo-wrapper {
        width: 100%;
        margin: 0 -5px; /* Mantener consistencia con 480px */
        position: relative;
    }

    .header-logo-container {
        width: 100%;
        margin: 0;
        border-radius: 0 0 10px 10px; /* Solo esquinas inferiores redondeadas */
        min-width: 100%;
        height: 65px;
        position: relative;
        top: 0;
    }

    .current-time-banner {
        max-width: 200px;
        padding: 5px 8px;
        height: auto;
    }

    .time-display {
        font-size: 0.9rem;
    }

    .date-display {
        font-size: 0.7rem;
    }

    .header-logo {
        height: 35px;
    }
}

/* Estilos específicos para body en módulos de actividad */
body.activity-content {
    background-color: #f0f2f5;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Estilos específicos para banners de tiempo */
.current-time-banner strong {
    display: block;
    font-size: 0.9rem;
    color: #3e455e;
    margin-bottom: 3px;
    height: auto;
}

/* Estilos para el contador de alertas */
.alert-counter {
    background-color: #dc3545;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    margin-left: 8px;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Mejorar responsividad del ticker de alertas */
@media (max-width: 768px) {
    .news-ticker-container {
        height: 80px !important;
        margin-bottom: 25px;
    }
    
    .news-ticker-header {
        width: 130px !important;
        font-size: 0.85rem !important;
        padding: 10px 12px !important;
    }
    
    .news-ticker-content {
        margin-left: 130px !important;
    }
    
    .news-ticker-item {
        font-size: 1rem !important;
        padding: 0 25px !important;
    }
    
    .news-ticker-empty {
        margin-left: 130px !important;
        font-size: 0.95rem !important;
    }
    
    .alert-counter {
        font-size: 0.65rem;
        padding: 1px 5px;
        min-width: 18px;
        height: 18px;
        margin-left: 6px;
    }
}

@media (max-width: 480px) {
    .news-ticker-container {
        height: 90px !important;
        margin-bottom: 20px;
    }
    
    .news-ticker-header {
        width: 110px !important;
        font-size: 0.75rem !important;
        padding: 8px 10px !important;
    }
    
    .news-ticker-content {
        margin-left: 110px !important;
    }
    
    .news-ticker-item {
        font-size: 0.9rem !important;
        padding: 0 20px !important;
    }
    
    .news-ticker-empty {
        margin-left: 110px !important;
        font-size: 0.85rem !important;
    }
    
    .alert-counter {
        font-size: 0.6rem;
        padding: 1px 4px;
        min-width: 16px;
        height: 16px;
        margin-left: 4px;
    }
}

@media (max-width: 360px) {
    .news-ticker-container {
        height: 85px !important;
        margin-bottom: 15px;
    }
    
    .news-ticker-header {
        width: 90px !important;
        font-size: 0.7rem !important;
        padding: 6px 8px !important;
    }
    
    .news-ticker-content {
        margin-left: 90px !important;
    }
    
    .news-ticker-item {
        font-size: 0.8rem !important;
        padding: 0 15px !important;
    }
    
    .news-ticker-empty {
        margin-left: 90px !important;
        font-size: 0.8rem !important;
    }
    
    .alert-counter {
        font-size: 0.55rem;
        padding: 1px 3px;
        min-width: 14px;
        height: 14px;
        margin-left: 3px;
    }
}

/* Responsivo para leyenda y controles del visor de planos */
@media (max-width: 768px) {
    .legend-desktop {
        flex-direction: column;
        gap: 10px;
    }
    
    .legend-item {
        min-width: 80px;
        font-size: 11px;
    }
    
    .powered-by-pellit {
        font-size: 9px;
        bottom: 5px;
        right: 5px;
        padding: 2px 6px;
    }
    
    /* Controles del visor más compactos */
    #planViewerControls {
        flex-direction: column;
        gap: 10px;
    }
    
    #planViewerControls > div {
        margin-right: 0 !important;
        margin-bottom: 10px;
    }
    
    #planViewerControls select {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .legend-item {
        min-width: 70px;
        font-size: 10px;
    }
    
    .legend-color {
        width: 16px;
        height: 12px;
        margin-right: 6px;
    }
    
    .powered-by-pellit {
        font-size: 8px;
        bottom: 3px;
        right: 3px;
        padding: 1px 4px;
    }
    
    #planViewerControls select {
        min-width: 120px;
        font-size: 0.8rem;
    }
}
