/* =========================================================
   EventChamp Event Map — Plugin Styles
   ========================================================= */

/* ── Wrapper ─────────────────────────────────────────────── */
.ecem-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin-bottom: 2em;
}

/* ── Filter controls ─────────────────────────────────────── */
.ecem-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ecem-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 2px solid #1a1a2e;
    background: #fff;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.12s;
    line-height: 1;
}

.ecem-btn:hover {
    background: #1a1a2e;
    color: #fff;
}

.ecem-btn--active {
    background: #1a1a2e;
    color: #fff;
}

.ecem-btn--active:hover {
    background: #2d2d5e;
}

.ecem-btn:active {
    transform: scale(0.96);
}

.ecem-count {
    margin-left: auto;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ── Map container ───────────────────────────────────────── */
.ecem-map {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dde1ec;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    background: #e8eef4;
    position: relative;
    transition: opacity 0.25s;
}

.ecem-map--loading {
    opacity: 0.55;
    pointer-events: none;
}

.ecem-no-events {
    text-align: center;
    color: #888;
    font-size: 14px;
    padding: 12px;
}

/* ── Custom pin icons ────────────────────────────────────── */
.ecem-pin {
    position: relative;
    width: 28px;
    height: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ecem-pin__dot {
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.30);
    flex-shrink: 0;
}

.ecem-pin--upcoming .ecem-pin__dot {
    background: #2563eb;   /* blue = upcoming */
}

.ecem-pin--past .ecem-pin__dot {
    background: #64748b;   /* slate = past */
}

.ecem-pin__shadow {
    width: 10px;
    height: 4px;
    border-radius: 50%;
    background: rgba(0,0,0,0.18);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Tooltip (hover) ─────────────────────────────────────── */
.ecem-leaflet-tooltip.leaflet-tooltip {
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 0;
    white-space: normal;
    min-width: 200px;
    max-width: 260px;
}

/* Hide the default Leaflet tooltip arrow */
.ecem-leaflet-tooltip.leaflet-tooltip::before {
    display: none;
}

/* ── Popup (click / mobile) ──────────────────────────────── */
.ecem-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 0;
    overflow: hidden;
}
.ecem-leaflet-popup .leaflet-popup-content {
    margin: 0;
    min-width: 200px;
    max-width: 260px;
}
.ecem-leaflet-popup .leaflet-popup-tip-container {
    display: none;
}

/* ── Tooltip / Popup content card ────────────────────────── */
.ecem-tooltip {
    padding: 14px 16px 12px;
    line-height: 1.5;
    font-size: 13px;
}

.ecem-tip__title {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.ecem-tip__table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 4px;
}

.ecem-tip__table tr td {
    padding: 2px 0;
    vertical-align: top;
    color: #333;
    font-size: 13px;
}

.ecem-tip__label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    padding-right: 8px;
    width: 1%;
}

.ecem-tip__value {
    color: #1a1a2e;
}

.ecem-tip__link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    width: 100%;
}

.ecem-tip__link:hover {
    text-decoration: underline;
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 480px) {
    .ecem-controls {
        gap: 6px;
    }
    .ecem-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    .ecem-count {
        width: 100%;
        text-align: left;
        margin-left: 0;
    }
}
