/* Enhanced styles applied by JavaScript */

/* Enhanced event cards */
.event.enhanced {
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.event.enhanced:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Poster Carousel Styles */
.poster-carousel {
    margin-top: 1rem;
}

.poster-container {
    position: relative;
}

.poster-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 0;
}

.nav-dot {
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0.25rem;
    border-radius: 50%;
    min-width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-dot:hover {
    color: #9ca3af;
    background-color: #f3f4f6;
}

.nav-dot.active {
    color: #3b82f6;
}

.nav-dot:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Smooth transition for poster switching */
.poster-container .event-link,
.poster-container .embed-placeholder,
.poster-container .instagram-embed {
    transition: opacity 0.3s ease;
}

/* Event poster image styles */
.event-poster-link {
    display: block;
    margin-top: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-poster-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.event-poster-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
}

/* Instagram embed styles */
.embed-placeholder {
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    margin-top: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.instagram-embed {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 1rem;
}

/* Responsive grid adjustments */
@media (min-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
}

@media (min-width: 1024px) {
    .events-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    }
}

/* Favourites functionality */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.event-name {
    flex: 1;
    padding-right: 0.5rem;
    margin: 0;
}

.favorite-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: #6b7280;
    transition: all 0.2s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.favorite-btn:hover {
    background: #f3f4f6;
    color: #374151;
    transform: scale(1.1);
}

.favorite-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.favorite-btn.favorited {
    color: #fbbf24;
}

.favorite-btn.favorited:hover {
    color: #f59e0b;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    max-width: 300px;
    pointer-events: none;
}

.toast-content {
    background: #1f2937;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    font-size: 0.875rem;
    border: 1px solid #374151;
}

.toast.show {
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
}

.toast.hide {
    animation: slideOut 0.3s ease-in;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Print styles */
@media print {
    .event-link {
        text-decoration: underline;
    }

    .embed-placeholder,
    .instagram-embed {
        display: none;
    }

    .event-link[data-embed="true"] {
        display: block !important;
    }

    /* Hide poster navigation in print */
    .poster-nav {
        display: none;
    }

    /* Hide favourites buttons in print */
    .favorite-btn {
        display: none;
    }

    /* Show all poster URLs in print */
    .poster-carousel::after {
        content: "Multiple posters available online";
        display: block;
        font-size: 0.75rem;
        color: #6b7280;
        margin-top: 0.5rem;
    }

    /* Hide toast in print */
    .toast {
        display: none !important;
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }

    .favorite-btn {
        width: 2.5rem;
        height: 2.5rem;
    }
}
