/* /css/results.css */
/* This file contains styles for the result preview modals. */
/* It relies on variables defined in variables.css */

/* ==========================================================================
   1.0 Common Modal Structure (Single & Video)
   ========================================================================== */

.result-modal-content {
    /* Make result modals larger than standard modals */
    max-width: 64rem; /* 1024px */
    width: 90vw;
    height: 90vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.result-media-container {
    flex-grow: 1; /* Allows this container to fill available space */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* Important for flexbox shrinking */
    padding-bottom: 1rem;
}

.result-media-item {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    background-color: var(--color-background); /* A fallback color for transparent images */
}

.result-actions {
    flex-shrink: 0; /* Prevents this container from shrinking */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem; /* Space between buttons */
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

/* ==========================================================================
   2.0 Multi-Image Modal Specific Styles
   ========================================================================== */

.result-modal-content-multi {
    max-width: 64rem; /* 1024px */
    width: 90vw;
    height: 90vh;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

/* Main Swiper container for thumbnails */
.thumbnail-swiper {
    width: 100%;
    height: 90px; /* Fixed height for the thumbnail bar */
    margin-top: 1rem;
    padding: 0 40px; /* Space for the navigation arrows */
    flex-shrink: 0; /* Prevent it from shrinking */
    box-sizing: border-box;
}

/* Styles for individual thumbnail slides */
.thumbnail-slide {
    width: 80px;
    height: 80px;
    border-radius: 0.375rem; /* 6px */
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.6;
    box-sizing: border-box;
}

.thumbnail-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style for the currently selected/active thumbnail */
.thumbnail-slide.swiper-slide-thumb-active {
    border-color: var(--color-primary-accent);
    opacity: 1;
}

/* Swiper navigation arrow styling */
.thumbnail-swiper .swiper-button-next,
.thumbnail-swiper .swiper-button-prev {
    color: var(--color-primary-accent);
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    margin-top: 0; /* Override default margin */
}

.thumbnail-swiper .swiper-button-next:after,
.thumbnail-swiper .swiper-button-prev:after {
    font-size: 1rem; /* Make arrows smaller */
    font-weight: bold;
}

/* ==========================================================================
 3.0 Main Image Swiper Specific Styles
 ========================================================================== */

/* This wrapper is needed to contain the main swiper instance */
.main-image-swiper {
    width: 100%;
    height: 100%;
}

.main-image-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Style the navigation arrows for the main swiper */
.main-swiper-nav.swiper-button-next,
.main-swiper-nav.swiper-button-prev {
    color: var(--color-primary-accent);
    background-color: rgba(255, 255, 255, 0.7);
    width: 2.5rem; /* 40px */
    height: 2.5rem; /* 40px */
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.main-swiper-nav.swiper-button-next:hover,
.main-swiper-nav.swiper-button-prev:hover {
    background-color: rgba(255, 255, 255, 1);
}


.main-swiper-nav.swiper-button-next:after,
.main-swiper-nav.swiper-button-prev:after {
    font-size: 1rem; /* 16px */
    font-weight: bold;
}