/* 
    Created on : 13. 3. 2025, 15:37:10
    Author     : jelinjon
*/
/* tab selector */
#tab-views {
    .number-input-wrapper {
        input {
            border: 1px solid var(--dark-green);
            padding: 10px 20px;
            cursor: pointer;

            border-radius: 4px;
            text-decoration: none;
            font-family: "Times New Roman", Times, serif;
            font-size: 1em;
            width: 80px;
        }
    }
    
    
    ul {
        padding: 0 0 2px 0;
        
        background-color: var(--dark-green);
        li {
            padding: 0;
            border: none;
            background-color: var(--dark-green);
            
            a {
                padding: 14px 16px;
                text-decoration: none;
                font-weight: 400;
                font-family: "Times New Roman", Times, serif;
                color: var(--text-accent-color);
            }
            
            /* active tab */
            &.ui-state-active {
                border: none;
                background-color: var(--light-green);
                box-shadow: none;
            }
            &.ui-state-hover {
                border: none;
                background-color: var(--light-green);
                box-shadow: 0 4px 8px 0 var(--shadow-primary-color), 0 6px 20px 0 var(--shadow-primary-color);
                a {
                    
                }
            }
        }
    }
    
    > div {
        background-color: var(--lightest-green);
    }
    
    
    .shuffle-form {
        flex-direction: row;
        justify-content: center;
        height: 100vh;
        
        .controls {
            padding-top: 16px;
        }
        .image-switcher {
            height: 90vh;
            display: flex;
            flex-direction: row;
            justify-content: center;
            overflow: hidden;
            
            /*overwrite PF css*/
            a {
                position: relative !important;
                height: fit-content !important;
                background-color: none !important;
            }
            
            img {
                max-width: 90vw;
                width: auto;
                max-height: 90vh;
                height: auto;
            }
        }
        
        .controls {
            display: flex;
            flex-direction: row;
            justify-content: center;
        }
        input[type=submit], button {
            margin-right: 20px;
            
            background-color: var(--confirm-button-color);
            border: none;
            padding: 10px 20px;
            cursor: pointer;

            border-radius: 4px;
            text-decoration: none;
            font-family: "Times New Roman", Times, serif;
            color: var(--text-accent-color);
            font-size: 1em;

            &:disabled {
                background-color: var(--gray);
                color: var(--text-accent-color);
                cursor: not-allowed;
                box-shadow: none;
                opacity: 0.6;
            }

            &.delete, &.cancel {
                background-color: var(--cancel-button-color);
                margin: 0px 10px;

                &:hover {
                    background-color: var(--cancel-button-accent-color);
                }
            }

            &:hover {
                background-color: var(--light-green);
                box-shadow: 0 4px 8px 0 var(--shadow-primary-color), 0 6px 20px 0 var(--shadow-primary-color);
            }
        }
    }
}

#fullscreen-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
    
    .slideshow-form {
        .photo-stack {
            position: relative;
            width: min(90vw, 700px);
            height: min(75vh, 650px);
            overflow: visible;
        }
        
        .stack-photo {
            --x: 0px;
            --y: 0px;
            --rotation: 0deg;
            --start-rotation: -15deg;
            --photo-width: min(400px, 80vw);
            
            position: absolute;
            left: 50%;
            top: 50%;
            width: max-content;
            max-height: 75vh;
            padding: 12px 12px 36px;
            box-sizing: border-box;
            background: white;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            opacity: 0;
            
            /*calc(-50% + var(--y))*/
            transform:
                translate(calc(-50% + var(--x)), calc(-50% - 120vh))
                rotate(var(--start-rotation));
            
            transition:
                transform 0.6s ease-in,
                opacity 0.35s ease-in 0.1s;
            
            img {
                display: block;
                width: 100%;
                height: auto;
                max-height: calc(75vh - 50px);
                object-fit: contain;
            }
        }

        .stack-photo.falling {
            opacity: 1;
            transform:
                translate(calc(-50% + var(--x)), calc(-50% + var(--y)))
                rotate(var(--rotation));
            transition:
                transform 1s cubic-bezier(0.2, 0.9, 0.3, 1.12),
                opacity 0.15s ease-out;
        }
        
        .stack-photo.buried {
            opacity: 0;
            visibility: hidden;
            transition:
                opacity 0.5s ease-out,
                visibility 0s linear 0.5s;
        }
        
        .slideshow-controls {
            position: fixed;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 999px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);

            button {
                padding: 0.4rem 0.9rem;
                border: 0;
                border-radius: 999px;
                cursor: pointer;
            }

            button:disabled {
                opacity: 0.4;
                cursor: default;
            }
        }
    }
    
    .rating-form {
        width: 100%;
        display: flex;
        justify-content: center;
        
        .card {
            width: 100%;
            min-height: 680px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            box-sizing: border-box;
            
            .ui-galleria {
                width: 100%;
                max-width: 1100px;
                margin: 0 auto;
            }
            .ui-galleria-thumbnail-wrapper {
                display: flex;
                align-items: center;
                justify-content: center;
                flex: 0 0 120px;
                width: 120px;
                max-width: 120px;
                overflow: visible;
            }
            
            
            .ui-galleria-thumbnail-container {
                width: 100%;
                /*max-height: 590px;*/
                height: 620px;
            }
            
            .ui-galleria-thumbnail-item {
                display: flex;
                align-items: center;
                justify-content: center;
                overflow: hidden;
            }
            
            .ui-galleria-thumbnail-item img {
                display: block;
                width: 100%;
                height: 85px;
                object-fit: contain;
                object-position: center;
            }

            .ui-galleria-item-wrapper {
                flex: 1 1 auto;
                min-width: 0;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .ui-galleria-item-container {
                width: 100%;
                height: 620px;
            }

            .ui-galleria-item {
                width: 100%;
                height: 620px;
                display: flex;
                align-items: center;
                justify-content: center;
                overflow: hidden;
                background-color: rgba(0, 0, 0, 0.9);
            }

            .ui-galleria-item img,
            .main-photo {
                display: block;
                width: 100%;
                height: 100%;
                max-width: 100%;
                max-height: 620px;
                object-fit: contain;
                object-position: center;
            }

            .photo-rating-item {
                width: 100%;
                height: 100%;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 12px;
            }

            .photo-rating-controls {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 10px;
                flex-shrink: 0;
            }

            .rating-button {
                width: 44px;
                height: 40px;
                font-size: 1rem;
                font-weight: 600;
                cursor: pointer;
            }
        }
    }
}

@media (max-width: 870px) {
    #fullscreen-wrapper {
        padding: 0.5rem;

        .rating-form .ui-galleria-item-container,
        .rating-form .ui-galleria-item {
            height: 65vh;
            min-height: 350px;
        }

        .rating-form .ui-galleria-thumbnail-wrapper {
            flex-basis: 85px;
            width: 85px;
            max-width: 85px;
        }

        .rating-form .ui-galleria-thumbnail-item img {
            height: 65px;
        }
    }
}
@media (max-width: 600px) {
    #fullscreen-wrapper .slideshow-form .slideshow-controls {
        flex-direction: column;
        border-radius: 30px;
    }
}