/* Calendar specific styles */

.calendar-header {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.calendar-header h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #118844;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.stat {
    color: #666;
    font-size: 1rem;
}

.stat strong {
    color: #1db954;
    font-size: 1.2rem;
}

/* Calendar controls */
.calendar-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle .btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

.view-toggle .btn.active {
    background: #1db954;
    color: white;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-controls input,
.filter-controls select {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.filter-controls input:focus,
.filter-controls select:focus {
    outline: none;
    border-color: #1db954;
}

/* Searchable Dropdown Styles */
.searchable-dropdown {
    position: relative;
    min-width: 200px;
    max-width: 300px;
}

.searchable-dropdown-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    user-select: none;
}

.searchable-dropdown-input:focus {
    outline: none;
    border-color: #1db954;
    cursor: text;
}

.searchable-dropdown-input.active {
    border-color: #1db954;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.searchable-dropdown-arrow {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.searchable-dropdown-arrow.rotated {
    transform: translateY(-50%) rotate(180deg);
}

.searchable-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #1db954;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.searchable-dropdown-menu.show {
    display: block;
}

.searchable-dropdown-item {
    padding: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.searchable-dropdown-item:last-child {
    border-bottom: none;
}

.searchable-dropdown-item:hover {
    background: #f8f9fa;
}

.searchable-dropdown-item.selected {
    background: #e8f5e8;
    color: #1db954;
    font-weight: 500;
}

.searchable-dropdown-item.hidden {
    display: none;
}

.searchable-dropdown-item.highlighted {
    background: #e3f2fd;
}

/* Events list */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* Event card color coding for domestic/international */
.event-card.domestic,
.day-events-list .event-card.domestic {
    border-left: 5px solid #2e7d2e !important;
    background: linear-gradient(to right, rgba(46, 125, 46, 0.05), white) !important;
}

.event-card.international,
.day-events-list .event-card.international {
    border-left: 5px solid #1976d2 !important;
    background: linear-gradient(to right, rgba(25, 118, 210, 0.05), white) !important;
}

.event-date {
    background: #1db954;
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 80px;
    flex-shrink: 0;
}

.event-date .month {
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0.25rem 0;
}

.event-date .year {
    font-size: 0.8rem;
    opacity: 0.9;
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.event-artist {
    font-size: 1.1rem;
    color: #1db954;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.event-venue {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.event-time {
    color: #888;
    font-size: 0.8rem;
}

.event-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: flex-end;
}

.event-location {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-location.domestic {
    background: #e8f5e8;
    color: #2e7d2e;
}

.event-location.international {
    background: #e3f2fd;
    color: #1976d2;
}

.music-insights {
    margin-top: 1rem;
    padding: 0.75rem 0;
}

.insight-text {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* Demo Notice */
.demo-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
    margin: 1rem 0;
}

.demo-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.demo-text {
    flex: 1;
}

.demo-text strong {
    color: #333;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.25rem;
}

.demo-text p {
    color: #666;
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Calendar Grid View */
.calendar-grid {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.calendar-header-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-nav {
    background: #1db954;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-nav:hover {
    background: #1ed760;
}

#currentMonth {
    font-size: 1.5rem;
    margin: 0;
    color: #333;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
}

.weekday {
    background: #f8f9fa;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    color: #666;
    border-radius: 8px 8px 0 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e9ecef;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.other-month {
    color: #ccc;
    background: #f8f9fa;
}

.calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #1976d2;
}

.calendar-day.has-events {
    background: linear-gradient(135deg, #e8f5e8, #f0f9ff);
}

.day-number {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 80px;
    overflow: hidden;
}

.calendar-event {
    background: #1db954;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-event:hover {
    background: #1ed760;
}

.calendar-event.domestic {
    background: #2e7d2e;
}

.calendar-event.international {
    background: #1976d2;
}

.events-count {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    background: #ff6b35;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: 600;
}

/* Event details modal for calendar */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.event-modal-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.event-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.event-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.event-modal-close:hover {
    color: #333;
}

/* Calendar Legend */
.calendar-legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.calendar-legend h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.legend-items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-color.domestic {
    background: #2e7d2e;
}

.legend-color.international {
    background: #1976d2;
}

.legend-text {
    font-size: 0.85rem;
    color: #555;
    font-weight: 500;
}

/* No events state */
.no-events {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.no-events h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-events p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Day events modal */
.day-events-list .event-card {
    background: #f8f9fa;
    border: 2px solid transparent;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.day-events-list .event-card:hover {
    background: #e9ecef;
    border-color: #1db954;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.2);
}

.day-events-list .event-card:active {
    transform: translateY(0);
}

.day-events-list .event-card h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
}

.day-events-list .event-card p {
    margin: 0.25rem 0;
    color: #666;
    font-size: 0.9rem;
}

/* Share functionality */
.share-link {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

.share-link input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
}

.share-social {
    margin-top: 1rem;
}

.btn-twitter {
    background: #1da1f2;
    color: white;
}

.btn-twitter:hover {
    background: #0d8bd9;
}

/* Responsive design for calendar */
@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-controls {
        flex-direction: column;
    }

    .event-card {
        flex-direction: column;
        text-align: center;
    }

    .event-date {
        width: 100%;
        max-width: 150px;
        margin: 0 auto;
    }

    .event-actions {
        flex-direction: row;
        justify-content: center;
        width: 100%;
    }

    .stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-header,
    .calendar-controls,
    .event-card {
        margin-left: -10px;
        margin-right: -10px;
        border-radius: 10px;
    }

    .event-actions {
        flex-direction: column;
    }
}

/* Event Source Styling */
.event-source {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-source.confirmed {
    background: #e8f5e8;
    border: 1px solid #4caf50;
    color: #2e7d2e;
}

.event-source.simulated {
    background: #fff3e0;
    border: 1px solid #ff9800;
    color: #f57c00;
}

.source-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.source-text {
    font-weight: 600;
    flex: 1;
}

.ticket-link {
    background: #1976d2;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: background 0.3s;
}

.ticket-link:hover {
    background: #1565c0;
}

.price-range {
    margin-top: 0.25rem;
    color: #666;
    font-style: italic;
}

.price-range small {
    font-size: 0.75rem;
}

/* ===== Events Map Styles ===== */
.events-map-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.events-map-container h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

#eventsMap {
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Custom marker icon styles */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
}

/* Map popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.leaflet-popup-content {
    margin: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.marker-popup-content h4 {
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #1db954;
    padding-bottom: 8px;
}

.event-marker-popup .leaflet-popup-close-button {
    color: #666;
    font-size: 24px;
    padding: 4px 8px;
}

.event-marker-popup .leaflet-popup-close-button:hover {
    color: #333;
}

/* Responsive map styles */
@media (max-width: 768px) {
    .events-map-container {
        padding: 1rem;
    }

    #eventsMap {
        height: 400px !important;
    }

    .events-map-container h4 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    #eventsMap {
        height: 300px !important;
    }
}