/* styles/events.css */

/* Events Notification Container */
.events-notification-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Floating Icon Wrapper */
.events-icon-wrapper {
    position: relative;
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Calendar Icon */
.events-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    color: white;
}

.events-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Notification Badge */
.events-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    animation: pulse 2s infinite;
}

.events-badge.normal {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.events-badge.urgent {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    animation: urgent-pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes urgent-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.7);
    }

    50% {
        transform: scale(1.15);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 65, 108, 0);
    }
}

/* Hover Tooltip */
.events-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.events-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
}

.events-icon-wrapper:hover .events-tooltip {
    opacity: 1;
    visibility: visible;
    right: 65px;
}

/* Events Panel */
.events-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-width: 90vw;
    max-height: 70vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9998;
}

.events-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.events-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.events-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.events-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

.events-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Panel Body */
.events-panel-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(70vh - 70px);
}

/* Event Items */
.event-item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 15px;
    opacity: 0;
    animation: fadeInUp 0.5s forwards;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item.high {
    border-left: 3px solid #ff416c;
    padding-left: 10px;
}

.event-item.medium {
    border-left: 3px solid #ff9a00;
    padding-left: 10px;
}

.event-item.low {
    border-left: 3px solid #4CAF50;
    padding-left: 10px;
}

.event-date {
    min-width: 50px;
    text-align: center;
    padding: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
}

.event-day {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.event-month {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-top: 2px;
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 13px;
    color: #666;
}

.event-time,
.event-venue {
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Buttons */
.btn-register,
.btn-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-details {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-details:hover {
    background: #667eea;
    color: white;
}

/* View All Events */
.view-all-events {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.view-all-events .btn-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.view-all-events .btn-link:hover {
    color: #764ba2;
}

/* No Events */
.no-events {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation delays for event items */
.event-item:nth-child(1) {
    animation-delay: 0.1s;
}

.event-item:nth-child(2) {
    animation-delay: 0.2s;
}

.event-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* Loading Animation */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .events-notification-container {
        bottom: 20px;
        right: 20px;
    }

    .events-panel {
        bottom: 90px;
        right: 20px;
        width: calc(100vw - 40px);
        max-width: none;
        max-height: 60vh;
    }

    .events-panel-body {
        max-height: calc(60vh - 70px);
    }

    .events-tooltip {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .events-panel {
        background: #1a1a1a;
        color: #e0e0e0;
    }

    .event-title {
        color: #e0e0e0;
    }

    .event-description {
        color: #b0b0b0;
    }

    .event-date {
        background: #2a2a2a;
    }

    .event-month {
        color: #b0b0b0;
    }

    .event-meta {
        color: #b0b0b0;
    }

    .event-item {
        border-bottom-color: #333;
    }

    .view-all-events {
        border-top-color: #333;
    }
}


.event-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.event-item:last-child {
    border-bottom: none;
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .event-image {
        width: 60px;
        height: 60px;
    }

    .event-item {
        gap: 12px;
    }
}