/* css/calendariofca.css */
/* ================================================
   CALENDARIO FCA - Estilos principales
================================================= */

.calendariofca-container {
    font-family: "Inter", sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 25px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    overflow: hidden;
    color: #14532d;
    position: relative;
}

/* ==============================
   BOTONES DE CAMBIO DE VISTA
============================== */
.calendariofca-view-toggle {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #d4edda;
}

.calendariofca-view-btn {
    background: #15803d;
    border: 2px solid transparent;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85em;
    border-radius: 6px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.calendariofca-view-btn.active {
    background: #166534;
    border-color: #22c55e;
}

.calendariofca-view-btn:hover {
    background: #22c55e;
    color: white;
}

/* Tabla de eventos (versión mejorada) */
.calendariofca-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.calendariofca-table th {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: white;
    padding: 10px 8px;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85em;
    position: relative;
    border: none;
    transition: all 0.3s ease;
}

.calendariofca-table th:first-child {
    border-top-left-radius: 8px;
}

.calendariofca-table th:last-child {
    border-top-right-radius: 8px;
}

.calendariofca-table th:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
}

.calendariofca-table td {
    padding: 12px;
    border-bottom: 1px solid #e0f2f1;
    transition: background-color 0.2s ease;
}

.calendariofca-table tr:last-child td {
    border-bottom: none;
}

.calendariofca-table tr:hover td {
    background: #f1f8e9;
}

/* FIX 1: Estilo para tipos de evento - tamaño aumentado */
.tipo-evento {
    display: inline-block;
    padding: 5px 10px; /* Padding aumentado */
    border-radius: 12px;
    font-size: 0.8em; /* Tamaño de fuente aumentado (de 0.4em) */
    background: linear-gradient(to right, #e8f5e9, #c8e6c9);
    color: #2e7d32;
    font-weight: 300;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Calendario */
.calendariofca-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #d4edda;
}

.calendariofca-calendar-header h3 {
    color: #2e7d32;
    font-weight: 400;
    margin: 0;
}

.calendariofca-calendar-header button {
    background: linear-gradient(to bottom, #2e7d32, #1b5e20);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.calendariofca-calendar-header button:hover {
    background: linear-gradient(to bottom, #1b5e20, #2e7d32);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.calendariofca-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.calendariofca-calendar-day-header {
    text-align: center;
    font-weight: 300;
    padding: 8px 0;
    background: #e8f5e9;
    border-radius: 6px;
    color: #2e7d32;
    text-transform: uppercase;
    font-size: 0.7em;
    letter-spacing: 0.4px;
}

.calendariofca-calendar-day {
    min-height: 80px;
    border: 1px solid #e0e0e0;
    padding: 2px;
    position: relative;
    border-radius: 8px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.calendariofca-calendar-day.today {
    background: #dcedc8;
    border-color: #aed581;
    box-shadow: 0 0 0 2px #aed581;
}

.calendariofca-calendar-day.has-event {
    background: #e8f5e9;
    cursor: pointer;
}

/* FIX 3: Eliminar transformación que causa desplazamiento */
.calendariofca-calendar-day.has-event:hover {
    background-color: #d0f0d3;
    transform: none; /* Eliminado translateY(-2px) */
    z-index: 8;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* FIX 4: Punto indicador de evento más visible */
.calendariofca-calendar-day.has-event::after {
    content: "";
    width: 8px; /* Aumentado de 5px */
    height: 8px; /* Aumentado de 5px */
    background-color: #22c55e; /* Verde más vibrante */
    border-radius: 50%;
    position: absolute;
    bottom: 8px; /* Ajuste de posición */
    right: 8px; /* Ajuste de posición */
}

.calendariofca-calendar-day-number {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2e7d32;
    font-size: 1.1em;
}

/* Vista Calendario: Eventos */
.calendariofca-calendar-day .evento-tooltip-item strong {
    font-size: 0.4em;
    color: #1b5e20;
}

/* Tooltip evento */
.evento-tooltip-item {
    padding: 3px 0;
    border-bottom: 1px solid #ddd;
}

.evento-tooltip-item:last-child {
    border-bottom: none;
}

/* FIX 2: Tamaño de texto aumentado en tooltips */
.evento-tooltip-item strong {
    display: block;
    color: #1b5e20;
    margin-bottom: 2px;
    font-weight: 100;
    font-size: 0.5em; /* Aumentado de 0.6em */
}


.evento-fecha {
    display: block;
    font-size: 0.8rem; /* Aumentado de 0.6rem */
    color: #444;
    margin-top: 4px;
}


.evento-sede {
    font-size: 0.85em; /* Aumentado de 0.7em */
    color: #607d8b;
    font-style: italic;
}

/* Paginación */
.calendariofca-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    font-weight: 500;
    color: #2e7d32;
}

.calendariofca-pagination button {
    background: linear-gradient(to bottom, #2e7d32, #1b5e20);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.calendariofca-pagination button:hover:not(:disabled) {
    background: linear-gradient(to bottom, #1b5e20, #2e7d32);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.calendariofca-pagination button:disabled {
    background: #c8e6c9;
    cursor: not-allowed;
    color: #a5d6a7;
    box-shadow: none;
}

#calendariofca-page-indicator {
    font-weight: bold;
    color: #1b5e20;
    min-width: 100px;
    text-align: center;
}

/* Mensajes de error */
.calendariofca-error {
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Indicador de carga */
.calendariofca-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    color: #2e7d32;
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendariofca-loading:after {
    content: "";
    width: 20px;
    height: 20px;
    border: 3px solid #e8f5e9;
    border-top-color: #2e7d32;
    border-radius: 50%;
    animation: calendariofca-spin 1s linear infinite;
}

/* Animación de carga */
@keyframes calendariofca-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modo responsive */
@media (max-width: 768px) {
    .calendariofca-calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendariofca-view-toggle {
        flex-direction: column;
    }
}