/**
 * Events Page Enhanced Styles
 * Comprehensive styling for interactive calendar, event cards, and modals
 */

/* ==================== CALENDAR SECTION ==================== */

.events-calendar-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(10, 10, 10, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

.calendar-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.calendar-nav-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #D4AF37;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-nav-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #D4AF37;
    transform: scale(1.05);
}

#currentMonthYear {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 150px;
    text-align: center;
}

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

.calendar-day-header {
    color: #808080;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: 60px;
}

.calendar-day:hover:not(.empty) {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(229, 193, 88, 0.1));
    border-color: rgba(212, 175, 55, 0.4);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.calendar-day.empty {
    cursor: default;
    opacity: 0.3;
}

.calendar-day.today {
    background: rgba(212, 175, 55, 0.15);
    border-color: #D4AF37;
}

.calendar-day.selected {
    background: linear-gradient(135deg, #D4AF37, #E5C158);
    border-color: #E5C158;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
}

.calendar-day.selected .day-number {
    color: #0a0a0a;
    font-weight: 700;
}

.calendar-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: #D4AF37;
    border-radius: 50%;
}

.calendar-day.selected.has-events::after {
    background: #0a0a0a;
}

.day-number {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
}

.event-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #D4AF37;
    color: #0a0a0a;
    font-size: 0.65rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== FILTERS SECTION ==================== */

.events-filters-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(15, 15, 15, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filters-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group h3 {
    color: #b0b0b0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #b0b0b0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    color: #D4AF37;
}

.filter-btn.active {
    background: #D4AF37;
    border-color: #D4AF37;
    color: #0a0a0a;
    font-weight: 600;
}

.search-filter {
    width: 100%;
}

.search-filter input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-filter input:focus {
    outline: none;
    border-color: #D4AF37;
    background: rgba(255, 255, 255, 0.08);
}

.search-filter {
    position: relative;
}

.search-filter i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #808080;
}

/* ==================== EVENTS LIST ==================== */

.events-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.events-list-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0;
}

#eventsCount {
    color: #808080;
    font-size: 0.95rem;
}

#eventsListContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.event-card {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(20, 20, 20, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.event-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.event-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(212, 175, 55, 0.25);
    border-color: rgba(212, 175, 55, 0.4);
}

.event-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.event-type-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(212, 175, 55, 0.95);
    color: #0a0a0a;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.friends-going-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    color: #D4AF37;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.event-content {
    padding: 1.5rem;
}

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

.event-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.event-save-btn {
    background: transparent;
    border: none;
    color: #808080;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.25rem;
}

.event-save-btn:hover {
    color: #D4AF37;
    transform: scale(1.1);
}

.event-save-btn.saved {
    color: #D4AF37;
}

.event-venue,
.event-datetime,
.event-price {
    color: #b0b0b0;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-venue i,
.event-datetime i,
.event-price i {
    color: #D4AF37;
    width: 16px;
}

.event-description {
    color: #808080;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 1rem 0;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.event-tag {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.event-attendance {
    margin-bottom: 1rem;
}

.attendance-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.attendance-fill {
    height: 100%;
    background: linear-gradient(90deg, #D4AF37, #E5C158);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.attendance-text {
    color: #808080;
    font-size: 0.85rem;
}

.event-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.event-actions button {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-rsvp {
    background: #D4AF37;
    color: #0a0a0a;
    grid-column: 1 / -1;
}

.btn-rsvp:hover {
    background: #E5C158;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.btn-rsvp.rsvpd {
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    border: 2px solid #D4AF37;
}

.btn-details,
.btn-share,
.btn-calendar {
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-details:hover,
.btn-share:hover,
.btn-calendar:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.3);
}

/* ==================== EVENT DETAILS MODAL ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.event-details-content {
    background: #1a1a1a;
    border-radius: 20px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #D4AF37;
    color: #0a0a0a;
    transform: rotate(90deg);
}

.event-details-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.event-details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-details-body {
    padding: 2rem;
}

.event-details-body h2 {
    color: #ffffff;
    font-size: 2rem;
    margin: 1rem 0;
}

.event-detail-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #b0b0b0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.event-detail-row i {
    color: #D4AF37;
    width: 20px;
    font-size: 1.1rem;
}

.event-description-full {
    margin: 2rem 0;
}

.event-description-full h3 {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.event-description-full p {
    color: #b0b0b0;
    line-height: 1.7;
    font-size: 1rem;
}

.event-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.event-modal-actions button {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: #D4AF37;
    color: #0a0a0a;
    border: none;
}

.btn-primary:hover {
    background: #E5C158;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-primary.rsvpd {
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    border: 2px solid #D4AF37;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #b0b0b0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #D4AF37;
    border-color: rgba(212, 175, 55, 0.3);
}

/* ==================== NO EVENTS STATE ==================== */

.no-events {
    text-align: center;
    padding: 4rem 2rem;
    color: #808080;
}

.no-events i {
    font-size: 4rem;
    color: #D4AF37;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.no-events p {
    font-size: 1rem;
}

/* ==================== NOTIFICATIONS ==================== */

.notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left: 4px solid #4CAF50;
}

.notification-info {
    border-left: 4px solid #2196F3;
}

.notification i {
    font-size: 1.5rem;
}

.notification-success i {
    color: #4CAF50;
}

.notification-info i {
    color: #2196F3;
}

.notification span {
    color: #ffffff;
    font-size: 0.95rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 1024px) {
    #eventsListContainer {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .events-calendar-section,
    .events-filters-section {
        padding: 1.5rem;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        min-height: 50px;
    }

    .day-number {
        font-size: 0.9rem;
    }

    .event-indicator {
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
    }

    #eventsListContainer {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

    .btn-rsvp {
        grid-column: 1;
    }

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

    .event-modal-actions button {
        width: 100%;
    }

    .notification {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .modal {
        padding: 1rem;
    }

    .event-details-body {
        padding: 1.5rem;
    }

    .event-details-body h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-header {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-navigation {
        width: 100%;
        justify-content: center;
    }

    .filter-group {
        min-width: 100%;
    }

    .filters-row {
        flex-direction: column;
    }
}

/* ==================== CUSTOM SCROLLBAR ==================== */

.event-details-content::-webkit-scrollbar {
    width: 8px;
}

.event-details-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.event-details-content::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.5);
    border-radius: 4px;
}

.event-details-content::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}