/* Notion Slideshow - Component Styles */
/* Uses shared variables from /styles.css */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--notion-bg-primary);
    color: var(--notion-text-primary);
    font-family: var(--notion-font-family);
}

body {
    overflow: hidden;
    width: 100%;
    height: 100vh;
}

.container {
    max-width: 100%;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: flex-start;
}

/* Swiper */
.swiper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: flex-start;
}

.swiper-slide {
    height: 100%;
    transition: transform 0.1s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.slide-content {
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--notion-spacing-2xl);
}

/* Media */
.swiper-slide img,
.swiper-slide video {
    max-height: 80vh;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Pagination */
.swiper-pagination {
    position: fixed !important;
    bottom: 10px !important;
    z-index: 10;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    text-align: center !important;
}

.swiper-pagination-bullet {
    background: var(--notion-text-muted);
    opacity: 0.5;
    cursor: pointer;
    transition: all var(--notion-transition-slow);
    margin: 0 5px;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--notion-accent);
    box-shadow: 0 0 6px var(--notion-accent);
}

/* Active/Adjacent slides */
.swiper-slide-active {
    transform: scale(1.2);
    z-index: 2;
}

.swiper-slide-prev,
.swiper-slide-next {
    transform: scale(0.7);
    opacity: 0.2;
}

/* Caption */
.slide-caption {
    position: relative;
    bottom: -10px;
    text-align: center;
    color: var(--notion-text-muted);
    font-size: var(--notion-font-size-lg);
    font-weight: 300;
    letter-spacing: 0.02em;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.caption-text {
    display: inline-block;
    max-width: 100%;
    white-space: pre-line;
}

/* Links */
.swiper-slide a {
    position: relative;
    display: inline-block;
    width: fit-content;
}

.swiper-slide a:hover img,
.swiper-slide a:hover video {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), 0 0 20px var(--notion-accent);
}

.swiper-slide a::after {
    content: '↗';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 255, 255, 0.7);
    padding: 5px 8px;
    border-radius: 0 8px 0 8px;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity var(--notion-transition-base);
}

.swiper-slide a:hover::after {
    opacity: 1;
    background: var(--notion-accent);
}

.slide-caption a {
    color: inherit;
    text-decoration: none;
    transition: all var(--notion-transition-base);
}

.slide-caption a:hover {
    text-decoration: underline;
}

.slide-caption a::after {
    display: none;
}

/* Loader override for slideshow */
.maia-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transform: none;
}

.maia-loader__dot {
    width: 6px;
    height: 6px;
    background: var(--notion-text-muted);
    border-radius: 50%;
    animation: slide-pulse 1.2s ease-in-out infinite;
}

@keyframes slide-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Video fallback */
.video-fallback {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--notion-radius-xl);
    border: 2px dashed var(--notion-text-muted);
}

.video-placeholder {
    text-align: center;
    color: var(--notion-text-muted);
}

.video-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.video-download {
    display: inline-block;
    margin-top: 10px;
    padding: var(--notion-spacing-md) var(--notion-spacing-xl);
    background: var(--notion-accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--notion-radius-md);
    transition: filter var(--notion-transition-base);
}

.video-download:hover {
    filter: brightness(1.2);
}

/* Error/Placeholder */
.slide-placeholder {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: var(--notion-text-muted);
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--notion-text-muted);
    border-radius: 50%;
    border-top-color: var(--notion-accent);
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

.error-message {
    color: var(--notion-text-muted);
    text-align: center;
    padding: 20px;
}

/* Mobile */
@media (max-width: 768px) {
    .swiper-pagination {
        bottom: 25px !important;
    }
    
    .swiper-pagination-bullet {
        width: 14px;
        height: 14px;
        margin: 0 4px;
    }
    
    .slide-caption {
        font-size: var(--notion-font-size-md);
        padding: var(--notion-spacing-md) var(--notion-spacing-xl);
    }
}

@media (hover: none) {
    .swiper-pagination {
        bottom: 20px !important;
    }
    
    .swiper-pagination-bullet {
        width: 12px;
        height: 12px;
        margin: 0 6px;
    }
}
