/*
Theme Name: Twenty Twenty-Five Child
Theme URI: https://example.com
Description: Thème enfant de Twenty Twenty-Five
Author: Ton Nom
Template: twentytwentyfive
Version: 1.0.0
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/* ==========================================================
   MAP LAYOUT
   ========================================================== */

.leaflet-map-wrapper {
    position: relative;
    width: 100%;
}

.leaflet-map-container {
    width: 100%;
    height: calc(100vh - 200px);
    overflow: hidden;
}

/* ==========================================================
   MAP FILTERS CONTAINER
   ========================================================== */

.leaflet-map-filters {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}

/* ==========================================================
   FILTER BUTTON
   ========================================================== */

.leaflet-map-filter-cat {
    /* Color variables */
    --alpha: 1;
    --alpha-hover: 0.9;
    --alpha-active-hover: 0.08;

    background-color: rgba(var(--cat-rgb, black), var(--alpha));
    color: #fff;
    border: 1px solid transparent;

    border-radius: 22px;
    padding: 0 10px;
    min-width: 44px;
    min-height: 22px;

    font-size: 0.6em;
    font-weight: 500;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    user-select: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

/* Active state */

.leaflet-map-filter-cat.is-active {
    background-color: #fff;
    color: rgb(var(--cat-rgb, black));
    border-color: rgba(var(--cat-rgb, black), 0.4);
}

/* Hover states (desktop only) */

@media (hover: hover) and (pointer: fine) {

    .leaflet-map-filter-cat:hover:not(.is-active) {
        background-color: rgba(var(--cat-rgb, black), var(--alpha-hover));
    }

    .leaflet-map-filter-cat.is-active:hover {
        background-color: rgba(var(--cat-rgb, black), var(--alpha-active-hover));
    }
}

/* Focus & disabled */

.leaflet-map-filter-cat:focus {
    outline: none;
}

.leaflet-map-filter-cat:focus-visible {
    box-shadow: inset 0 0 0 2px rgb(var(--cat-rgb, black));
}

.leaflet-map-filter-cat:disabled {
    background-color: rgba(var(--cat-rgb, black), 0.06);
    color: rgb(var(--cat-rgb, black));
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================
   LEAFLET POPUPS
   ========================================================== */

.leaflet-popup-content-wrapper {
    border-radius: 5px;
}

.leaflet-popup-content {
    margin: 0;
}

/* Popup structure */

.leaflet-map-popup-category {
    border-radius: 5px;
    overflow: hidden;
}

.leaflet-map-popup-category-name {
    padding: 5px 10px;
    font-weight: bold;
    color: #fff;
    background-color: var(--cat-rgb, black);
}

.leaflet-map-popup-content {
    padding: 5px 10px;
}

.leaflet-map-popup-title {
    margin: 0 0 5px;
    font-size: 1.2em;
}

.leaflet-map-popup-image {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================================
   LEAFLET OVERRIDES
   ========================================================== */

.leaflet-container a.leaflet-popup-close-button {
    color: #fff;
}

.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
    color: rgba(255, 255, 255, 0.8);
}
