/* MAP STYLES */

@import '/styles-global.css';

html,body{
    height: 100%;
    margin: 0;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

/* MAP HEADER */
.leaflet-top.leaflet-left {
    top: 124px;
}

.map-header {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(20, 20, 23, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid var(--surface-border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    max-width: calc(100vw - 32px);
}

.map-header__full{
    width: 100%;
}

.map-header__accent {
    width: 4px;
    border-radius: 2px;
    background: var(--brand-gradient);
    flex-shrink: 0;
}

.map-header__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.map-header__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.map-header__tagline {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.map-header__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
    font-size: 0.8125rem;
}

.map-header__nav a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.map-header__nav a:hover,
.map-header__nav a:focus-visible {
    border-bottom-color: rgba(252, 176, 69, 0.85);
}

/* DETAILS PANE */
.detail-pane {
    position: fixed;
    top: 16px;
    right: 16px;
    bottom: 16px;
    width: 380px;
    max-width: calc(100vw - 32px);
    z-index: 1100;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Hidden state */
    transform: translateX(calc(100% + 24px));
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-pane.is-open {
    transform: translateX(0);
}

.detail-pane__bar {
    height: 4px;
    width: 100%;
    background: var(--brand-gradient);
    flex-shrink: 0;
}

.detail-pane__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--surface-border);
}

.detail-pane__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.detail-pane__close {
    background: transparent;
    border: 1px solid var(--surface-border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: color 0.15s, border-color 0.15s;
}

.detail-pane__close:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.35);
}

.detail-pane__body {
    padding: 18px 20px 24px;
    overflow-y: auto;
    line-height: 1.55;
    font-size: 0.95rem;
}

.detail-pane__meta {
    margin: 0 0 14px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-pane__desc {
    margin: 0 0 18px;
    color: #d4d4d8;
}

.detail-pane__link {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 5px;
    background: var(--brand-gradient);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

/* INFO CARDS */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-card {
    position: relative;
    padding: 12px 14px 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--surface-border);
    border-left: none;
    border-radius: 6px;
    overflow: hidden;
}

.info-card::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--brand-gradient);
}

.info-card__title {
    margin: 0 0 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.info-card__body > p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-primary);
}

.info-card__line > p:first-of-type {
    margin-top: 4px;
}

/* MOBILE RESPONSIVITY */
@media (max-width: 640px) {
    .detail-pane {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 0;
        border: none;
        transform: translateY(100%);
    }

    .detail-pane.is-open {
        transform: translateY(0);
    }
}


/* RESTYLE BUILT IN FUNCTIONS */
.venue-pin {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
	transform: translate(-2px, -2px);
}

.venue-pin--unvisited {
	background: #52525b;
}

.venue-pin--visited {
	background: var(--brand-gradient);
}

.leaflet-div-icon.venue-marker-icon {
	background: transparent;
	border: none;
}

.leaflet-div-icon.venue-cluster-icon {
	background: transparent;
	border: none;
}

.cluster-badge {
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 0.8rem;
	color: #ffffff;
	border: 2px solid rgba(255, 255, 255, 0.85);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.cluster-badge--unvisited {
	background: #3f3f46;
}

.cluster-badge--visited {
	background: var(--brand-gradient);
}