:root {
    --ecaa-primary: rgb(10, 81, 151);
    --ecaa-secondary: rgb(10, 81, 151);
    --ecaa-bg: rgba(255, 255, 255, 1);
    --ecaa-text: #2d3436;
    --ecaa-glass: rgba(255, 255, 255, 1);
    --ecaa-border: rgba(255, 255, 255, 1);
    --ecaa-primary-hover: #cd914b;
}

.ecaa-main-container {
    display: flex;
    gap: 20px;
    max-width: 900px;
    margin: 20px auto;
    align-items: flex-start;
}

.ecaa-calendar-wrapper {
    flex: 0 0 360px;
    background: var(--ecaa-glass);
    border-radius: 0px;
    border: 1px solid var(--ecaa-border);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ecaa-text);
}

.ecaa-side-panel {
    flex: 1;
    border-radius: 0 25px 0 25px;
    background: transparent;
    padding: 0;
    min-height: auto;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

.ecaa-panel-placeholder {
    color: #999;
    text-align: center;
    padding: 2rem;
    font-style: italic;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 25px 0 25px;
}

.ecaa-event-item {
    margin-bottom: 1rem;
    padding: 1.5rem;
    padding-top: 2.5rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 20px 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ecaa-event-title {
    font-size: 1.2rem;
    color: var(--ecaa-primary);
    margin: 0 0 5px 0;
    font-weight: 600;
    padding-right: 40px; /* Evitar que el título se pise con la X de cerrar */
}

.ecaa-event-date {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.ecaa-event-date span {
    background: #f0f2f5;
    padding: 2px 8px;
    border-radius: 4px;
}

.ecaa-more-info {
    display: block;
    text-align: right;
    color: var(--ecaa-primary);
    text-decoration: underline;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 850px) {
    .ecaa-main-container {
        flex-direction: column;
        align-items: center;
    }

    .ecaa-calendar-wrapper,
    .ecaa-side-panel {
        width: 100%;
        max-width: 400px;
        flex: none;
    }
}

.ecaa-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ecaa-calendar-header h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    padding-bottom: 5px;
    color: var(--ecaa-primary);
    text-transform: capitalize;
}

.ecaa-nav-btn {
    background: var(--ecaa-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 10px 0 10px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    /* align-items: center; */
    justify-content: center;
    width: 45px;
    height: 45px;
    line-height: 18px;
}

.ecaa-nav-btn:hover {
    transform: scale(1.1);
    background: var(--ecaa-secondary);
}

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

.ecaa-day-name {
    text-align: center;
    font-weight: 600;
    padding-bottom: 10px;
    color: #636e72;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.ecaa-day {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    box-sizing: border-box;
    /* Importante para que el borde no mueva el contenido */
    border: 2px solid transparent;
}

.ecaa-day:hover {
    background: var(--ecaa-secondary);
    margin: -5px;
    color: white;
}

.ecaa-day.ecaa-today {
    background: var(--ecaa-primary);
    color: white;
    margin: -5px;
    box-shadow: 0 0 15px rgba(10, 81, 151, 0.1);
}

.ecaa-day.ecaa-not-current {
    opacity: 0.3;
}

.ecaa-day.ecaa-has-event {
    border: 2px solid var(--ecaa-primary-hover);
    border-radius: 0 10px 0 10px;
    margin: -3px;
    /* Amarillo */
    font-weight: 700;
}

.ecaa-day.ecaa-selected-day {
    background: #f0f5fa !important;
    /* color: white !important; */
}

/* Estilos para el enlace "Más información" */
.ecaa-more-info {
    display: inline-block;
    color: var(--ecaa-primary-hover) !important;
}

.ecaa-more-info:hover {
    color: #000;
}

/* Modal / Capa superpuesta */
.ecaa-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10000 !important;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ecaa-modal.ecaa-is-visible {
    opacity: 1;
    visibility: visible;
}

.ecaa-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1000px;
    border-radius: 0 30px 0 30px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);

    /* Animación de entrada/salida */
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Velocidad al cerrar */
}

.ecaa-modal.ecaa-is-visible .ecaa-modal-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
    /* Velocidad al abrir (más lenta) */
}

.ecaa-modal-close {
    color: #1a1a1a;
    position: absolute;
    right: 25px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.ecaa-modal-close:hover {
    color: var(--ecaa-primary);
}

#ecaa-modal-body .ecaa-event-summary {
    display: block;
    margin-top: 10px;
}

.ecaa-event-detail { display: block; }
.ecaa-event-image {
    float: right;
    width: 35%;
    max-width: 380px;
    margin: 0 0 10px 20px; /* espacio de 20px entre imagen y texto */
}
.ecaa-event-image img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 0 12px 0 12px;
    display: block;
}
.ecaa-event-info { overflow: hidden; }


/* Estilos Premium para los filtros (Selects y Búsqueda) */
.ecaa-filters-container {
    flex: 0 0 360px;
    background: var(--ecaa-glass);
    border-radius: 0px;
    border: 1px solid var(--ecaa-border);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    box-sizing: border-box;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ecaa-main-container-full {
    margin: 0px !important;
}

.ecaa-calendar-wrapper-full {
    flex: 0 0 100%;
}

.ecaa-filter-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.ecaa-filter-item label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 2px;
}

.ecaa-filter-item select,
.ecaa-filter-item input {
    font-family: 'Outfit', sans-serif !important;
    padding: 12px 18px !important;
    border: 2px solid #f0f2f5 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    color: #2d3436 !important;
    background-color: #f8fafc !important;
    outline: none !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: auto;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Flecha personalizada para selects */
.ecaa-filter-item select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.ecaa-filter-item input::placeholder {
    color: #a0aec0;
}

.ecaa-filter-item select:focus,
.ecaa-filter-item input:focus {
    border-color: var(--ecaa-primary-hover);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(205, 145, 75, 0.1);
}

.ecaa-filter-item select:hover,
.ecaa-filter-item input:hover {
    border-color: #cbd5e0;
}

@media (max-width: 600px) {
    .ecaa-filters-container {
        gap: 10px;
        padding: 15px;
    }

    .ecaa-filter-item {
        min-width: 100%;
    }

    .ecaa-filter-button {
        margin-top: 10px;
    }

    .ecaa-calendar-wrapper {
        padding: 2px;
    }

    .ecaa-calendar-grid {
        gap: 0px;
    }

    #ecaa-month-display {
        font-size: 1rem;
        padding-bottom: 0px;
    }

    .ecaa-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        padding: 0;
        line-height: 35px;
    }

    .ecaa-day-name {
        font-size: 0.75rem;
        padding-bottom: 5px;
    }

    .ecaa-day,
    .ecaa-day.ecaa-selected-day {
        font-size: 0.7rem !important;
        margin: 0px !important;
    }

    .ecaa-day.ecaa-has-event {
        border-width: 2px;
        margin: 0px !important;
    }

    .ecaa-modal-content {
        padding: 20px;
        line-height: 1.25;
    }
    .ecaa-event-detail { display: block; }
    .ecaa-event-image {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 15px 0;
    }
}

@media (980px <=width <=1180px) {
    .ecaa-main-container-full .ecaa-calendar-grid {
        gap: 0px;
    }

    .ecaa-main-container-full .ecaa-day,
    .ecaa-main-container-full .ecaa-day.ecaa-selected-day,
    .ecaa-main-container-full .ecaa-day.ecaa-has-event,
    .ecaa-main-container-full .ecaa-day.ecaa-not-current {
        margin: 0px !important;
    }

    .ecaa-main-container-full #ecaa-month-display {
        font-size: 1rem;
        padding-bottom: 0px;
    }

    .ecaa-main-container-full .ecaa-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        padding: 0;
        line-height: 35px;
    }

}

@media (792px <=width <=980px) {

    .ecaa-filters-container {
        float: inline-end;
        margin-top: -30px;
        width: calc(50% - 10px);
    }

    .ecaa-main-container-full {
        float: inline-start;
        max-width: unset;
    }

    .ecaa-main-container-full .ecaa-calendar-grid {
        gap: 2px;
    }

    .ecaa-main-container-full .ecaa-day,
    .ecaa-main-container-full .ecaa-day.ecaa-selected-day,
    .ecaa-main-container-full .ecaa-day.ecaa-has-event,
    .ecaa-main-container-full .ecaa-day.ecaa-not-current {
        margin: 0px !important;
    }

    .ecaa-main-container-full #ecaa-month-display {
        font-size: 1rem;
        padding-bottom: 0px;
    }

    .ecaa-main-container-full .ecaa-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        padding: 0;
        line-height: 35px;
    }

}
