/* CECAM Multinode Event Popup */

.cecam-event-popup {
    width: 320px;
    max-width: 100%;
    padding: 8px 6px 10px;
    font-family: Arial, sans-serif;
    color: #263238;
    line-height: 1.5;
}

/* Event type */
.cecam-event-category {
    display: inline-block;
    background: #edf3fb;
    color: #4472a9;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 5px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

/* Workshop title */
.cecam-event-popup .cecam-event-title {
    display: block;
    color: #274d83;
    font-family: Arial, sans-serif;
    font-size: 17px !important;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: normal;
    text-decoration: none;
    margin: 0 0 16px;
}

.cecam-event-popup .cecam-event-title:hover {
    color: #4472a9;
    text-decoration: underline;
}

/* Date and location */
.cecam-event-detail {
    font-size: 13px;
    line-height: 1.6;
    color: #54606d;
    margin-bottom: 9px;
    overflow-wrap: anywhere;
}

/* Nodes heading */
.cecam-event-nodes-label {
    margin-top: 18px;
    margin-bottom: 9px;
    padding-top: 12px;
    border-top: 1px solid #e5e9ef;
    font-size: 12px;
    font-weight: 700;
    color: #263238;
}

/* Node badges */
.cecam-event-nodes {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cecam-event-node {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #dce5ee;
    color: #344b67;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 8px;
}

/* Mobile */
@media (max-width: 480px) {
    .cecam-event-popup {
        width: 250px;
    }

    .cecam-event-popup .cecam-event-title {
        font-size: 15px !important;
    }
}

/* Collaboration popup */

.gm-style .cecam-collaboration-popup {
    width: 340px;
    max-width: 100%;
    max-height: 420px;
    overflow-y: auto;
}

.cecam-collaboration-heading {
    font-size: 15px;
    font-weight: 700;
    color: #263238;
    line-height: 1.4;
    margin-bottom: 8px;
}

.cecam-collaboration-count {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

.cecam-collaboration-item {
    padding: 14px 0;
    border-top: 1px solid #e5e9ef;
}

.cecam-collaboration-item:first-of-type {
    border-top: none;
}

.gm-style .cecam-collaboration-item .cecam-event-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px;
}

.cecam-collaboration-item .cecam-event-category {
    margin-bottom: 8px;
}

.cecam-collaboration-item .cecam-event-detail {
    margin-bottom: 0;
}

/* Node marker and label */

.cecam-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.cecam-map-marker img {
    display: block;
}

.cecam-map-marker-label {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;

    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid #dce5ee;
    border-radius: 5px;

    color: #29466a;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;

    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Display on hover or when active */
.cecam-map-marker:hover .cecam-map-marker-label,
.cecam-map-marker.is-active .cecam-map-marker-label {
    display: block;
}


.cecam-map-marker img {
    width: 24px;
    height: auto;
    filter: brightness(0) saturate(100%)
            invert(34%) sepia(25%)
            saturate(1690%) hue-rotate(176deg)
            brightness(94%) contrast(90%);
}

/* CECAM-HQ stays red */
.cecam-map-marker img[src*="smallredmarker"] {
    filter: none;
}

/* Year filter */

.cecam-map-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 25px 0;
}

.cecam-map-filters label {
    font-size: 15px;
    font-weight: 600;
    color: #263238;
    white-space: nowrap;
}

.cecam-map-filters select {
    width: 150px;
    padding: 10px 14px;
    border: 1px solid #dce5ee;
    border-radius: 6px;
    background: #fff;
    color: #29466a;
    font-size: 14px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .cecam-map-filters {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Reset Map button */

.cecam-map-reset {
    padding: 10px 18px;
    background: #4472a9;
    border: 1px solid #4472a9;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cecam-map-reset:hover {
    background: #315b8b;
    color: #fff;
}

.cecam-map-reset:focus-visible {
    outline: 3px solid #89b6e3;
    outline-offset: 2px;
}

/* Collaboration statistics */

.cecam-map-stats {
    padding: 12px 16px;
    margin-bottom: 18px;
    background: #f1f5fa;
    border-left: 4px solid #4472a9;
    border-radius: 4px;
    color: #344b67;
    font-size: 14px;
    font-weight: 500;
}

/* Active collaborating nodes */

.cecam-active-nodes {
    margin: 10px 0 30px;
}

.cecam-active-nodes-title {
    font-size: 17px;
    font-weight: 700;
    color: #263238;
    margin-bottom: 6px;
}

.cecam-active-nodes p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
}

.cecam-active-nodes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.cecam-active-node {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    padding: 9px 13px;
    background: #fff;
    border: 1px solid #dce5ee;
    border-radius: 7px;

    color: #344b67;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;

    transition: all 0.2s ease;
}

.cecam-active-node:hover {
    background: #edf3fb;
    border-color: #4472a9;
    color: #274d83;
}

.cecam-active-node.is-selected {
    background: #4472a9;
    border-color: #4472a9;
    color: white;
}

.cecam-active-node-count {
    padding: 2px 7px;
    border-radius: 12px;
    background: #edf3fb;
    color: #4472a9;
    font-size: 11px;
    font-weight: 700;
}

.cecam-active-node.is-selected .cecam-active-node-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}