/* === Image Process page specific styles === */

/* 3-part button styling (head, body, tail) */
#take-photo-btn,
#upload-photo-btn,
#load-stored-images-btn,
#image2image-btn,
#image2video-btn {
    position: relative;
    background-color: transparent;
    border: none;
    padding: 10px 20px;
    z-index: 1;
}

#take-photo-btn::before,
#upload-photo-btn::before,
#load-stored-images-btn::before,
#image2image-btn::before,
#image2video-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background-image: url('../images/ct_button1_head.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: -1;
}

#take-photo-btn::after,
#upload-photo-btn::after,
#load-stored-images-btn::after,
#image2image-btn::after,
#image2video-btn::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 20px;
    height: 100%;
    background-image: url('../images/ct_button1_tail.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    z-index: -1;
}

.button-body-wrapper {
    position: absolute;
    display: block;
    left: 19px;
    right: 19px;
    top: 0;
    height: 100%;
    background-image: url('../images/ct_button1_body.png');
    background-size: 100% 100%;
    background-repeat: repeat-x;
    background-position: left center;
    z-index: 0;
}

.button-text {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.button-label {
    white-space: nowrap;
}

.button-credit {
    font-size: 0.85em;
    opacity: 0.9;
}

/* Toggle buttons */
#toggle-stored-images-btn,
#toggle-public-images-btn,
#toggle-chat-history-btn {
    background-image: url('../images/ct_bt_expand.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: auto;
    min-width: fit-content;
}

#view-original-btn,
#view-generated-btn {
    margin-top: 15px;
}

/* Photo and Video Display */
#uploaded-image,
#server-img,
#generated-image,
#video-preview {
    display: block;
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 15px auto;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    object-fit: contain;
}

#photo-display-section {
    text-align: center;
}

/* Canvas for photo capture */
#canvas {
    max-width: 100%;
    margin: 0 auto;
}

/* Results Display */
#results-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
    justify-content: center;
}

.result-item {
    text-align: center;
    flex-basis: 100px;
}

.result-item .color-box {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-item p {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#loader {
    font-size: 25px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.job-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Scrollbar styling for stored images container */
#stored-images-container::-webkit-scrollbar {
    width: 10px;
}

#stored-images-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

#stored-images-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

#stored-images-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Responsive styles */
@media (max-width: 768px) {
    .result-item {
        flex-basis: 80px;
    }

    .result-item .color-box {
        width: 80px;
        height: 80px;
    }
}
