/*
 * NaviGAYs Public Submissions — Location and Map
 */

.ngps-shell [data-ngps-location-step] {
    position: relative;
}

.ngps-shell [data-ngps-event-location-panel][hidden],
.ngps-shell [data-ngps-organizer-block][hidden],
.ngps-shell [data-ngps-event-venue-mode-block][hidden],
.ngps-shell [data-ngps-event-venue-field][hidden],
.ngps-shell [data-ngps-location-summary][hidden],
.ngps-shell [data-ngps-organizer-summary][hidden],
.ngps-shell [data-ngps-organizer-location-note][hidden],
.ngps-shell [data-ngps-map-overlay][hidden] {
    display: none !important;
}

.ngps-shell .ngps-location-panel {
    position: relative;
    margin-top: 20px;
    padding: 22px;
    border: 1px solid rgba(83, 28, 59, 0.11);
    border-radius: 22px;
    background:
            linear-gradient(
                    145deg,
                    rgba(255, 255, 255, 0.99),
                    rgba(255, 248, 252, 0.96)
            );
    box-shadow:
            0 15px 42px
            rgba(68, 4, 39, 0.055);
}

.ngps-shell .ngps-location-panel:first-of-type {
    margin-top: 0;
}

.ngps-shell .ngps-location-panel__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.ngps-shell
.ngps-location-panel__heading
> div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-width: 0;
}

.ngps-shell .ngps-location-panel__heading h3,
.ngps-shell
.ngps-venue-mode-block
.ngps-inline-heading h3 {
    margin: 0;
    color: var(--ngps-ink, #2b071b);
    font-size: 17px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.ngps-shell .ngps-location-panel__heading p,
.ngps-shell
.ngps-venue-mode-block
.ngps-inline-heading p {
    margin: 5px 0 0;
    color: var(--ngps-muted, #74717a);
    font-size: 13px;
    line-height: 1.65;
}

.ngps-shell .ngps-location-panel__number {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    border: 1px solid rgba(221, 28, 108, 0.12);
    border-radius: 12px;
    background: rgba(221, 28, 108, 0.09);
    color: var(--ngps-pink, #dd1c6c);
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.ngps-shell .ngps-field-help {
    display: block;
    margin-top: 1px;
    color: var(--ngps-muted, #74717a);
    font-size: 11.5px;
    line-height: 1.55;
}

.ngps-shell .ngps-choice-grid {
    display: grid;
    gap: 12px;
    margin-top: 17px;
}

.ngps-shell .ngps-choice-grid--2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.ngps-shell .ngps-choice-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    min-height: 112px;
    padding: 17px;
    border: 1px solid rgba(83, 28, 59, 0.13);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    cursor: pointer;
    transition:
            transform 180ms ease,
            border-color 180ms ease,
            background-color 180ms ease,
            box-shadow 180ms ease;
}

.ngps-shell .ngps-choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(221, 28, 108, 0.3);
    box-shadow:
            0 12px 28px
            rgba(95, 7, 53, 0.07);
}

.ngps-shell .ngps-choice-card:focus-within {
    border-color: var(--ngps-pink, #dd1c6c);
    outline: 3px solid rgba(221, 28, 108, 0.14);
    outline-offset: 2px;
}

.ngps-shell .ngps-choice-card.is-selected {
    border-color: var(--ngps-pink, #dd1c6c);
    background:
            linear-gradient(
                    145deg,
                    #ffffff,
                    rgba(255, 237, 246, 0.94)
            );
    box-shadow:
            0 14px 34px
            rgba(126, 0, 62, 0.11);
}

.ngps-shell
.ngps-choice-card
input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.ngps-shell .ngps-choice-card__indicator {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid rgba(83, 28, 59, 0.2);
    border-radius: 999px;
    background: #ffffff;
    transition:
            border-color 180ms ease,
            background-color 180ms ease;
}

.ngps-shell
.ngps-choice-card__indicator::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: inherit;
    background: #ffffff;
    opacity: 0;
    transform: scale(0.6);
    transition:
            opacity 180ms ease,
            transform 180ms ease;
}

.ngps-shell
.ngps-choice-card.is-selected
.ngps-choice-card__indicator {
    border-color: var(--ngps-pink, #dd1c6c);
    background: var(--ngps-pink, #dd1c6c);
}

.ngps-shell
.ngps-choice-card.is-selected
.ngps-choice-card__indicator::after {
    opacity: 1;
    transform: scale(1);
}

.ngps-shell .ngps-choice-card__copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.ngps-shell .ngps-choice-card__copy strong {
    color: var(--ngps-ink, #2b071b);
    font-size: 13.5px;
    font-weight: 900;
    line-height: 1.4;
}

.ngps-shell .ngps-choice-card__copy small {
    color: var(--ngps-muted, #74717a);
    font-size: 11.75px;
    line-height: 1.6;
}

.ngps-shell .ngps-organizer-block,
.ngps-shell .ngps-venue-mode-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(83, 28, 59, 0.09);
}

.ngps-shell .ngps-organizer-summary,
.ngps-shell .ngps-location-summary {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 15px;
    padding: 13px 14px;
    border: 1px solid rgba(21, 128, 61, 0.16);
    border-radius: 15px;
    background: rgba(21, 128, 61, 0.055);
}

.ngps-shell .ngps-organizer-summary__icon,
.ngps-shell .ngps-location-summary__icon {
    display: inline-grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 999px;
    background: rgba(21, 128, 61, 0.12);
    color: var(--ngps-success, #15803d);
    font-size: 12px;
    font-weight: 900;
}

.ngps-shell .ngps-organizer-summary > div,
.ngps-shell .ngps-location-summary > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ngps-shell .ngps-organizer-summary strong,
.ngps-shell .ngps-location-summary strong {
    color: #14532d;
    font-size: 12.5px;
    font-weight: 900;
    line-height: 1.4;
}

.ngps-shell .ngps-organizer-summary small,
.ngps-shell .ngps-location-summary small {
    color: #3f6f50;
    font-size: 11.5px;
    line-height: 1.55;
}

.ngps-shell .ngps-locked-note {
    display: flex;
    align-items: flex-start;
    gap: 8px 12px;
    margin-top: 17px;
    padding: 13px 15px;
    border: 1px solid rgba(37, 99, 235, 0.17);
    border-radius: 15px;
    background: rgba(37, 99, 235, 0.055);
    color: #1e3a8a;
    font-size: 11.75px;
    line-height: 1.55;
}

.ngps-shell .ngps-locked-note strong {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 900;
}

.ngps-shell
.ngps-field
input[readonly]:not(:disabled) {
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(239, 246, 255, 0.72);
    color: #334155;
    cursor: default;
}

.ngps-shell
.ngps-location-panel__heading--map {
    align-items: center;
}

.ngps-shell .ngps-map-toolbar {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ngps-shell .ngps-map-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 13px;
    border: 1px solid rgba(83, 28, 59, 0.13);
    border-radius: 10px;
    background: #ffffff !important;
    color: #55142f !important;
    font: inherit;
    cursor: pointer;
    transition:
            border-color 160ms ease,
            background-color 160ms ease,
            color 160ms ease,
            transform 160ms ease;
}

.ngps-shell .ngps-map-tool span {
    font-size: 15px;
    line-height: 1;
}

.ngps-shell .ngps-map-tool strong {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.ngps-shell
.ngps-map-tool:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(221, 28, 108, 0.35);
    background: var(--ngps-pink-soft, #fff1f6);
    color: var(--ngps-pink-dark, #8b174d);
}

.ngps-shell .ngps-map-tool:focus-visible {
    outline: 3px solid rgba(221, 28, 108, 0.15);
    outline-offset: 2px;
}

.ngps-shell .ngps-map-tool:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.ngps-shell .ngps-map-tool.is-loading {
    pointer-events: none;
}

.ngps-shell .ngps-map-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--ngps-line, #e6e1e5);
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
            0 14px 38px
            rgba(31, 13, 24, 0.07);
}

.ngps-shell .ngps-map-instruction {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 3px;
    margin: 0 0 10px;
    padding: 11px 13px;
    border: 1px solid rgba(109, 24, 61, .18);
    border-radius: 12px;
    background: #6d183d;
    color: #fff;
}

.ngps-shell .ngps-map-instruction strong {
    font-size: 11.5px;
}

.ngps-shell .ngps-map-instruction span {
    font-size: 10.5px;
    line-height: 1.5;
    opacity: .9;
}

.ngps-shell .ngps-coordinate-fields {
    margin-top: 12px;
}

.ngps-shell .ngps-map-stage {
    position: relative;
    min-height: 440px;
    background: #edf2f7;
}

.ngps-shell .ngps-map {
    z-index: 1;
    width: 100%;
    height: 440px;
    min-height: 440px;
    background:
            linear-gradient(
                    145deg,
                    #eef2f7,
                    #e3e9f0
            );
}

.ngps-shell .ngps-map-overlay {
    position: absolute;
    z-index: 700;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
            linear-gradient(
                    145deg,
                    rgba(245, 247, 250, 0.9),
                    rgba(233, 238, 245, 0.86)
            );
    backdrop-filter: blur(3px);
    text-align: center;
}

.ngps-shell .ngps-map-overlay > div {
    display: grid;
    gap: 6px;
    max-width: 380px;
    padding: 20px 22px;
    border: 1px solid rgba(83, 28, 59, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow:
            0 16px 42px
            rgba(30, 16, 24, 0.09);
}

.ngps-shell .ngps-map-overlay strong {
    color: var(--ngps-ink, #2b071b);
    font-size: 14px;
    font-weight: 900;
}

.ngps-shell .ngps-map-overlay span {
    color: var(--ngps-muted, #74717a);
    font-size: 11.75px;
    line-height: 1.6;
}

.ngps-shell .ngps-map-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-top: 1px solid var(--ngps-line, #e6e1e5);
    background: #ffffff;
}

.ngps-shell
.ngps-map-card__footer > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ngps-shell
.ngps-map-card__footer
> div > strong {
    color: var(--ngps-ink, #2b071b);
    font-size: 12px;
    font-weight: 900;
}

.ngps-shell .ngps-map-card__footer p {
    margin: 0;
    color: var(--ngps-muted, #74717a);
    font-size: 11.5px;
    line-height: 1.55;
}

.ngps-shell
.ngps-map-card__footer > strong {
    flex: 0 0 auto;
    color: var(--ngps-pink-dark, #8b174d);
    font-family:
            ui-monospace,
            SFMono-Regular,
            Menlo,
            Monaco,
            Consolas,
            monospace;
    font-size: 11px;
    font-weight: 850;
    text-align: right;
}

.ngps-shell .ngps-location-map-status {
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 11.75px;
    font-weight: 750;
    line-height: 1.5;
}

.ngps-shell
.ngps-location-map-status.is-pending,
.ngps-shell
.ngps-location-map-status.is-ready {
    border-color: rgba(37, 99, 235, 0.16);
    background: rgba(37, 99, 235, 0.055);
    color: #1d4ed8;
}

.ngps-shell
.ngps-location-map-status.is-success {
    border-color: rgba(21, 128, 61, 0.18);
    background: rgba(21, 128, 61, 0.06);
    color: #166534;
}

.ngps-shell
.ngps-location-map-status.is-warning {
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.07);
    color: #92400e;
}

.ngps-shell
.ngps-location-map-status.is-error {
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.065);
    color: #991b1b;
}

.ngps-shell
.ngps-location-map-status.is-locked {
    border-color: rgba(37, 99, 235, 0.18);
    background: rgba(239, 246, 255, 0.9);
    color: #1e3a8a;
}

/* Leaflet controls */

.ngps-shell
.ngps-map .leaflet-container,
.ngps-shell
.ngps-map.leaflet-container {
    font-family: var(--ngps-font, inherit);
}

.ngps-shell
.ngps-map .leaflet-control-zoom,
.ngps-shell
.ngps-map .leaflet-control-layers,
.ngps-shell
.ngps-map .leaflet-control-scale-line {
    border: 0;
    box-shadow:
            0 8px 24px
            rgba(15, 23, 42, 0.15);
}

.ngps-shell
.ngps-map .leaflet-control-zoom {
    overflow: hidden;
    border-radius: 12px;
}

.ngps-shell
.ngps-map .leaflet-control-zoom a {
    border-color: var(--ngps-line, #e6e1e5);
    background: rgba(255, 255, 255, 0.96);
    color: var(--ngps-ink, #2b071b);
}

.ngps-shell
.ngps-map .leaflet-control-zoom a:hover {
    background: var(--ngps-pink-soft, #fff1f6);
    color: var(--ngps-pink-dark, #8b174d);
}

.ngps-shell
.ngps-map .leaflet-control-layers {
    overflow: hidden;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.96);
}

.ngps-shell
.ngps-map .leaflet-control-layers-expanded {
    padding: 10px 12px;
    color: var(--ngps-ink-soft, #4b243a);
    font-size: 11px;
    font-weight: 750;
}

.ngps-shell
.ngps-map .leaflet-control-attribution {
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.82);
    font-size: 8.5px;
}

.ngps-shell .ngps-map-marker-host {
    border: 0;
    background: transparent;
}

.ngps-shell .ngps-map-marker {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 4px solid #ffffff;
    border-radius: 50% 50% 50% 8px;
    background:
            linear-gradient(
                    145deg,
                    var(--ngps-pink, #dd1c6c),
                    var(--ngps-pink-dark, #8b174d)
            );
    box-shadow:
            0 10px 24px
            rgba(91, 8, 52, 0.32);
    transform: rotate(-45deg);
}

.ngps-shell .ngps-map-marker > span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ffffff;
    transform: rotate(45deg);
}

/* Full-screen map */

html.ngps-map-fullscreen-open,
html.ngps-map-fullscreen-open body {
    overflow: hidden !important;
}

.ngps-shell
.ngps-map-card.is-fullscreen {
    position: fixed;
    z-index: 999999;
    inset: 12px;
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    box-shadow:
            0 28px 80px
            rgba(15, 23, 42, 0.35);
}

.ngps-shell
.ngps-map-card.is-fullscreen
.ngps-map-stage,
.ngps-shell
.ngps-map-card.is-fullscreen
.ngps-map {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
}

@media (max-width: 900px) {
    .ngps-shell
    .ngps-location-panel__heading--map {
        align-items: flex-start;
        flex-direction: column;
    }

    .ngps-shell .ngps-map-toolbar {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .ngps-shell .ngps-location-panel {
        padding: 17px;
        border-radius: 18px;
    }

    .ngps-shell .ngps-choice-grid--2 {
        grid-template-columns: 1fr;
    }

    .ngps-shell .ngps-choice-card {
        min-height: 0;
    }

    .ngps-shell
    .ngps-location-panel__heading {
        gap: 12px;
        margin-bottom: 17px;
    }

    .ngps-shell .ngps-map-toolbar {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .ngps-shell .ngps-map-tool {
        min-width: 0;
        padding-inline: 8px;
    }

    .ngps-shell
    .ngps-map-tool strong {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ngps-shell .ngps-map-stage,
    .ngps-shell .ngps-map {
        height: 350px;
        min-height: 350px;
    }

    .ngps-shell
    .ngps-map-card__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .ngps-shell
    .ngps-map-card__footer > strong {
        text-align: left;
    }

    .ngps-shell .ngps-locked-note {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .ngps-shell .ngps-location-panel {
        padding: 15px;
    }

    .ngps-shell .ngps-map-toolbar {
        grid-template-columns: 1fr;
    }

    .ngps-shell .ngps-map-tool {
        width: 100%;
    }

    .ngps-shell .ngps-map-stage,
    .ngps-shell .ngps-map {
        height: 300px;
        min-height: 300px;
    }

    .ngps-shell
    .ngps-map-card.is-fullscreen {
        inset: 5px;
        border-radius: 13px;
    }

    .ngps-shell .ngps-map-overlay {
        padding: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ngps-shell .ngps-choice-card,
    .ngps-shell .ngps-map-tool {
        transition: none;
    }
}
