/* TZD Events Module - Complete Styles */
.tzdevents-module {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filter Bar */
.tzdevents-filters {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.tzdevents-filter-row-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

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

.tzdevents-filter-btn {
    padding: 8px 20px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f5f5f5;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tzdevents-filter-btn:hover {
    border-color: #cd2c29;
    color: #cd2c29;
    background: #fff;
}

.tzdevents-filter-btn.active {
    background: #cd2c29;
    color: #fff;
    border-color: #cd2c29;
}

.tzdevents-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    margin-left: auto;
}

.tzdevents-search-input {
    width: 100%;
    padding: 9px 14px 9px 42px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 14px center;
}

.tzdevents-search-input:focus {
    outline: none;
    border-color: #cd2c29;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,53,76,0.08);
}

.tzdevents-filter-selects {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.tzdevents-category-dropdown {
    padding: 9px 36px 9px 16px;
    border-radius: 50px;
    border: 2px solid #eee;
    background: #fafafa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
    color: #555;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    min-width: 180px;
    transition: all 0.2s;
}

.tzdevents-category-dropdown:focus {
    border-color: #cd2c29;
    outline: none;
}

.tzdevents-date-filters {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.tzdevents-date-input {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tzdevents-date-input label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tzdevents-date-input input[type="date"] {
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 50px;
    font-size: 0.85rem;
    background: #fafafa;
    transition: all 0.2s;
}

.tzdevents-date-input input[type="date"]:focus {
    border-color: #cd2c29;
    outline: none;
}

/* Timeline Slider */
.tzdevents-timeline {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    padding: 16px 24px;
    margin-bottom: 28px;
}

.tzdevents-timeline-header {
    margin-bottom: 8px;
}

.tzdevents-timeline-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #cd2c29;
}

.tzdevents-timeline-slider-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tzdevents-timeline-nav {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #eee;
    background: #fafafa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s;
}

.tzdevents-timeline-nav:hover {
    background: #cd2c29;
    border-color: #cd2c29;
    color: #fff;
}

.tzdevents-timeline-track {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    padding: 12px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tzdevents-timeline-track::-webkit-scrollbar {
    display: none;
}

.tzdevents-timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #eee, #ddd, #eee);
    transform: translateY(-50%);
    z-index: 1;
}

.tzdevents-timeline-dates {
    display: flex;
    gap: 0;
    position: relative;
    z-index: 2;
    width: max-content;
}

.tzdevents-timeline-month {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    color: #cd2c29;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 8px;
    align-self: center;
    white-space: nowrap;
    border-left: 2px solid #cd2c29;
}

.tzdevents-timeline-dot {
    flex-shrink: 0;
    width: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.tzdevents-timeline-dot .dot-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #ddd;
    transition: all 0.2s ease;
}

.tzdevents-timeline-dot .dot-label {
    font-size: 0.65rem;
    color: #bbb;
    font-weight: 600;
    opacity: 0;
    transition: all 0.2s;
}

.tzdevents-timeline-dot:hover .dot-circle {
    background: #cd2c29;
    box-shadow: 0 0 0 2px #cd2c29;
    transform: scale(1.3);
}

.tzdevents-timeline-dot:hover .dot-label {
    opacity: 1;
    color: #cd2c29;
}

.tzdevents-timeline-dot.has-events .dot-circle {
    background: #cd2c29;
    box-shadow: 0 0 0 1px #cd2c29;
    opacity: 0.5;
}

.tzdevents-timeline-dot.has-events .dot-label {
    opacity: 1;
    color: #ccc;
}

.tzdevents-timeline-dot.today .dot-circle,
.tzdevents-timeline-dot.active .dot-circle {
    background: #cd2c29;
    box-shadow: 0 0 0 3px rgba(232,53,76,0.3);
    width: 16px;
    height: 16px;
    opacity: 1;
}

.tzdevents-timeline-dot.today .dot-label,
.tzdevents-timeline-dot.active .dot-label {
    opacity: 1;
    color: #cd2c29;
    font-weight: 700;
}

/* Events Grid - 4 columns */
.tzdevents-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Event Card */
.tzdevents-event-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.tzdevents-event-card.featured {
    box-shadow: 0 2px 12px rgba(0,123,255,0.2);
}

.tzdevents-event-card.featured:hover {
    box-shadow: 0 8px 25px rgba(0,123,255,0.3);
}

/* Card Image */
.tzdevents-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tzdevents-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tzdevents-event-card:hover .tzdevents-card-image img {
    transform: scale(1.05);
}

.tzdevents-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tzdevents-card-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #007bff;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tzdevents-card-date-box {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tzdevents-card-date-box .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
    line-height: 1;
}

.tzdevents-card-date-box .month {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

/* Multi-day date box */
.tzdevents-card-date-box.multi-day {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem 0.6rem;
}

.tzdevents-card-date-box.multi-day .day {
    font-size: 1rem;
    display: inline;
}

.tzdevents-card-date-box.multi-day .date-month-inline {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
}

.tzdevents-card-date-box.multi-day .date-separator {
    font-size: 0.9rem;
    font-weight: 700;
    color: #999;
}

/* Card Content */
.tzdevents-card-content {
    padding: 1rem;
}

.tzdevents-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #007bff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tzdevents-card-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tzdevents-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.tzdevents-card-title a:hover {
    color: #007bff;
}

.tzdevents-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tzdevents-card-time,
.tzdevents-card-location,
.tzdevents-card-tickets {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #666;
}

.tzdevents-card-tickets {
    color: #b45309;
    font-weight: 500;
}

.tzdevents-card-time svg,
.tzdevents-card-location svg,
.tzdevents-card-tickets svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.tzdevents-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #007bff;
    text-decoration: none;
}

.tzdevents-card-more:hover {
    text-decoration: underline;
}

.tzdevents-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.tzdevents-card-actions .tzdevents-card-more {
    margin-top: 0;
}

.tzdevents-card-calendar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f7ff;
    color: #007bff;
    transition: all 0.2s ease;
}

.tzdevents-card-calendar:hover {
    background: #007bff;
    color: #fff;
}

.tzdevents-card-location {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Events */
.tzdevents-no-events {
    text-align: center;
    padding: 4rem 1rem;
    color: #666;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Loading State */
.tzdevents-events-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .tzdevents-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .tzdevents-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tzdevents-filter-buttons {
        overflow-x: auto;
        padding-bottom: 0.5rem;
        flex-wrap: nowrap;
    }
    
    .tzdevents-filter-btn {
        white-space: nowrap;
    }
    
    .tzdevents-filter-selects {
        margin-left: 0;
        flex-direction: column;
    }
    
    .tzdevents-events-grid {
        grid-template-columns: 1fr;
    }
    
    .tzdevents-card-image {
        height: 200px;
    }

    .tzdevents-search {
        flex: 1 1 100%;
    }
}

/* Short description */
.tzdevents-card-desc {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin: 4px 0 8px;
}

/* Load more */
.tzdevents-load-more-wrap {
    text-align: center;
    margin-top: 28px;
}

.tzdevents-load-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 32px;
    background: #fff;
    color: #333;
    border: 2px solid #cd2c29;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tzdevents-load-more:hover {
    background: #cd2c29;
    color: #fff;
}

.tzdevents-load-more-count {
    font-weight: 400;
    opacity: 0.7;
}

/* Share */
.tzdevents-card-share-wrap {
    position: relative;
}

.tzdevents-card-share-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.tzdevents-card-share-btn:hover {
    color: #cd2c29;
}

.tzdevents-card-share-popup {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.tzdevents-card-share-popup a,
.tzdevents-card-share-popup button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.tzdevents-card-share-popup a:hover,
.tzdevents-card-share-popup button:hover {
    background: #e5e5e5;
}
