/* =====================
   DESIGN SYSTEM — Urban Pulse
   (see designSystem.md)
===================== */
:root {
    --color-primary: #00685d;
    --color-primary-container: #0a8f7e;
    --color-primary-fixed-dim: rgba(0, 104, 93, 0.72);
    --color-background: #faf9f6;
    --color-surface: #f5f4f0;
    --color-surface-container-low: #f0efeb;
    --color-surface-container-lowest: #ffffff;
    --color-tertiary: #6d5e00;
    --color-on-surface: #1a1c1a;
    --color-outline-variant: rgba(26, 28, 26, 0.2);

    --music:    #C62828;
    --books:    #D84315;
    --comedy:   #F9A825;
    --film:     #C0CA33;
    --food:     #43A047;
    --family:   #2E7D32;
    --learning: #00A86B;
    --visual:   #00ACC1;
    --sports:   #00838F;
    --theatre:  #1E88E5;
    --business: #3949AB;
    --community:#5E35B1;
    --tech:     #8E24AA;
    --dance:    #D81B60;
    --queer:    #C2185B;

    --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;
    --font-display-lg: 3.5rem;
    --font-headline-sm: 1.5rem;
    --font-label-md: 0.75rem;

    --shadow-float: 0 8px 24px rgba(26, 28, 26, 0.06);
    --shadow-modal: 0 8px 32px rgba(26, 28, 26, 0.08);
    --shadow-marker: 0 4px 14px rgba(26, 28, 26, 0.12);

    /* Legacy aliases (mapped to design tokens) */
    --teal: var(--color-primary);
    --cream: var(--color-background);
    --dark: var(--color-on-surface);
    --text: var(--color-on-surface);
    --primary: var(--color-primary);
    --background: var(--color-background);
    --accent: var(--color-tertiary);
    --secondary: #c45c3e;

    --breakpoint-xs: 575px;
    --breakpoint-sm: 767px;
    --breakpoint-md: 991px;
    --breakpoint-lg: 1199px;
    --breakpoint-xl: 1200px;

    --border-radius-sm: 4px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --box-shadow-sm: var(--shadow-float);
    --box-shadow-md: 0 8px 20px rgba(26, 28, 26, 0.07);
    --box-shadow-lg: var(--shadow-modal);
    --transition-fast: all 0.2s ease;
    --transition-medium: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 20px;
    --spacing-xl: 40px;
    --spacing-4: 1rem;
    --spacing-8: 2rem;
}

/* =====================
   BASE STYLES
===================== */
html, body {
    margin: 0;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--color-background);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3,
.filter-modal h3,
.agenda-modal h3,
.add-event-modal h3,
.promote-event-modal h1 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-on-surface);
}

/* Hide scrollbars everywhere except Gantt chart */
#list-view,
#toolbar,
.filter-modal,
.agenda-modal,
.countdown-modal {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#list-view::-webkit-scrollbar,
#toolbar::-webkit-scrollbar,
.filter-modal::-webkit-scrollbar,
.agenda-modal::-webkit-scrollbar,
.countdown-modal::-webkit-scrollbar {
    display: none;
}

/* =====================
   FILTER COMPONENTS
===================== */
/* Day filter styles */
#filter-container {
    padding: 10px;
    background-color: var(--color-surface-container-low);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Hide overflow but don't enable scrolling on the container */
    white-space: nowrap;
}

.filter-title {
    color: var(--color-on-surface);
    font-weight: 700;
    font-family: var(--font-display);
    margin-right: 10px;
    position: absolute;
    left: 10px;
}

#day-filters {
    display: inline-flex;
    gap: 8px;
    padding: 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 0 40px; /* Add padding for the buttons */
    width: 100%;
}

#day-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.day-filter {
    background-color: var(--color-surface-container-lowest);
    color: var(--color-on-surface);
    border: none;
    border-radius: 999px;
    padding: var(--spacing-xs) var(--spacing-md);
    font-weight: 600;
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(26, 28, 26, 0.05);
}

.day-filter.active {
    background-color: rgba(109, 94, 0, 0.14);
    color: var(--color-tertiary);
}

/* Favorites filter styles */
#favorites-filter {
    background-color: var(--cream);
    color: var(--teal);
    border: 2px solid var(--teal);
    margin-right: var(--spacing-md);
}

#favorites-filter.active {
    background-color: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

/* Tag filter styles */
#tag-filter-container {
    background-color: var(--color-surface);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* Hide overflow but don't enable scrolling on the container */
    white-space: nowrap;
}

#tag-filters {
    display: inline-flex;
    gap: 8px;
    padding: 0 40px; /* Add padding for the buttons */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    width: 100%;
}

#tag-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tag-filter {
    background-color: var(--color-surface-container-lowest);
    color: var(--color-on-surface);
    border: none;
    border-radius: 999px;
    padding: var(--spacing-xs) var(--spacing-md);
    font-weight: 600;
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    user-select: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(26, 28, 26, 0.05);
}

.tag-filter.active {
    background-color: rgba(109, 94, 0, 0.14);
    color: var(--color-tertiary);
}

/* Add a title for the tag filters with proper styling */
#tag-filter-container::before {
    color: var(--color-on-surface);
    font-weight: bold;
    position: absolute;
    left: 10px;
    display: none; /* Hide by default, show on larger screens */
}

/* Remove gradient indicators since we have buttons now */
#filter-container::after, #tag-filter-container::after {
    display: none;
}

/* Filter scroll buttons */
.scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 40px;
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 18px;
    transition: background-color 0.2s;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-float);
}

.scroll-button:active {
    background-color: rgba(109, 94, 0, 0.12);
    color: var(--color-tertiary);
}

.scroll-left {
    left: 0px;
}

.scroll-right {
    right: 0px;
}

/* =====================
   MAP COMPONENTS
===================== */
/* Leaflet.markercluster — match Urban Pulse primary */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
    background-color: rgba(0, 104, 93, 0.35);
}
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
    background-color: rgba(0, 104, 93, 0.82);
    color: #fff;
    font-family: var(--font-body);
    font-weight: 600;
}

#map {
    height: 60vh;
    position: relative;
}

.add-event-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1000;
    padding: 10px 10px;
    min-height: 30px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 700;
    font-size: var(--font-label-md);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    font-family: var(--font-body);
    box-shadow: var(--shadow-float);
}

.add-event-btn:hover {
    opacity: 0.94;
    transform: translateY(-1px);
}

.list-view-header {
    display: flex;
    justify-content: flex-end;
    padding: 12px 16px;
    background-color: var(--color-surface-container-low);
}

.list-view-header .add-event-btn {
    position: static;
}

.map-logo-container {
    cursor: pointer;
}

.map-logo {
    pointer-events: none;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.2));
}

.map-disclaimer {
    position: absolute;
    bottom: 2px;
    left: 4px;
    z-index: 1000;
    background: rgba(250, 249, 246, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px 10px;
    border-radius: var(--border-radius-md);
    font-size: 11px;
    color: var(--color-on-surface);
    opacity: 0.9;
    font-family: var(--font-body);
}

.map-disclaimer .creator-modal-trigger {
    color: inherit;
    text-decoration: underline;
    pointer-events: auto;
}

.custom-marker div {
    width: 50px;
    height: 82px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    mask: url(https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png) no-repeat center;
    -webkit-mask: url(https://unpkg.com/leaflet@1.7.1/dist/images/marker-icon.png) no-repeat center;
    filter: drop-shadow(0 4px 12px rgba(26, 28, 26, 0.18));
}

.custom-marker .category-marker-img {
    width: 50px;
    height: 82px;
    display: block;
    object-fit: contain;
    filter: none;
}

.custom-marker.promoted-marker .promoted-arrow-img {
    width: 90px;
    height: 90px;
    display: block;
}

/* Custom map marker colors */
.leaflet-marker-icon {
    filter: none;
}

/* =====================
   TIMELINE COMPONENTS
===================== */
#timeline {
    height: 40vh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: height 0.35s ease;
}

#timeline.timeline-collapsed {
    height: 80px;
}

#timeline.timeline-collapsed .scrollable-timeline {
    overflow: hidden;
}

.timeline-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
}

#gantt {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Make the bars interactive */
rect:hover {
    cursor: pointer;
}

.timeline-header {
    margin-left: 20px;
    border-bottom: none;
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--color-surface-container-low);
}

.timeline-header svg {
    background-color: var(--color-surface-container-low);
}

.gantt-approx-tooltip {
    position: fixed;
    z-index: 10050;
    max-width: 280px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-surface-container-lowest);
    color: var(--color-on-surface);
    font-family: var(--font-body);
    font-size: 12px;
    line-height: 1.45;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-modal);
    border: 1px solid var(--color-outline-variant);
    pointer-events: none;
}

.gantt-approx-hint circle,
.gantt-approx-hint text {
    pointer-events: all;
}

.scrollable-timeline {
    overflow-x: auto;
    overflow-y: auto;
    height: calc(100% - 50px);
    position: relative;
    margin: 0 0 0 20px;
    background-color: var(--color-background);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.scrollable-timeline:active {
    cursor: grabbing;
}

/* Scrollbar styling */
.scrollable-timeline::-webkit-scrollbar {
    height: 8px;
}

.scrollable-timeline::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.scrollable-timeline::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.scrollable-timeline::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.timeline-tooltip {
    position: absolute;
    padding: var(--spacing-md);
    background: var(--color-surface-container-lowest);
    border: none;
    border-radius: var(--border-radius-md);
    pointer-events: none;
    font-size: 14px;
    box-shadow: var(--shadow-float);
    font-family: var(--font-body);
}

.timeline-tooltip strong {
    color: var(--dark);
}

.festival-bar {
    opacity: 0.8;
    cursor: pointer;
    transition: all 0.2s;
}

.past-festival {
    fill: #999;
    opacity: 0.5;
}

.current-date-line {
    pointer-events: none;
}

.event-group text {
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.event-label {
    font-family: var(--font-body);
    pointer-events: none;
}

.event-label[fill="#fff"] {
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.event-group rect {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.event-group rect.selected {
    opacity: 1;
}

.date-label {
    font-size: 12px;
    font-family: var(--font-display);
    font-weight: 700;
}

/* =====================
   POPUP COMPONENTS
===================== */
.leaflet-popup-content-wrapper {
    border-radius: var(--border-radius-md);
    background: var(--color-surface-container-lowest);
    box-shadow: var(--shadow-modal);
}

.leaflet-popup-content {
    margin: 15px;
}

.leaflet-popup-tip {
    background: var(--color-surface-container-lowest);
}

.location-popup {
    width: 300px;
    max-height: 70vh;
    overflow-y: auto;
}

.popup-location {
    text-align: center;
    margin: 0 0 12px 0;
    padding: 12px;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
}

.location-popup-events {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.location-popup-event {
    text-align: center;
    position: relative;
    padding: 12px;
    margin-bottom: 8px;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
}

.location-popup-event:last-child {
    margin-bottom: 0;
}

.location-popup-event img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-float);
}

.location-popup-event h3 {
    color: var(--dark);
    margin: 8px 0;
    font-size: 15px;
}

.location-popup-event p {
    margin: 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

.location-popup-event .popup-actions {
    margin-top: 8px;
}

.festival-popup {
    text-align: center;
    position: relative;
}

.festival-popup img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-float);
}

.festival-popup h3 {
    color: var(--dark);
    margin: 10px 0;
}

.timeline-popup {
    background: var(--color-surface-container-lowest);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-modal);
    max-width: 350px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 10000;
    pointer-events: auto;
    cursor: default;
    position: fixed;
    animation: fadeIn 0.2s ease-out;
}

/* Default arrow for bottom position (when popup is above timeline) */
.timeline-popup.arrow-bottom::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: var(--color-surface-container-lowest) transparent transparent;
}

/* Arrow for top position (when popup is below timeline) */
.timeline-popup.arrow-top::after {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px;
    border-style: solid;
    border-color: transparent transparent var(--color-surface-container-lowest);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.timeline-popup .festival-popup {
    text-align: center;
    position: relative;
}

.timeline-popup .festival-popup img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    border: none;
    box-shadow: var(--shadow-float);
    margin-bottom: 10px;
}

.timeline-popup .festival-popup h3 {
    color: var(--dark);
    margin: 10px 0;
    font-size: 16px;
}

.timeline-popup .festival-popup p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Close buttons */
.leaflet-popup-close-button {
    font-size: 18px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    top: 5px !important;
    right: 5px !important;
    color: var(--dark) !important;
    background-color: rgba(255,255,255,0.7) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.close-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 12px;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 1000;
    user-select: none;
    color: var(--dark);
}

/* =====================
   UTILITY COMPONENTS
===================== */
.location-link {
    color: var(--teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

/* =====================
   MEDIA QUERIES
===================== */

/* Feature/capability queries - independent of screen size */

/* Hover-capable devices */
@media (hover: hover) {
    .day-filter:hover,
    .tag-filter:hover {
        transform: translateY(-2px);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

    .scroll-button:hover {
        background-color: white;
    }

    .location-link:hover {
        color: var(--orange);
        text-decoration: underline;
    }

    .close-button:hover {
        background-color: rgba(255,255,255,1);
    }
    
    .festival-bar:hover {
        opacity: 1;
    }
    
    .past-festival:hover {
        fill: #666;
        opacity: 0.8;
    }
}

/* Touch devices */
@media (pointer: coarse) {
    .day-filter:hover, 
    .tag-filter:hover {
        transform: none;
        box-shadow: none;
    }
    
    .day-filter:active, 
    .tag-filter:active {
        opacity: 0.8;
    }
    
    .scroll-button {
        opacity: 0.9;
    }
}

/* Responsive breakpoints - mobile first approach */

/* Extra small devices (phones) - Base styles defined at top level */
/* All base styles at the top of the document serve as the mobile-first defaults */

/* Small devices (tablets) */
@media (min-width: 576px) {
    /* Add tablet-specific styles here */
}

/* Medium devices (tablets and small desktops) */
@media (min-width: 768px) {
    #tag-filter-container::before {
        display: block;
        left: 45px; /* Move label to accommodate scroll button */
    }
    
    #day-filters, 
    #tag-filters {
        padding: 0 40px 0 100px; /* Add space for the label on larger screens */
    }
    
    /* Less condensed filters on larger screens */
    .day-filter,
    .tag-filter {
        padding: 5px 12px;
        font-size: initial;
        border-radius: 20px;
        border-width: 2px;
    }
    
    /* Larger buttons on desktop */
    .scroll-button {
        width: 30px;
        height: 40px;
        font-size: 18px;
    }
}

/* Large devices (desktops) */
@media (min-width: 992px) {
    /* Add desktop-specific styles here */
}

/* Extra large devices (large desktops) */
@media (min-width: 1200px) {
    /* Add large desktop-specific styles here */
}

/* Special case: Legacy max-width breakpoints */
/* These should eventually be refactored to mobile-first,
   but keeping for backward compatibility */

/* Small devices and below (phones and small tablets) */
@media (max-width: 767px) {
    /* Map and logo adjustments */
    .map-logo {
        width: 75px !important;
    }
    
    /* Reposition logo container for small screens */
    .leaflet-control-container .leaflet-top.leaflet-right {
        top: unset !important;
        bottom: 20px;
    }

    #map {
        box-sizing: border-box;
        height: 60vh;
        width: 100%;
        margin: 0;
    }

    /* Timeline adjustments */
    .timeline-header,
    .scrollable-timeline {
        margin-left: 10px; /* Smaller margin for mobile */
    }

    /* Close button adjustments */
    .leaflet-popup-close-button {
        font-size: 22px !important;
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        top: 5px !important;
        right: 5px !important;
    }

    .close-button {
        width: 32px;
        height: 32px;
        font-size: 22px;
        line-height: 30px;
    }
}

/* Medium devices and below (tablets and phones) */
@media (max-width: 968px) {
    #tag-filter-container, 
    #filter-container {
        padding: 8px 10px;
    }
    
    #day-filters, 
    #tag-filters {
        padding: 0 40px; /* Keep space for buttons */
    }
    
    .tag-filter {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 999px;
        border: none;
    }

    .day-filter {
        border: none;
        border-radius: 999px;
        padding: 6px 10px;
        font-weight: 600;
        font-size: 10px;
        cursor: pointer;
        user-select: none;
    }
}

.heart-icon {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 30px;
    color: gray;
    cursor: pointer;
    transition: color 0.3s ease;
}

.heart-icon.active {
    color: red !important;
}

/* Social Share Styles */
#social-share-container {
    position: fixed;
    left: 50%;
    bottom: 0;
    width: 220px;
    background: rgba(250, 249, 246, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    padding: 12px 16px;
    box-shadow: var(--shadow-float);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    /* Initially show only top third */
    transform: translate(-50%, 66%);
    cursor: pointer;
}

#social-share-container.expanded {
    transform: translate(-50%, 0);
}

.share-title {
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-on-surface);
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.expand-indicator {
    font-size: 10px;
    transition: transform 0.3s ease;
}

#social-share-container.expanded .expand-indicator {
    transform: rotate(180deg);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.twitter-share {
    background-color: #1DA1F2;
}

.facebook-share {
    background-color: #4267B2;
}

.linkedin-share {
    background-color: #0077B5;
}

.copy-link {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
}

.share-button svg {
    width: 18px;
    height: 18px;
}

.share-button:hover {
    transform: scale(1.1);
}

.copy-link.copied {
    background-color: #28a745;
}

/* =====================
   COUNTDOWN MODAL
===================== */
.countdown-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 28, 26, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    animation: modalOverlayIn 0.3s ease;
}

.countdown-modal-overlay.visible {
    display: flex;
}

.countdown-modal {
    background: var(--color-surface-container-lowest);
    border-radius: var(--border-radius-lg);
    padding: 32px 28px 28px;
    max-width: 460px;
    width: 90%;
    position: relative;
    box-shadow: var(--shadow-modal);
    font-family: var(--font-body);
    animation: modalSlideIn 0.35s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.countdown-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-on-surface);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.countdown-modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.countdown-timer {
    text-align: center;
    font-size: 42px;
    font-weight: 800;
    font-family: var(--font-display);
    color: var(--color-primary);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.countdown-timer .countdown-segment {
    display: inline-block;
    text-align: center;
    margin: 0 6px;
}

.countdown-timer .countdown-value {
    display: block;
    font-size: 42px;
    line-height: 1.1;
}

.countdown-timer .countdown-unit {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 1px;
}

.countdown-label {
    text-align: center;
    font-size: 14px;
    color: var(--text);
    margin: 12px 0 18px;
    font-weight: 600;
}

.countdown-events {
    border-top: 2px solid var(--teal);
    padding-top: 14px;
}

.countdown-event-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(38, 70, 83, 0.12);
    align-items: flex-start;
}

.countdown-event-item:last-child {
    border-bottom: none;
}

.countdown-event-img {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    border: 2px solid var(--teal);
    flex-shrink: 0;
}

.countdown-event-info {
    flex: 1;
    min-width: 0;
}

.countdown-event-name {
    font-weight: bold;
    color: var(--dark);
    font-size: 14px;
    margin-bottom: 2px;
}

.countdown-event-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.countdown-event-loc {
    color: var(--teal);
}

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

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767px) {
    .countdown-modal {
        padding: 28px 18px 20px;
    }

    .countdown-timer .countdown-value {
        font-size: 32px;
    }

    .countdown-timer .countdown-segment {
        margin: 0 4px;
    }

    .countdown-event-img {
        width: 44px;
        height: 44px;
    }
}

/* =====================
   TOOLBAR
===================== */
#toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    min-height: 56px;
    box-sizing: border-box;
    background: rgba(250, 249, 246, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--shadow-float);
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#toolbar::-webkit-scrollbar {
    display: none;
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    min-height: 48px;
    background: var(--color-surface-container-lowest);
    color: var(--color-on-surface);
    border: none;
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    font-family: var(--font-body);
    position: relative;
    box-shadow: 0 2px 10px rgba(26, 28, 26, 0.05);
}

.toolbar-btn.active {
    background: var(--color-surface-container-lowest);
    color: var(--color-primary);
    box-shadow: none;
}

.toolbar-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--color-primary);
}

.toolbar-btn svg {
    flex-shrink: 0;
    stroke: currentColor;
    opacity: 0.85;
}

.toolbar-btn.active svg {
    color: var(--color-primary-fixed-dim);
    opacity: 1;
}

.filter-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--secondary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: var(--font-body);
}

#favorites-btn.active {
    background: var(--color-surface-container-lowest);
    color: #c62828;
}

#favorites-btn.active::after {
    background: #c62828;
}

/* =====================
   MAP VIEW WRAPPER
===================== */
#map-view {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
}

#map-view #map {
    flex: 1;
    min-height: 0;
}

/* =====================
   LIST VIEW
===================== */
#list-view {
    display: none;
    flex-direction: column;
    background-color: var(--color-background);
    padding: 0;
    height: calc(100vh - 56px);
}

#list-view.active {
    display: flex;
}

#list-view-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-date-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
    padding: 14px 18px;
    font-weight: 700;
    font-size: var(--font-label-md);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    z-index: 10;
    font-family: var(--font-display);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-8);
    box-shadow: var(--shadow-float);
}

.list-date-header:first-child {
    margin-top: 12px;
}

.list-card {
    display: flex;
    gap: 14px;
    padding: var(--spacing-4);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    align-items: flex-start;
    background: var(--color-surface-container-lowest);
    box-shadow: 0 2px 12px rgba(26, 28, 26, 0.05);
    position: relative;
}

.list-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--color-tertiary) 0%, rgba(109, 94, 0, 0.5) 100%);
    opacity: 0.85;
}

.list-card:hover {
    box-shadow: 0 6px 20px rgba(26, 28, 26, 0.08);
    transform: translateY(-1px);
}

.list-card-img-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.list-card-img {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-md);
    object-fit: cover;
    border: none;
    box-shadow: var(--shadow-float);
}

.list-card-body {
    flex: 1;
    min-width: 0;
}

.list-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-on-surface);
    font-size: clamp(0.95rem, 2.5vw, var(--font-headline-sm));
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.list-card-time {
    font-size: var(--font-label-md);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 2px;
    font-family: var(--font-body);
}

.list-card-loc {
    font-size: 12px;
    color: rgba(26, 28, 26, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-card-desc {
    font-size: 13px;
    color: rgba(26, 28, 26, 0.65);
    line-height: 1.4;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card-sponsored {
    font-size: 10px;
    font-weight: 600;
    color: var(--secondary);
    padding: 4px 8px;
    background: rgba(231, 111, 81, 0.12);
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.list-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.list-card-tag {
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: rgba(0, 104, 93, 0.1);
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-body);
}

.list-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
    flex-shrink: 0;
}

.list-card-heart {
    font-size: 22px;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.list-card-heart.active {
    color: red;
}

.list-card-ics,
.list-card-google-cal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--teal);
    padding: 2px;
    transition: color 0.2s;
}

.list-card-cal-label {
    font-size: 11px;
    font-weight: 600;
}

.list-card-ics:hover,
.list-card-google-cal:hover {
    color: var(--color-tertiary);
}

.list-card-countdown {
    font-size: 10px;
    color: var(--secondary);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* =====================
   FILTER MODAL
===================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 28, 26, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    animation: modalOverlayIn 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
}

.filter-modal,
.agenda-modal,
.add-event-modal,
.promote-event-modal,
.creator-modal {
    background: var(--color-surface-container-lowest);
    border-radius: var(--border-radius-lg);
    padding: 28px 22px 22px;
    max-width: 500px;
    width: 92%;
    position: relative;
    box-shadow: var(--shadow-modal);
    animation: modalSlideIn 0.35s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.creator-modal {
    text-align: center;
}

.creator-modal-photo {
    display: block;
    margin: 0 auto 20px;
    max-width: 180px;
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
}

.creator-modal-intro {
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.creator-modal-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.creator-modal-links a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 500;
}

.creator-modal-links a:hover {
    text-decoration: underline;
}

.creator-modal-trigger {
    cursor: pointer;
    text-decoration: underline;
}

.creator-modal-trigger:hover {
    opacity: 0.85;
}

.add-event-modal {
    max-width: 520px;
}

.promote-event-copy {
    text-align: left;
}

#promote-event-modal-overlay ul {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
}

.promote-event-copy li {
    margin-bottom: 10px;
    text-align: left;
}

.promote-event-modal {
    max-width: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.promote-event-modal h1 {
    color: var(--color-on-surface);
    margin: 0 0 16px 0;
    font-size: 1.35rem;
    font-family: var(--font-display);
}

.promote-event-stats-img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    margin-bottom: 16px;
    border: none;
    box-shadow: var(--shadow-float);
}

.promote-event-copy {
    color: var(--color-on-surface);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-family: var(--font-body);
}

.list-card-promote {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background-color: var(--accent);
    color: var(--dark);
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.list-card-promote:hover {
    background-color: var(--secondary);
    color: white;
}

#paypal-promote-container {
    width: 100%;
    text-align: center;
}

.promote-select-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
    padding: 12px;
}

.add-event-map-search {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.add-event-map-search input {
    flex: 1;
    padding: 12px 14px;
    border: none;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--color-on-surface);
    box-shadow: inset 0 0 0 1px var(--color-outline-variant);
}

.add-event-map-search input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(0, 104, 93, 0.35);
}

.add-event-map-search button {
    padding: 12px 18px;
    min-height: 48px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-body);
    box-shadow: var(--shadow-float);
}

.add-event-map-search button:hover {
    opacity: 0.95;
}

.add-event-map {
    height: 200px;
    margin-top: 8px;
    border-radius: var(--border-radius-md);
    border: none;
    overflow: hidden;
    box-shadow: var(--shadow-float);
}

.add-event-map-hint {
    font-size: 11px;
    color: #666;
    margin-top: 6px;
}

.add-event-time-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-event-time-row select {
    flex: 1;
    padding: 12px 14px;
    border: none;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--color-on-surface);
    box-shadow: inset 0 0 0 1px var(--color-outline-variant);
}

.add-event-time-sep {
    color: var(--teal);
    font-weight: 600;
}

.add-event-modal .filter-section input[type="text"],
.add-event-modal .filter-section input[type="url"],
.add-event-modal .filter-section input[type="file"],
.add-event-modal .filter-section textarea {
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
    font-size: 14px;
    box-sizing: border-box;
    font-family: var(--font-body);
    color: var(--color-on-surface);
    box-shadow: inset 0 0 0 1px var(--color-outline-variant);
}

.add-event-modal .filter-section textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-on-surface);
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
}

.filter-modal h3,
.agenda-modal h3,
.add-event-modal h3 {
    color: var(--color-on-surface);
    margin: 0 0 16px 0;
    font-size: 1.35rem;
    font-family: var(--font-display);
}

.filter-section {
    margin-bottom: 18px;
}

.filter-section label {
    display: block;
    font-weight: 600;
    color: var(--color-on-surface);
    font-size: var(--font-label-md);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-family: var(--font-body);
    opacity: 0.85;
}

#keyword-search {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    background: var(--color-surface-container-low);
    color: var(--color-on-surface);
    transition: box-shadow 0.2s;
    box-sizing: border-box;
    font-family: var(--font-body);
    box-shadow: inset 0 0 0 1px var(--color-outline-variant);
}

#keyword-search:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(0, 104, 93, 0.35);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-chips .day-filter,
.filter-chips .tag-filter {
    padding: 8px 14px;
    font-size: var(--font-label-md);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 999px;
    border: none;
    background-color: var(--color-surface-container-low);
    color: var(--color-on-surface);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    user-select: none;
    font-family: var(--font-body);
}

.filter-chips .day-filter.active,
.filter-chips .tag-filter.active {
    background-color: rgba(109, 94, 0, 0.16);
    color: var(--color-tertiary);
}

/* Date Range Navigation */
.date-range-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.date-nav-btn {
    padding: 10px 14px;
    min-height: 44px;
    background: var(--color-surface-container-lowest);
    border: none;
    border-radius: var(--border-radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    color: var(--color-primary);
    transition: var(--transition-fast);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26, 28, 26, 0.06);
    font-family: var(--font-body);
}

.date-nav-btn:hover {
    background-color: rgba(109, 94, 0, 0.12);
    color: var(--color-tertiary);
}

.date-range-presets {
    display: flex;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.date-preset {
    padding: 8px 12px;
    font-size: var(--font-label-md);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    border: none;
    background-color: var(--color-surface-container-low);
    color: var(--color-on-surface);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.date-preset.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
}

.date-range-display {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-on-surface);
    margin-bottom: 10px;
    font-family: var(--font-body);
}

/* Time Range Slider */
.time-range-container {
    padding: 8px 4px 0;
}

.time-range-track {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
}

.time-range-fill {
    position: absolute;
    height: 6px;
    background-color: var(--primary);
    border-radius: 3px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
}

.time-range-input {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    z-index: 2;
    margin: 0;
}

.time-range-input::-webkit-slider-runnable-track {
    height: 6px;
    background: rgba(26, 28, 26, 0.12);
    border-radius: 3px;
}

.time-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    pointer-events: auto;
    margin-top: -8px;
}

.time-range-input::-moz-range-track {
    height: 6px;
    background: rgba(26, 28, 26, 0.12);
    border-radius: 3px;
    border: none;
}

.time-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 3px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    pointer-events: auto;
}

#time-range-max::-webkit-slider-runnable-track {
    background: transparent;
}

#time-range-max::-moz-range-track {
    background: transparent;
}

.time-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-on-surface);
    margin-top: 4px;
    font-family: var(--font-body);
}

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

.filter-action-btn {
    padding: 14px 22px;
    min-height: 48px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: var(--font-label-md);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--color-surface-container-low);
    color: var(--color-primary);
    font-family: var(--font-body);
    box-shadow: inset 0 0 0 1px rgba(26, 28, 26, 0.12);
}

.filter-action-btn:hover {
    background-color: var(--color-surface-container-lowest);
    box-shadow: inset 0 0 0 1px rgba(0, 104, 93, 0.25);
}

.filter-action-btn.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
    box-shadow: var(--shadow-float);
}

.filter-action-btn.primary:hover {
    opacity: 0.94;
    transform: translateY(-1px);
}

/* =====================
   AGENDA MODAL
===================== */
.agenda-subtitle {
    color: #666;
    font-size: 14px;
    margin: -8px 0 16px 0;
}

.agenda-day-group {
    margin-bottom: 20px;
}

.agenda-day-header {
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-on-surface);
    font-size: 15px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--color-surface-container-low);
    border-radius: var(--border-radius-md);
    border-bottom: none;
}

.agenda-event {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-bottom: none;
    align-items: flex-start;
    background: var(--color-surface-container-lowest);
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 8px rgba(26, 28, 26, 0.04);
}

.agenda-event-time {
    font-weight: bold;
    color: var(--dark);
    font-size: 13px;
    min-width: 90px;
    flex-shrink: 0;
}

.agenda-event-info {
    flex: 1;
    min-width: 0;
}

.agenda-event-name {
    font-weight: bold;
    color: var(--dark);
    font-size: 14px;
}

.agenda-event-loc {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.agenda-buffer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.agenda-buffer::before {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(to right, #ccc 0, #ccc 4px, transparent 4px, transparent 8px);
}

.agenda-buffer::after {
    content: '';
    flex: 1;
    height: 1px;
    background: repeating-linear-gradient(to right, #ccc 0, #ccc 4px, transparent 4px, transparent 8px);
}

.agenda-empty {
    text-align: center;
    padding: 30px 20px;
    color: #999;
    font-size: 15px;
    line-height: 1.6;
}

.agenda-actions {
    padding-top: 16px;
    margin-top: 12px;
    text-align: center;
    border-top: none;
}

.agenda-actions .filter-action-btn {
    width: 100%;
}

/* =====================
   POPUP ENHANCEMENTS
===================== */
.popup-sponsored {
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
    margin: 0 0 8px 0;
    padding: 3px 8px;
    background: rgba(231, 111, 81, 0.15);
    border-radius: var(--border-radius-sm);
    display: block;
    text-align: center;
}

.popup-countdown {
    font-size: 12px;
    font-weight: 600;
    color: var(--secondary);
    margin: 6px 0;
    padding: 4px 8px;
    background: rgba(231, 111, 81, 0.1);
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

.popup-countdown.happening-now {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.popup-countdown.ended {
    color: #999;
    background: rgba(153, 153, 153, 0.1);
}

.popup-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.ics-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px;
    min-height: 44px;
    box-sizing: border-box;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: var(--font-label-md);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    font-family: var(--font-body);
    box-shadow: var(--shadow-float);
    line-height: 1.2;
    -webkit-appearance: none;
    appearance: none;
}

.ics-button:hover {
    opacity: 0.93;
}

/* =====================
   TOOLBAR RESPONSIVE
===================== */
@media (max-width: 767px) {
    #toolbar {
        padding: 10px 12px;
        gap: 6px;
    }

    .toolbar-btn {
        padding: 10px 12px;
        font-size: 11px;
        gap: 6px;
        border-radius: var(--border-radius-md);
    }

    .toolbar-btn svg {
        width: 22px;
        height: 22px;
    }

    #list-view {
        height: calc(100vh - 56px);
    }

    .filter-modal,
    .agenda-modal {
        padding: 20px 14px 16px;
        width: 95%;
    }

    .list-card-img-wrap .list-card-img {
        width: 52px;
        height: 52px;
    }
}

@media (hover: hover) {
    .toolbar-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 14px rgba(26, 28, 26, 0.1);
    }

    .list-card:hover {
        background-color: var(--color-surface-container-lowest);
    }
}

/* Toast notification for copy link */
.toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: var(--border-radius-md);
    font-size: 14px;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile adjustments for social share */
@media (max-width: 767px) {
    #social-share-container {
        width: 90%;
        max-width: 300px;
        padding: 8px 12px;
        /* Keep the same transform behavior */
        transform: translate(-50%, 66%);
    }
    
    #social-share-container.expanded {
        transform: translate(-50%, 0);
    }
    
    .share-title {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .share-buttons {
        gap: 8px;
    }
    
    .share-button {
        width: 32px;
        height: 32px;
    }
    
    .share-button svg {
        width: 16px;
        height: 16px;
    }
}