﻿.camera-overlay {
    position: fixed;
    inset: 0;
    background: black;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

    .camera-overlay.hidden {
        display: none;
    }

.camera-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#video {
    flex: 1;
    width: 110%;
    /*height: calc(100% - 230px);*/
    object-fit: cover;
    background: black;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.photo-display {
    width: 100%;
    /*height: 100%;*/
    object-fit: cover;
    position: absolute;
    top: 10%;
    left: 0;
    aspect-ratio: .75;
    border-top: 2px black solid;
    border-bottom: 2px black solid;
}

.camera-utilities {
    position: absolute;
    bottom: 0px;
    width: 100%;
    height: 175px;
    background: linear-gradient( 0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.35) 75%, rgba(0,0,0,0) 100% );
    z-index: 2;
}

.camera-controls {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    position: absolute;
    bottom: 0px;
    width: 100%;
    z-index: 5;
    max-height: 90px;
}

.camera-icons {
    font-size: 60px !important;
    color: lightgray;
}

/*Camera Shutter Button*/
.camera-shutter {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: 6px solid #e5e5e5;
    box-shadow: 0 0 0 4px white inset, /* inner white ring */
    0 4px 8px rgba(0, 0, 0, 0.25); /* outer shadow */
    cursor: pointer;
    transition: all 0.1s ease-in-out;
}

    .camera-shutter::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: white;
        transition: all 0.1s ease-in-out;
    }

    .camera-shutter:active::before {
        width: 54px;
        height: 54px;
        background: #d9d9d9;
    }

    .camera-shutter:active {
        box-shadow: 0 0 0 4px white inset, 0 2px 4px rgba(0, 0, 0, 0.35);
    }


.camera-label {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 0.5rem 1rem;
    text-align: center;
    color: white;
    background: linear-gradient( 180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.35) 75%, rgba(0,0,0,0) 100% );
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Carousel overlay */
.custom-carousel {
    position: absolute;
    bottom: 100px;
    width: 100%;
    display: flex;
    overflow-x: auto;
    padding: 0.5rem;
    z-index: 5;
    height: 155px;
    scroll-behavior: smooth; /* smooth scroll for centering */
    padding-left: 200px;
    padding-right: 200px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

/* Carousel items */
.custom-carousel-item {
    display: block;
    color: white;
    margin: 0 0.5rem;
    text-align: center;
    cursor: pointer;
    width: 100px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

    .custom-carousel-item img {
        max-width: 100px;
        border: 2px solid transparent;
        border-radius: 8px; /* rounded corners */
        box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        transition: transform 0.2s ease, border-color 0.2s ease;
        aspect-ratio: 1;
        object-fit: cover;
    }

    /* Hover effect */
    .custom-carousel-item:hover img {
        transform: scale(1.05);
    }

    /* Selected effect */
    .custom-carousel-item.selected img {
        border-color: yellow;
        transform: scale(1.2) translateY(10px); /* image moves down */
        transition: transform 0.3s ease, border-color 0.3s ease;
    }

    .custom-carousel-item.selected span {
        display: inline-block;
        transform: translateY(-3px) scale(1.3); /* label moves up and grows */
        color: yellow;
        transition: transform 0.3s ease, color 0.3s ease;
    }

.missing-required {
    border: 4px solid red;
}

.photo-display {
    z-index: 1; /* behind label and controls */
}

/*PHOTO PLACEHOLDER STYLING*/
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 150px); /* fixed width columns */
    gap: 16px;
    justify-content: center; /* centers the whole grid */
    justify-items: center;
    padding: 16px;
    margin: 0 auto;
}

.image-placeholder {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 8px;
    background-color: #f0f0f0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
    /* Make it look like it’s already “hovered” */
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
    transition: transform 0.15s ease;
}

    .image-placeholder:active {
        transform: translateY(0); /* small tap feedback */
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }

    .image-placeholder img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.placeholder-label {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 1.2rem;
    color: #333;
    background: rgba(255,255,255,0.7);
    padding: 2px 4px;
    font-weight: bold;
}