:root {
  --animate-duration: 0.32s;
  --loiter-enter-duration: 0.42s;
  --loiter-exit-duration: 0.30s;
  --loiter-ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);
  --loiter-ease-snappy: cubic-bezier(0.4, 0, 0.2, 1);
  --picker-arrow-right: 8px;
  --orange-grad-start: #ff7a00;
  --orange-grad-end: #ffad4d;
  --top-filter-height: 45px;
  --top-filter-gap: 10px;
}

.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: url('images/map_back.jpg') no-repeat center center;
    background-size: cover;
}

body {
    color: #000;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px 10px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.container {

    max-width: 680px;
    margin: 0 auto;

    background: linear-gradient(92.5deg,
            rgba(44, 104, 177, 0.65) 0%,
            rgba(44, 104, 177, 0.65) 50%,
            rgba(87, 128, 178, 0.35) 100%);

    border-top-left-radius:  52px;
    border-top-right-radius: 5px;
    
    border-bottom-left-radius:  5px;
    border-bottom-right-radius: 5px;

    padding: 32px 34px 32px 38px;
    padding-bottom: 12px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
}

.container-resize-handle {
    position: absolute;
    top: 0;
    right: -7px;
    bottom: 0;
    width: 14px;
    cursor: ew-resize;
    z-index: 40;
    touch-action: none;
}

.container-resize-handle::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 6px;
    width: 2px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.14s ease, box-shadow 0.14s ease;
}

.container-resize-handle:hover::before {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

body.container-resizing,
body.container-resizing * {
    user-select: none !important;
    cursor: ew-resize !important;
}

@media (max-width: 720px), (pointer: coarse) {
    .container-resize-handle {
        display: none;
    }
}

.header {
    display: flex;
    align-items: center;
    margin: 0;
}

.header-display-shell {
    display: block;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border: 0;
    border-top-left-radius: 20px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 16px 16px 22px 20px;
    margin-top: 10px;
    margin-bottom: var(--top-filter-gap);
    box-sizing: border-box;
}

.header .loiter_logo {
    width: 70px;
    height: 70px;
    margin-left: -4px;
    margin-right: 8px;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.1));
}

.header-text {
    position: relative;
    flex: 1;
    margin-top: 3px;
    padding-right: 64px;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.header-actions-stack {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
}

.header h1 {

    margin: 0;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 0.92;
    color: white;
    display: inline-block;

    white-space: nowrap;
    text-shadow:
        0 1px 0 rgba(18, 36, 58, 0.35),
        0 8px 18px rgba(0, 0, 0, 0.22);
    opacity: 0;
    animation: headerTitleIn 250ms ease-out forwards;
    animation-delay: 80ms;
}

@keyframes headerTitleIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.share-page-btn,
.settings-panel-btn {
    width: 28px;
    height: 28px;
    margin-top: 0;
    margin-right: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.share-page-btn img,
.settings-panel-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0.62;
    transition: opacity 0.18s ease;
}

.share-page-btn:hover img,
.share-page-btn:focus-visible img,
.settings-panel-btn:hover img,
.settings-panel-btn:focus-visible img {
    opacity: 0.85;
}

.settings-panel {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border-radius: 5px;
    border: 0;
    box-shadow: none;
    transition: max-height 0.26s var(--loiter-ease-smooth), opacity 0.2s ease, padding-top 0.2s ease, padding-bottom 0.2s ease, margin-bottom 0.2s ease;
}

.settings-panel.open {
    max-height: 300px;
    opacity: 1;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(44, 104, 177, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.settings-panel-inner {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.settings-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.settings-action-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(to right, rgb(44, 104, 177), rgb(74, 134, 207));
    color: #ffffff;
    min-height: 42px;
    padding: 9px 14px 9px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.settings-action-btn:hover,
.settings-action-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
    outline: none;
}

.settings-action-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex: 0 0 auto;
    opacity: 0.98;
}

#settings-contact-btn {
    grid-column: 1 / -1;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(10, 24, 38, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.16s ease;
}

.contact-modal.active {
    opacity: 1;
}

.contact-modal-card {
    width: min(430px, 100%);
    background: linear-gradient(92.5deg,
            rgba(44, 104, 177, 0.16) 0%,
            rgba(44, 104, 177, 0.16) 50%,
            rgba(87, 128, 178, 0.10) 100%), #f5f8fc;
    border: 1px solid rgba(105, 138, 171, 0.48);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30);
    padding: 24px 24px 16px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.16s ease;
}

.contact-modal.active .contact-modal-card {
    transform: translateY(0) scale(1);
}

.contact-modal-icon {
    width: 68px;
    height: 68px;
    object-fit: contain;
    display: block;
    margin: 0;
    opacity: 0.88;
}

.contact-modal-message {
    margin: 0;
    color: #2d4b68;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.contact-modal-message a {
    color: #1f5ea7;
    text-decoration: underline;
    font-weight: 700;
}

.contact-modal-actions {
    margin-top: 0;
    display: flex;
    justify-content: center;
}

.contact-modal-close-btn {
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    color: #ffffff;
    min-height: 40px;
    padding: 8px 18px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.welcome-modal {
    position: fixed;
    inset: 0;
    z-index: 1210;
    background: rgba(17, 36, 58, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 24px 20px;
    opacity: 0;
    transition: opacity 0.22s var(--loiter-ease-smooth);
}

.welcome-modal.active {
    opacity: 1;
}

.welcome-modal-card {
    width: min(640px, 100%);
    box-sizing: border-box;
    max-height: min(86vh, 760px);
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    --welcome-strip-height: 25px;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) calc(100% - var(--welcome-strip-height)),
            rgba(242, 106, 0, 0.62) calc(100% - var(--welcome-strip-height)),
            rgba(255, 155, 54, 0.78) 100%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fdfdff 48%,
            #f8faff 100%
        );
    border: none;
    border-top-left-radius: 42px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 0 18px 46px rgba(14, 33, 52, 0.28), 0 4px 14px rgba(14, 33, 52, 0.14);
    padding: 24px 34px 34px 34px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0.95;
    --welcome-scale: 1;
    transform: translateY(10px) scale(calc(var(--welcome-scale) * 0.98));
    transform-origin: center center;
    transition: transform 0.24s var(--loiter-ease-smooth), opacity 0.2s ease;
}

.welcome-modal.active .welcome-modal-card {
    opacity: 1;
    transform: translateY(0) scale(var(--welcome-scale));
}

.welcome-modal-banner {
    width: min(100%, 440px);
    height: auto;
    aspect-ratio: 512 / 117;
    object-fit: contain;
    display: block;
    margin: 16px auto 8px auto;
    opacity: 0.96;
    filter: drop-shadow(0 4px 8px rgba(14, 33, 52, 0.20));
}

.welcome-modal-subheading {
    margin: 0;
    color: #798690;
    font-family: 'Chivo', 'Inter', sans-serif;
    font-size: 22px;
    line-height: 1.34;
    font-weight: 800;
    text-align: center;
}

.welcome-modal-message {
    margin: 0;
    color: #828282;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.47;
    font-weight: 400;
    text-align: left;
}

.welcome-modal-message + .welcome-modal-message {
    margin-top: 6px;
}

.welcome-modal-message a {
    color: #798690;
    text-decoration: underline;
    font-weight: 600;
}

.welcome-modal-actions {
    margin-top: 14px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.welcome-modal-close-btn {
    border: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    color: #ffffff;
    min-height: 40px;
    padding: 10px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

@media (min-width: 601px) {
    .welcome-modal-card {
        --welcome-strip-height: 34px;
    }
}

@media (max-width: 600px) {
    .welcome-modal {
        padding: 10px;
    }

    .welcome-modal-card {
        width: min(96vw, 640px);
        max-height: none;
        padding: 16px 16px 22px 16px;
        gap: 10px;
    }

    .welcome-modal-banner {
        width: min(100%, 420px);
        margin: 12px auto 6px auto;
    }

    .welcome-modal-subheading {
        font-size: 22px;
        line-height: 1.24;
    }

    .welcome-modal-message {
        font-size: 16.25px;
        line-height: 1.34;
    }

    .welcome-modal-message + .welcome-modal-message {
        margin-top: 4px;
    }

    .welcome-modal-actions {
        margin-top: 8px;
        margin-bottom: 22px;
    }

    .welcome-modal-close-btn {
        min-height: 34px;
        padding: 8px 18px;
        font-size: 16.5px;
    }

    .report-modal {
        padding: 10px;
    }

    .report-card {
        width: min(96vw, 640px);
        max-height: none;
        padding: 16px 16px 22px 16px;
    }

}

.powered-by {

    margin-top: -1.5px;
    margin-bottom: 0;
    padding-left: 1px;
    line-height: 1;
    letter-spacing: 0.9px;
    transform: scaleY(0.8);
    font-size: 19px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #f7f7ff;
    opacity: 0.85;
    white-space: nowrap;
}

.btn-base,
.region-select,
.download-btn {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: bold;
    line-height: 1.4;
    color: white;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 44px;
    display: block;
    width: 100%;
    margin: 12px auto;
    box-sizing: border-box;
}

.btn-base:hover,
.region-select:hover,
.download-btn:hover,
.btn-base:focus,
.region-select:focus,
.download-btn:focus {
    transform: translateY(-3px);
    outline: none;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
    flex: 0 0 auto;
}

#use-my-location {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.try-again-btn-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: inline-block;
    flex: 0 0 auto;
}

.status-box {
    padding: 9px 9px;
    margin: 32px auto;
    border-radius: 14px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    text-align: center;
    line-height: 1.2;
    background: #bcdcff;
    background: linear-gradient(145deg, #6ab0ff, #4a90e2);
    border: 0px solid #ffffff;
    max-width: 90%;
    box-sizing: border-box;
}

.scroll-to-top-btn {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    z-index: 900;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.2s var(--loiter-ease-smooth), box-shadow 0.2s ease;
}

.scroll-to-top-btn.is-visible {
    opacity: 0.96;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.scroll-to-top-btn:hover,
.scroll-to-top-btn:focus-visible {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
    transform: translateY(-1px) scale(1.02);
    outline: none;
}

.location-display,
.timing-filter {
    min-height: var(--top-filter-height);
    height: var(--top-filter-height);
}

.location-display {

    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    gap: 6px;

    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border-color: rgba(44, 104, 177, 0.65);
    border-width: 2px;

    border-radius: 24px;
    padding: 4px 16px 5px 16px;
    margin: 0 0 var(--top-filter-gap) 0;

    flex-wrap: nowrap !important;
    color: white;
    font-size: 17px;
    font-weight: 500;
    box-sizing: border-box;

    overflow: hidden;
    max-height: 72px;
    opacity: 1;
    transform: translateY(0);
    transition:
        max-height 0.28s var(--loiter-ease-smooth),
        opacity 0.2s ease,
        transform 0.22s ease,
        margin-bottom 0.22s ease,
        padding-top 0.22s ease,
        padding-bottom 0.22s ease,
        border-width 0.22s ease;
}

.location-display.region-panel-open .picker-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.location-display.region-panel-open {
    margin-bottom: 0;
}

.location-display.favorites-collapsed {
    max-height: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    transform: translateY(-8px);
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    min-height: 0 !important;
    pointer-events: none;
}

.icon-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#location-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin-top: -1px;
    margin-left: 1px;
    transition: opacity 0.3s ease;
}

#location-icon.error {
    filter: drop-shadow(0 0 2px rgba(255, 60, 60, 0.8));
}

#location-icon.location-spinner {
    animation: spin 1.1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#location-text {
    color: white !important;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin-top: 1px;
    margin-left: 0;
    margin-right: 28px;
}

.quick-location-picker {
    flex: 1 1 auto;
    height: 32px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 0 0 4px;
    min-width: 0;
    overflow: visible;
    background: transparent !important;

    /*background:#afc737;*/
}

.location-picker-column {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.location-feedback-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: -3px;
    margin-right: 4px;
}

.quick-location-picker.favorites-hidden {
    display: none !important;
    width: 0 !important;
    flex: 0 0 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

.quick-location-picker:hover,
.quick-location-picker:focus-within {
    background: transparent !important;
    transform: translateY(-1px);
}

.quick-region-select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    z-index: 2;

    /*background:#ff6f00;*/
}

.picker-arrow {
    position: absolute;
    right: var(--picker-arrow-right);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('images/down_button.png') no-repeat center / contain;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.9;
    margin: 0;
    transition: transform 0.2s ease;
}

.region-options-panel {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 6px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.22s var(--loiter-ease-smooth), opacity 0.18s ease, transform 0.18s ease, margin-bottom 0.18s ease;
}

.region-options-panel.open {
    max-height: 240px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 4px;
    margin-bottom: var(--top-filter-gap);
    padding: 10px;
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border: 1px solid rgba(44, 104, 177, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.region-option {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(to right, rgb(44, 104, 177), rgb(74, 134, 207));
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    min-height: 42px;
    padding: 9px 14px 9px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.region-option-postcodes {
    font-size: 13px;
    font-weight: 400;
    color: inherit;
    opacity: 0.75;
    margin-left: 0.35em;
}

.region-option:hover,
.region-option:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
    outline: none;
}

.region-option.is-selected::after {
    content: "";
    margin-left: auto;
    width: 16px;
    height: 16px;
    background: url('images/tick.png') no-repeat center / contain;
    flex-shrink: 0;
}

.quick-region-select option {
    background: #2c68b1;
    color: white;
    font-size: 16px;
    padding: 10px;
}

/* ── Timing Filter ──────────────────────────────────────────────── */

.timing-filter {

    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));

    border-radius: 24px;
    padding: 4px 16px 5px 16px;
    margin: 0 0 var(--top-filter-gap) 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--loiter-ease-smooth), transform 0.3s var(--loiter-ease-smooth);
}

.type-filter {
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border-radius: 24px;
    padding: 4px 16px 5px 16px;
    margin: 0 0 var(--top-filter-gap) 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--loiter-ease-smooth), transform 0.3s var(--loiter-ease-smooth);
}

.when-filter-icon,
.type-filter-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-top: -1px;
    margin-left: 1px;
    transition: opacity 0.3s ease;
}

.timing-filter[style*="display: flex"],
.type-filter[style*="display: flex"] {
    opacity: 1;
    transform: translateY(0);
}

.filter-label {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 17px;
}

.timing-filter-display {
    color: white !important;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    padding: 3px 0 3px 4px;
    cursor: pointer;
    min-height: 32px;
    flex: 1 1 auto;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    padding-right: 32px;
    transition: transform 0.2s ease;
}

.timing-filter-display:hover,
.timing-filter-display:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.timing-picker-arrow {
    position: absolute;
    right: var(--picker-arrow-right);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('images/down_button.png') no-repeat center / contain;
    flex-shrink: 0;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.timing-filter.timing-panel-open .timing-picker-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.timing-filter.timing-panel-open {
    margin-bottom: 0;
}

.timing-options-panel {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 6px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.22s var(--loiter-ease-smooth), opacity 0.18s ease, transform 0.18s ease, margin-bottom 0.18s ease;
}

.timing-options-panel.open {
    max-height: 380px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 4px;
    margin-bottom: var(--top-filter-gap);
    padding: 10px;
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border: 1px solid rgba(44, 104, 177, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.timing-option {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(to right, rgb(44, 104, 177), rgb(74, 134, 207));
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 700;
    min-height: 42px;
    padding: 9px 14px 9px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.timing-option:hover,
.timing-option:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.05);
    outline: none;
}

.timing-option.is-selected::after {
    content: "";
    margin-left: auto;
    width: 16px;
    height: 16px;
    background: url('images/tick.png') no-repeat center / contain;
    flex-shrink: 0;
}

.timing-option-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.type-filter-display {
    color: white !important;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    padding: 3px 0 3px 4px;
    cursor: pointer;
    min-height: 32px;
    flex: 1 1 auto;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: relative;
    padding-right: 32px;
    transition: transform 0.2s ease;
}

.type-filter-display:hover,
.type-filter-display:focus-visible {
    transform: translateY(-1px);
    outline: none;
}

.type-picker-arrow {
    position: absolute;
    right: var(--picker-arrow-right);
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('images/down_button.png') no-repeat center / contain;
    flex-shrink: 0;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.type-filter.type-panel-open .type-picker-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.type-filter.type-panel-open {
    margin-bottom: 0;
}

.type-options-panel {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: grid;
    gap: 6px;
    height: 0;
    opacity: 0;
    transform: translateY(-6px);
    overflow: hidden;
    pointer-events: none;
    transition: height 0.22s var(--loiter-ease-smooth), opacity 0.18s ease, transform 0.18s ease, margin-bottom 0.18s ease;
}

.type-options-panel.open {
    height: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-top: 4px;
    margin-bottom: var(--top-filter-gap);
    padding: 10px;
    background: linear-gradient(to right, rgba(44, 104, 177, 0.2), rgba(44, 104, 177, 0.05));
    border: 1px solid rgba(44, 104, 177, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.type-options-select-all {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin: 0;
    border-radius: 6px;
    background: linear-gradient(to right, #ff823a, #ff9500);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.type-options-select-all input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1f74d8;
    cursor: pointer;
    flex: 0 0 auto;
}

.type-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.type-option {
    border-radius: 6px;
    background: linear-gradient(to right, rgb(44, 104, 177), rgb(74, 134, 207));
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    min-height: 0;
    padding: 12px 16px 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.16s ease, filter 0.16s ease;
    position: relative;
    overflow: hidden;
}

.type-option:hover,
.type-option:focus-within {
    transform: translateY(-1px);
    filter: brightness(1.05);
    outline: none;
}

.type-option-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #1f74d8;
    cursor: pointer;
    flex: 0 0 auto;
}

.type-option-label {
    line-height: 1.2;
    min-width: 0;
}

.type-option-strip {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    border-radius: 0 6px 6px 0;
    pointer-events: none;
}

/* ── Responsive header adjustments ─────────────────────────────────────── */

/* Very small phones (< 380px) */
@media (max-width: 379px) {

    .header .loiter_logo {
        width: 54px;
        height: 54px;
    }
    .header h1 {
        font-size: 35px;
    }
}

/* Small phones (380–509px) */

@media (min-width: 380px) and (max-width: 509px) {

    .header .loiter_logo {
        width: 56px;
        height: 56px;
    }
    .header h1 {
        font-size: 36px;
    }
}

/* Medium-small (510–600px) */

@media (min-width: 510px) and (max-width: 600px) {

    .header .loiter_logo {
        width: 60px;
        height: 60px;
    }
    .header h1 {
        font-size: 42px;
    }
}

/* Compact header on small phones (400–500px) */
@media (min-width: 400px) and (max-width: 500px) {
    .header-display-shell {
        padding: 14px 15px 18px 18px;
    }

    .header .loiter_logo {
        width: 53px;
        height: 53px;
        margin-right: 7px;
    }

    .header h1 {
        font-size: 34px;
    }

    .powered-by {
        font-size: 16px;
        letter-spacing: 0.7px;
    }

    .header-text {
        padding-right: 58px;
    }

    .header-actions-stack {
        gap: 9px;
    }

    .share-page-btn,
    .settings-panel-btn {
        width: 26px;
        height: 26px;
    }
}

/* Compact header on very narrow screens (< 400px) */
@media (max-width: 399px) {
    .region-option-postcodes {
        display: none;
    }

    .header-display-shell {
        padding: 12px 14px 16px 16px;
    }

    .header .loiter_logo {
        width: 50px;
        height: 50px;
        margin-right: 6px;
    }

    .header h1 {
        font-size: 31px;
    }

    .powered-by {
        font-size: 15px;
        letter-spacing: 0.6px;
    }

    .header-text {
        padding-right: 52px;
    }

    .header-actions-stack {
        gap: 8px;
    }

    .share-page-btn,
    .settings-panel-btn {
        width: 24px;
        height: 24px;
    }
}

/* ── Responsive adjustments ──────────────────────────────────────────────── */

@media (max-width: 600px) {

    :root {
        --top-filter-height: 43px;
        --top-filter-gap: 9px;
    }
    
    .container {

        padding: 20px 18px 18px 20px;
        box-shadow: 0;
    }

    .header-display-shell {
        margin-top: 0;
        border-top-left-radius: 32px;
    }

    h1 {
        font-size: 36px;
    }

    .btn-base,
    .region-select,
    .download-btn {
        padding: 12px 20px;
        min-height: 48px;
        font-size: 16px;
    }

    .event {
        padding: 20px;
    }

    .event-map {
        height: 164px;
    }

    .title {
        font-size: 17.5px;
    }

    .promo-text {
        font-size: 14px;
        line-height: 1.2;
        padding: 0 12px;
    }

    .status-box {
        max-width: 94%;
        font-size: 16px;
        padding: 14px 18px;
        margin: 20px auto;
    }

    .status-box strong {

        font-weight: 800;
    }

    #loiter-trail-notice,
    #loiter-post-own-notice,
    #share-event-notice {

        padding: 8px 28px 12px 20px;
        font-size: 14.5px;
    }

    .settings-actions-grid {
        grid-template-columns: 1fr;
    }

    /* Compact location + timing controls on small screens */
    .location-display,
    .timing-filter,
    .type-filter {
        min-height: var(--top-filter-height);
        height: var(--top-filter-height);
        border-radius: 20px;
        gap: 5px;
    }

    .location-display {
        padding: 4px 13px 5px 13px;
        margin-bottom: var(--top-filter-gap);
    }

    .timing-filter {
        padding: 4px 13px 5px 13px;
        margin-bottom: var(--top-filter-gap);
    }

    .type-filter {
        padding: 4px 13px 5px 13px;
        margin-bottom: var(--top-filter-gap);
    }

    .icon-wrapper {
        width: 19px;
        height: 19px;
    }

    .when-filter-icon,
    .type-filter-icon {
        width: 19px;
        height: 19px;
    }

    #location-text {
        font-size: 17px;
        margin-right: 26px;
    }

    .quick-location-picker {
        height: 31px;
        padding-left: 3px;
    }
    .timing-filter-display,
    .type-filter-display {
        font-size: 17px;
        min-height: 31px;
        padding-left: 3px;
        padding-right: 30px;
    }

    .picker-arrow,
    .timing-picker-arrow,
    .type-picker-arrow {
        width: 22px;
        height: 22px;
    }
}

/* Extra compact sizing on very small phones */
@media (max-width: 420px) {
    :root {
        --top-filter-height: 39px;
        --top-filter-gap: 8px;
    }

    .location-display,
    .timing-filter,
    .type-filter {
        flex-direction: row !important;
        align-items: center;
        min-height: var(--top-filter-height);
        height: var(--top-filter-height);
        border-radius: 19px;
        gap: 4px;
        flex-wrap: nowrap !important;
    }

    .location-display {
        padding: 4px 11px 5px 11px;
        margin-bottom: var(--top-filter-gap);
    }

    .timing-filter {
        padding: 4px 11px 5px 11px;
        margin-bottom: var(--top-filter-gap);
    }

    .type-filter {
        padding: 4px 11px 5px 11px;
        margin-bottom: var(--top-filter-gap);
    }

    .icon-wrapper {
        width: 17px;
        height: 17px;
    }

    .when-filter-icon,
    .type-filter-icon {
        width: 17px;
        height: 17px;
    }

    #location-text {
        font-size: 16px;
        margin-right: 24px;
    }

    .quick-location-picker {
        height: 29px;
        padding-left: 2px;
    }

    .timing-filter-display,
    .type-filter-display {
        font-size: 16px;
        min-height: 29px;
        padding-left: 3px;
        padding-right: 26px;
        gap: 9px;
    }

    .picker-arrow,
    .timing-picker-arrow,
    .type-picker-arrow {
        width: 20px;
        height: 20px;
    }
}

/* ── Notice ──────────────────────────────────────────────── */

#loiter-trail-notice,
#loiter-post-own-notice,
#share-event-notice {
    display: none;
    background: linear-gradient(to right,#ff823a, #ff9500);
    color: white;
    border: 1px solid #ff6b00;
    
    border-top-left-radius:  32px;
    border-top-right-radius: 5px;
    
    border-bottom-left-radius:  5px;
    border-bottom-right-radius: 5px;

    padding: 6px 32px 3px 26px;
    margin: -5px auto 0px auto;
    line-height: 1.15;
    text-align: center;
    box-sizing: border-box;
    width: 100%;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.32s var(--loiter-ease-smooth), transform 0.32s var(--loiter-ease-smooth);
    position: relative;
    overflow: visible;
    pointer-events: none;
}

#loiter-trail-notice,
#share-event-notice {
    margin-top: 18px;
    text-align: left;
    padding-top: 26px;
    padding-bottom: 26px;
}

#share-event-notice {
    display: block;
    margin-top: 22px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    text-align: center;
    line-height: 1.24;
}

#share-event-notice .share-event-notice-heading {
    font-size: 1.3em;
    font-family: 'Chivo', 'Inter', sans-serif;
    font-weight: 800;
}

#share-event-notice .share-event-notice-line {
    display: block;
}

#share-event-notice .share-event-notice-line + .share-event-notice-line {
    margin-top: 5px;
}

#loiter-trail-notice .loiter-trail-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-right: 6px;
}

.loiter-trail-notice-appshot {
    width: 46px;
    height: auto;
    flex: 0 0 auto;
    display: block;
}

#loiter-trail-notice .loiter-trail-notice-copy {
    min-width: 0;
}

#loiter-trail-notice .loiter-trail-notice-one,
#loiter-trail-notice .loiter-trail-notice-two {
    margin: 0;
}

#loiter-trail-notice .loiter-trail-notice-two {
    margin-top: 6px;
}

@media (max-width: 600px) {
    #loiter-trail-notice .loiter-trail-notice-content {
        gap: 10px;
    }

    .loiter-trail-notice-appshot {
        width: 40px;
    }
}

.loiter-trail-notice-one {
    font-size: 1.16em;
    font-family: 'Chivo', 'Inter', sans-serif;
    font-weight: 800;
}

.loiter-trail-notice-two {
    font-size: 16.0px;
    font-weight: 0;
}

.loiter-trail-notice-loiter {
    font-size: 17.0px;
    font-weight: 900;
}

#loiter-trail-notice.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#loiter-post-own-notice.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#loiter-trail-notice a.notice-link,
#loiter-post-own-notice a.notice-link,
#share-event-notice a.notice-link {
    color: white;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 600;
}

#loiter-trail-notice a.notice-link:hover,
#loiter-trail-notice a.notice-link:focus,
#loiter-post-own-notice a.notice-link:hover,
#loiter-post-own-notice a.notice-link:focus,
#share-event-notice a.notice-link:hover,
#share-event-notice a.notice-link:focus {
    color: #fffce8;
    text-decoration-thickness: 2px;
}

#loiter-post-own-notice {
    margin-top: 18px;
    cursor: default;
}

#loiter-post-own-notice.fetching-fade {
    opacity: 0 !important;
    transform: translateY(-6px) !important;
    pointer-events: none !important;
    transition: opacity 0.14s ease, transform 0.14s ease;
}

#loiter-post-own-notice .loiter-trail-notice-two {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
}

.post-own-notice-copy {
    line-height: 1.22;
}

.post-own-notice-heading {
    font-family: 'Chivo', 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.3em;
}

.post-own-notice-heading .loiter-trail-notice-loiter {
    font-size: inherit;
    font-weight: inherit;
}

#loiter-post-own-notice #ownnotice-download-link {
    display: inline-block;
    margin-top: 5px;
}

.post-own-notice-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: inline-block;
    flex: 0 0 auto;
}

#notice-close-btn,
#ownnotice-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(20%, -20%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    border: 2px solid #ff6b00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    line-height: 1;
    cursor: pointer;
    transition: all 0.18s ease;
    padding: 0;
    outline: none;
    z-index: 2;
}

#notice-close-btn:hover,
#notice-close-btn:focus,
#ownnotice-close-btn:hover,
#ownnotice-close-btn:focus {
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    transform: translate(22%, -22%) scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* ── Event ──────────────────────────────────────────────── */

#events-list .event {
  --animate-duration: var(--loiter-enter-duration);
  --animate-delay: 0s !important;
  animation-timing-function: var(--loiter-ease-smooth);
}

.event {

    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #fdfdff 48%,
        #f8faff 100%
    );

    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.2);
    
    border-top-left-radius:  32px;
    border-top-right-radius: 5px;
    
    border-bottom-left-radius:  5px;
    border-bottom-right-radius: 5px;

    padding: 24px 26px 28px 26px;
    margin-top: 22px;
    color: #333;
    font-family: 'Inter', sans-serif;
    position: relative;
    opacity: 0.9;
    width: 100%;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    cursor: default;
    transform-origin: 50% 50%;
    transition: transform 0.3s var(--loiter-ease-smooth), box-shadow 0.3s var(--loiter-ease-smooth), opacity 0.28s var(--loiter-ease-snappy);
    will-change: transform, opacity;
}

.event.is-hiding {
    overflow: hidden;
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
    max-height: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    transition:
        max-height 340ms cubic-bezier(0.22, 1, 0.36, 1),
        margin-top 340ms cubic-bezier(0.22, 1, 0.36, 1),
        padding-top 340ms cubic-bezier(0.22, 1, 0.36, 1),
        padding-bottom 340ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 240ms ease-out,
        transform 240ms ease-out;
}

.event:nth-child(1) {
    animation-delay: 0.04s;
}

.event:nth-child(2) {
    animation-delay: 0.08s;
}

.event:nth-child(3) {
    animation-delay: 0.12s;
}

.event:nth-child(4) {
    animation-delay: 0.16s;
}

.event:nth-child(5) {
    animation-delay: 0.20s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 24px, 0) scale(0.985);
    }

    to {
        opacity: 0.9;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 0.9;
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(0.985);
    }
}

.type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    margin-top: -1px;
    margin-left: 1px;
    gap: 10px;
}

.type-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 7px 7px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.type-balloon-inside {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.new-event-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 5px;
    background: #e32121;
    color: #ffffff;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.1px;
    flex-shrink: 0;
    margin-right: 1px;
}

.cancelled-row {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 7px;
    background: rgb(255, 0, 0);
    padding: 6px 10px 6px 12px;
    margin: 6px 0 8px 0;
    box-sizing: border-box;
}

.cancelled-text {
    color: #ffffff;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0.6px;
    line-height: 1;
}

.time-text-cancelled {
    text-decoration: line-through;
    text-decoration-color: #c62e2e;
    text-decoration-thickness: 2px;
}

.event-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-action-surface {
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s var(--loiter-ease-snappy), filter 0.12s var(--loiter-ease-snappy), opacity 0.12s var(--loiter-ease-snappy);
    will-change: transform, filter;
}

.quick-action-surface.qa-pressing,
.quick-action-surface.qa-pressed {
    transform: translateY(1px) scale(0.965) !important;
    filter: brightness(0.92) saturate(0.92);
}

.address-text.map-toggle-trigger.quick-action-surface.qa-pressing,
.address-text.map-toggle-trigger.quick-action-surface.qa-pressed {
    transform: none !important;
    filter: brightness(0.96) saturate(0.96);
}

.quick-action-surface.qa-busy {
    pointer-events: none;
    cursor: default;
    opacity: 0.72;
}

.menu-item.quick-action-surface.qa-busy {
    opacity: 0.82;
}

.address-text.map-toggle-trigger.quick-action-surface.qa-busy {
    opacity: 0.82;
}

.favorite-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    opacity: 0.36;
    transition: opacity 0.2s ease, transform 0.18s ease;
}

.cancelled-hide-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    opacity: 1;
    transition: transform 0.18s ease;
}

.cancelled-hide-btn:hover,
.cancelled-hide-btn:focus {
    opacity: 1;
    transform: scale(1.05);
}

.cancelled-hide-icon {
    width: 26px;
    height: 26px;
    display: block;
    object-fit: contain;
}

.favorite-btn:hover,
.favorite-btn:focus {
    opacity: 0.95;
    transform: scale(1.04);
}

.favorite-btn[aria-pressed="true"] {
    opacity: 0.95;
}

.favorite-icon {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.favorite-btn.is-toggling .favorite-icon {
    animation: favoritePop 0.26s var(--loiter-ease-snappy);
}

@keyframes favoritePop {
    0% {
        transform: scale(0.9) rotate(-10deg);
        opacity: 0.6;
    }
    55% {
        transform: scale(1.16) rotate(4deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.info-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    margin-top: 4px;
    flex-shrink: 0;
}

.title {
    font-weight: bold;
    font-size: 19px;
    font-family: 'Inter', sans-serif;
    margin: 16px 0 0 0;
    color: #798690;
}

.owner-name {
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #8f99a3;
    margin: 2px 0 0 1px;
    line-height: 1.1;
}

.title-divider {
    border: none;
    border-top: 1px solid rgba(120, 130, 140, 0.25);
    margin: 2px 0 10px 0;
    width: 100%;
}

.desc {
    font-size: 16px;
    color: #828282;
    font-family: 'Inter', sans-serif;
    margin: 0 0 12px 2px;
    line-height: 1.25;
}

.time-text,
.address-text {
    font-size: 16px;
    color: #798690;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
    padding-top: 0;
    font-weight: 600;

    line-height: 1.1;
    white-space: pre-line;
}

.address-text.map-toggle-trigger {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    flex: 1 1 auto;
    cursor: pointer;
    user-select: none;
}

.address-text.map-toggle-trigger:focus {
    outline: none;
}

.address-text.map-toggle-trigger .address-value {
    flex: 1 1 auto;
    min-width: 0;
}

.address-toggle-arrow {
    display: inline-block;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    margin-top: -1px;
    margin-left: -6px;
    background: url('images/down_button_black.png') no-repeat center / contain;
    opacity: 0.2;
    transition: transform 0.22s var(--loiter-ease-smooth), opacity 0.2s ease;
}

.address-text.map-toggle-trigger:hover .address-toggle-arrow,
.address-text.map-toggle-trigger:focus .address-toggle-arrow {
    opacity: 0.62;
}

.address-text.map-toggle-trigger.map-open .address-toggle-arrow {
    transform: rotate(180deg);
    opacity: 0.62;
}

.time-text:has(br),
.address-text:has(br) {
    line-height: 1.35;
}

.time-text br,
.address-text br {
    content: "";
    display: block;
    margin-bottom: 0.3em;
}

.countdown,
.distance {
    font-weight: 400;
    font-size: 14px;
}

.time-text .timeschema-line {
    font-weight: 500;
}

@media (max-width: 900px) and (orientation: landscape) {
    .time-text,
    .address-text {
        font-size: 16px;
    }

    .time-text .countdown {
        font-size: inherit;
        font-weight: 600;
    }
}

@media (orientation: landscape) and (max-height: 430px) {
    .time-text,
    .address-text,
    .address-text.map-toggle-trigger .address-value {
        font-size: 16px !important;
        line-height: 1.2;
    }

    .time-text .countdown,
    .address-text .distance {
        font-size: 16px !important;
        font-weight: 600;
    }
}

#loading-area {
    text-align: center;
    margin: 100px 0 80px;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 24px;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-top: 6px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.event-actions-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    line-height: 1;
    opacity: 0.2;
    transition: opacity 0.14s ease;
}

.event-actions-btn:hover,
.event-actions-btn:focus {
    opacity: 1;
}

.options-icon {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
}

.event-map-wrap {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    transition: max-height 0.35s var(--loiter-ease-smooth), opacity 0.25s ease, margin 0.25s ease;
}

.event-map-wrap.visible {
    max-height: 260px;
    opacity: 1;
    margin: 14px 0 2px 0;
}

.event-map {
    width: 100%;
    height: 190px;
    border-radius: 12px;
    border: 1px solid rgba(105, 138, 171, 0.28);
    background: #edf3f8;
}

.more-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.08);
    z-index: 1000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    transition: opacity 0.12s ease-out;
}

.more-modal.active {
    display: flex;
    opacity: 1;
}

.more-menu {
    background: #f5f5f5;
    border-radius: 10px;
    min-width: 190px;
    overflow: hidden;
    border: 1px solid #d0d0d0;
    padding: 11px 12px 11px 5px;
    opacity: 0;
    transform: scale(0.96);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}

.more-modal.active .more-menu {
    opacity: 1;
    transform: scale(1);
}


.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px 8px 20px;
    color: #333333;
    font-size: 15px;
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.18s ease;
}

.more-menu .menu-item:first-child {
    margin-top: 4px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.75;
}

.more-menu .menu-item + .menu-item {
    border-top: 0 !important;
}

.menu-item:hover {
    background: #e0e0e0;
}

.menu-item:hover .menu-icon {
    opacity: 1.0;
}

.report-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(17, 36, 58, 0.34);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 24px 20px;
    opacity: 0;
    transition: opacity 0.22s var(--loiter-ease-smooth);
}

.report-modal.active {
    opacity: 1;
}

.qr-share-modal {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: rgba(10, 24, 38, 0.52);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.qr-share-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.qr-share-card {
    width: min(430px, 100%);
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #fdfdff 48%,
        #f8faff 100%
    );
    border: 0;
    border-top-left-radius: 32px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 3px 5px 15px rgba(0, 0, 0, 0.20);
    padding: 34px 34px 32px 34px;
    position: relative;
    color: #333;
    font-family: 'Inter', sans-serif;
    opacity: 0.96;
}

.qr-share-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}

.qr-share-canvas-wrap {
    border-radius: 14px;
    border: 1px solid rgba(105, 138, 171, 0.30);
    background: #ffffff;
    padding: 8px;
    display: flex;
    justify-content: center;
}

.qr-share-canvas {
    width: min(340px, 76vw);
    height: auto;
    display: block;
    border-radius: 9px;
    image-rendering: pixelated;
}

.qr-share-url-wrap {
    margin-top: 14px;
}

.qr-share-url-input {
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(105, 138, 171, 0.30);
    border-radius: 10px;
    background: #ffffff;
    color: #4f5c67;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 500;
    padding: 0 4px;
    box-sizing: border-box;
}

.qr-share-url-input:focus {
    outline: none;
}

.qr-share-actions {
    margin-top: 20px;
    display: flex;
    gap: 14px;
    justify-content: center;
}

.qr-share-action-btn {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    padding: 11px 22px;
    cursor: pointer;
}

.report-card {
    width: min(640px, 100%);
    box-sizing: border-box;
    max-height: min(86vh, 760px);
    overflow: auto;
    font-family: 'Inter', sans-serif;
    --report-strip-height: 25px;
    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0) calc(100% - var(--report-strip-height)),
            rgba(242, 106, 0, 0.62) calc(100% - var(--report-strip-height)),
            rgba(255, 155, 54, 0.78) 100%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fdfdff 48%,
            #f8faff 100%
        );
    border: none;
    border-top-left-radius: 42px;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    box-shadow: 0 18px 46px rgba(14, 33, 52, 0.28), 0 4px 14px rgba(14, 33, 52, 0.14);
    padding: 24px 34px 34px 34px;
    display: flex;
    flex-direction: column;
    gap: 0;
    color: #333;
    opacity: 0.95;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.24s var(--loiter-ease-smooth), opacity 0.2s ease;
}

.report-modal.active .report-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.report-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.report-card-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    opacity: 0.88;
}

.report-card h3 {
    margin: 0;
    color: #798690;
    font-size: 21px;
    font-weight: 800;
}

.report-event-title {
    margin: 0 0 14px 0;
    color: #828282;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
}

.report-label {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #798690;
    margin: 12px 0 6px 0;
}

.report-select,
.report-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(120, 130, 140, 0.25);
    border-radius: 12px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #798690;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.report-textarea {
    resize: vertical;
    min-height: 112px;
}

.report-block-row {
    margin: 10px 0 2px 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #798690;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.report-block-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.report-btn {
    border: 0;
    border-radius: 12px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.report-cancel-btn {
    background: #eef2f6;
    color: #798690;
}

.report-submit-btn {
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    color: white;
}

.report-status {
    min-height: 18px;
    margin: 10px 0 0 0;
    color: #798690;
    font-size: 14px;
    font-weight: 700;
}

.event-bottom-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: #d6d6d6;
  opacity: 0.9;
  cursor: pointer;
}

.event-strip-gap
{
    height: 18px;
}

/* ---------------------------------------- */

.app-promo {
    margin-top: 26px;
    text-align: center;
}

.promo-text {
    color: #e0e0ff;
    font-size: 15px;
    line-height: 1.4;
    margin: 16px 0 0;
}

.promo-text strong {
    color: #ffffff;
    font-weight: 600;
}

.app-promo::before {
    content: '';
    display: block;
    width: 60%;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
    margin: 12px auto 18px;
}

.footer {
    text-align: center;
    margin-top: 18px;
    color: #e0e0ff;
    font-size: 14px;
    opacity: 0.8;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer a {
    color: #e0e0ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover,
.footer a:focus {
    color: #ffffff;
    text-decoration: underline;
}

#location-fallback {
    text-align: center;
    margin: 20px 0;
}

.region-label {
    display: block;
    color: #e0e0ff;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 500;
}

.region-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    border-radius: 10px;
    padding: 10px 48px 10px 24px;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
    min-height: 44px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    background-image: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end)), url('images/down_button.png');
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 24px center;
    background-size: 100% 100%, 24px auto;
}

.region-select:hover,
.region-select:focus {
    transform: translateY(-3px);
    outline: none;
}

.region-select option {
    text-align: left;
    background: #ff9a4d;
    color: white;
    font-size: 16px;
    padding: 10px;
}

.suburb-select-wrap {
    position: relative;
}

.suburb-select-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-94px, -50%);
    width: 18px;
    height: 18px;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.3s ease;
}

.suburb-picker-arrow {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: url('images/down_button.png') no-repeat center / contain;
    pointer-events: none;
    z-index: 2;
    transition: transform 0.3s ease;
}

.suburb-select-wrap:hover .suburb-select-icon,
.suburb-select-wrap:focus-within .suburb-select-icon {
    transform: translate(-94px, calc(-50% - 3px));
}

.suburb-select-wrap:hover .suburb-picker-arrow,
.suburb-select-wrap:focus-within .suburb-picker-arrow {
    transform: translateY(calc(-50% - 3px));
}

#suburb-select {
    padding-left: 54px;
    padding-right: 54px;
    text-align: center;
    text-align-last: center;
    background-image: linear-gradient(135deg, var(--orange-grad-start), var(--orange-grad-end));
    background-repeat: no-repeat;
    background-position: 0 0;
    background-size: 100% 100%;
}

/* ── Status indicators ─────────────────────────────────────────────────── */

.status-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 5px;
    margin-top: 2px;
}

.live-dot {
    background: #00ff41;
    box-shadow:
        0 0 0 3px rgba(0, 255, 65, 0.40),
        0 0 14px rgba(0, 255, 65, 0.75);
    animation: pulse-live 2.2s infinite ease-in-out;
}

@keyframes pulse-live {

    0%,
    100% {
        transform: scale(1.0);
        opacity: 0.95;
    }

    50% {
        transform: scale(1.18);
        opacity: 1.0;
    }
}

.progress-circle-canvas {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    display: block;
    vertical-align: middle;
}

.status-box-global {
    margin: 38px auto;
    padding: 20px 20px 20px 20px;
    font-size: 18px;
    transition: opacity 0.28s var(--loiter-ease-snappy), transform 0.28s var(--loiter-ease-snappy);
}


.loiter-toast-region {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 1300;
    pointer-events: none;
}

.loiter-toast {
    min-width: 240px;
    max-width: min(92vw, 420px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #fff;
    background: rgba(20, 36, 58, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: auto;
}

.loiter-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.loiter-toast-message {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.35;
}

.loiter-toast-close {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.loiter-toast-close:hover,
.loiter-toast-close:focus-visible {
    opacity: 1;
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

@media (max-width: 640px) {
    .loiter-toast-region {
        left: max(12px, env(safe-area-inset-left));
        right: max(12px, env(safe-area-inset-right));
    }

    .loiter-toast {
        max-width: none;
        width: 100%;
    }
}


@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
