/*
	Theme Name:   MCA Events
	Template:     hello-elementor
	Text Domain:  mca-events
	Version:      1.0.1
*/

/* Events Calendar Layout */
.events-container {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-secondary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-secondary-font-weight);
}

/* Filters Sidebar */
.filters {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: wrap;
    flex-wrap: wrap;
    background: var(--e-global-color-primary);
    padding: 15px;
    gap: 8px;
    border-radius: 8px;
    z-index: 10;
}

.filters .filter-column {
    flex: 1 1 calc(100% / 3 - 16px);
    align-items: center;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
}

.filters h3 {
    flex: 1 1 100%;
    font-size: 18px;
    margin-bottom: 10px;
}

.filters label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
}

.filters #filter-category {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 300px;
    align-items: center;
    justify-content: center;
}

.filters #filter-category label {
     margin-bottom: 10px;
     margin-top: 10px;
}

.filters select,
.filters input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.filters input[type="checkbox"] {
    display: none;
}

.filters label[for^="filter-category-"] {
    background: var(--e-global-color-accent);
    color: var(--e-global-color-text);
    font-weight: 400;
    padding: 6px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 5px;
}

.filters input[type="checkbox"]:checked + label {
    background: var(--e-global-color-secondary);
}

.filters button {
    display: block;
    width: 100%;
    background: var(--e-global-color-accent);
    color: white;
    font-weight: bold;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px;
}

.filters button:hover {
    background: var(--e-global-color-secondary);
}

/* Event Listing */
.event-list {
    padding: 8px;
    border-radius: 8px;
    background: var(--e-global-color-primary);
    overflow-y: auto;
    min-height: 200px;
    max-height: calc(100vh - 120px);
}

/* Event Groups by Date */
.event-list h3 {
    font-size: 30px;
    color: var(--e-global-color-text);
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    font-weight: var(--e-global-typography-primary-font-weight);
    text-align: center;
    margin-bottom: 10px;
    margin-top: 20px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--e-global-color-accent);
}
#events-output>p {
    text-align: center;
    color: var(--e-global-color-text);
    font-size: 14px;
    padding: 50px;
}

.event-date-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.event-dat.event-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* Event Card */
.event-card {
    width: calc(40% - 8px);
    min-width: 300px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--e-global-color-b9c075f);
    color: var(--e-global-color-d6e525b);
    padding: 20px;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

.event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: background-color 0.3s;
}

.event-card:hover::after {
    background: rgba(0, 0, 0, 0.5);
}

/* Inner Content */
.event-card-content {
    position: relative;
    z-index: 2;
}

.event-card h4 {
    font-size: 40px;
    margin-bottom: 5px;
    font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    color: var(--e-global-color-948794a);
    position: relative;
    z-index: 2;
    text-align: center;
    text-shadow: 1px 1px;
    font-weight: 400;
}

.event-card p {
    font-size: 14px;
    margin: 2px 0;
    font-family: var(--e-global-typography-secondary-font-family), Sans-serif;
    font-weight: 400;
    color: var(--e-global-color-d6e525b);
    position: relative;
    z-index: 2;
}
.event-card p.event-date {
    color: var(--e-global-color-accent);
}

/* Make Entire Card Clickable */
.event-card a {
    position: absolute;
    inset: 0;
    z-index: 3;
}

@media (max-width: 768px) {
    .events-container {
        flex-direction: column;
    }
    
    .filters,
    .event-list {
        flex: 1 1 100%;
    }
}



#geolocation-button {
    position: absolute;
    right: 10px;
    top: 20px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.geolocation-button svg {
    width: 24px;
    height: 24px;
    fill: #666;
    transition: fill 0.2s ease;
}

.geolocation-button:hover svg {
    fill: #000;
}

.geolocation-button:active svg {
    fill: #333;
}

.geolocation-button:focus {
    outline: none;
}

.geolocation-container {
    position: relative;
    display: inline-block;
}

/* Style pour le champ de ville avec le bouton intégré */
#reference_city {
    padding-right: 40px; /* Espace pour le bouton */
    position: relative;
    z-index: 0;
    margin: 0;
}

/* Style pour le datalist et les suggestions */
#cities {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

#cities option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

#cities option:hover {
    background-color: #f5f5f5;
}

#cities option::before {
    content: "•";
    color: #666;
    font-weight: bold;
}

/* Style pour les informations de géolocalisation */
#reference_lat,
#reference_lon {
    display: none;
}


#distance-container {
    display: flex;
    align-items: center;
    font-size: 14px;
}

#distance-container input {
    flex-grow: 1;
    width: auto;
    border-radius: 0;
    width: 50px;
    padding-left: 0;
    padding-right: 0;
    font-size: 14px;
    border: 1px solid var(--e-global-color-b9c075f);
    border-left: none;
    border-right: none;
}

#distance-container .prefix,
#distance-container .suffix {
    background-color: #fff;
    padding: 0.5rem 1rem;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

#distance-container .suffix {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    border: 1px solid var(--e-global-color-b9c075f);
    border-left: none;
}

/* Style pour les filtres avancés */
#toggle-advanced-filters {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px 12px;
    margin: 0;
    font-size: 14px;
}

#toggle-advanced-filters:hover {
    color: #333;
}

#advanced-filters {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.filter-subcolumn {
    margin-bottom: 10px;
}

.filter-subcolumn label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
}

.filter-subcolumn input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.filter-subcolumn input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.acf-field-hidden {
    display: none;
}
.acf-osm-below.leaflet-below {
    display: none;
}

/* Style pour le bouton de suppression d'événement */
.event-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.delete-event {
    background: #dc3232;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.delete-event:hover {
    background: #c42f2f;
    transform: translateY(-1px);
}

.delete-event:active {
    background: #a01a1a;
    transform: translateY(0);
}

.delete-event:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 50, 50, 0.2);
}

a.acf-icon.-plus.acf-js-tooltip.small {
    display: none;
}

.acf-field.acf-field-number,.acf-field.acf-field-date-time-picker {
    min-width: 150px;
}

.acf-field.acf-field-open-street-map {
    min-width: 360px;
}

.acf-field.acf-field-text {
    min-width: 320px;
}