/**
 * Image Uploader Component Styles
 * Contains all styles specific to the imageUploader component and its UI elements
 */

/* Container Styles */
.upload-container {
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 10px 20px 20px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--grey-100);
    border: 1px solid var(--grey-300);
    z-index: 200;
}

.upload-control-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 12px;
}

.photo-counter {
    color: var(--grey-500);
}

.photo-counter strong {
    color: var(--blue-midnight);
}

.upload-control-wrapper .add-media-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.upload-control-wrapper .create-report-button {
    display: flex;
    justify-content: end;
}

.upload-control-wrapper .create-report-button button{
    height: 100%;
    padding: 0;
    background-color: unset;
}

.upload-control-wrapper > div {
    flex: 1;
}

#imageInput {
    display: none;
}

.upload-container #image-container {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-400);
    gap: 8px;
    scrollbar-gutter: stable;
    cursor: pointer;
}

#image-container::-webkit-scrollbar {
    height: 6px;
}
#image-container::-webkit-scrollbar-track {
    background: var(--white);
}
#image-container::-webkit-scrollbar-thumb {
    background: var(--grey20);
    border-radius: 4px;
}

#image-container img {
    height: 100%;
    max-height: 70px;
    border-radius: 8px;
}

#processButton {
    border-radius: 50%;
    position: relative;
    background-color: var(--brand-green);
}
#processButton:disabled {
    background-color: var(--grey-300);
}

/* Progress Container */
#progressContainer {
    width: 90%;
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
    margin-top: 10px;
}

#progressContainer progress {
    width: 100%;
    height: 20px;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

#progressContainer progress::-webkit-progress-bar {
    background-color: #f3f3f3;
    border-radius: 10px;
    overflow: hidden;
}

#progressContainer progress::-webkit-progress-value {
    background-color: var(--brand-green);
    border-radius: 10px 0 0 10px;
}

#progressContainer progress::-moz-progress-bar {
    background-color: var(--brand-green);
    border-radius: 10px;
}

#progressContainer progress {
    background-color: var(--brand-green);
    border-radius: 10px;
}

/* Image Overlay Styles */
#imgOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background-color: white;
    z-index: 3000;
    overflow-y: auto;
}

.photo-top-container {
    position: fixed;
    top: 0;
    padding: 20px;
    z-index: 1000;
}

#closePhotoOverlayBtn {
    cursor: pointer;
}

#imgOverlay #fullwidth-image-container {
    width: 100%;
    max-width: 800px;
    scrollbar-width: thin;
    scrollbar-color: var(--grey-400);
    background-color: white;
    padding: 16px;
    margin: 0 auto;
}

#imgOverlay #fullwidth-image-container .fullwidth-img-wrapper {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0 0 16px 0;
    padding: 0;
}

/* Delete button styles for images */
.image-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--blue-midnight);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.image-delete-btn:hover {
    opacity: 1;
}

.image-delete-btn img {
    width: 18px !important;
    height: 18px !important;
}

#imgOverlay #fullwidth-image-container img {
    width: 100%;
    height: auto;
}

/* Android Action Sheet Styles */
.android-action-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.action-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.action-sheet-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 8px 8px 0 0;
    padding: 16px;
}

.action-sheet-header h3 {
    margin: 0;
    color: #01232C;
    font-size: 18px;
    font-weight: 600;
}

.action-sheet-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-sheet-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 16px;
    color: #01232C;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.action-sheet-btn:active {
    background-color: #e0e0e0;
}

/* Responsive Styles */
@media screen and (min-width: 600px) {
    .upload-container {
        position: fixed;
        width: 100vw;
        max-width: 600px;
        border-radius: 16px;
        bottom: 16px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Print Styles */
@media print {
    .upload-container {
        order: 3;
        display: flex;
        flex-direction: column-reverse !important;
        position: relative;
        width: 100%;
        border-radius: 0;
        border: none;
        padding: 0 20px;
        max-width: none;
        bottom: unset;
        left: unset;
        transform: unset;
        background-color: unset;
        height: auto;
        max-height: none;
    }
    #image-container {
        flex-wrap: wrap !important;
        page-break-inside: avoid;
    }
    #image-container img {
        width: calc(50% - 4px);
        max-height: none;
        border-radius: 0;
        page-break-inside: avoid;
    }
} 