
.style-option {
    cursor: pointer;
    transition: all 0.3s;
}
.style-option:hover {
    transform: scale(1.05);
}
.style-option.selected {
    border: 3px solid #ff9a9e;
}
.canvas-container {
    background-color:rgb(240, 240, 240);
    border-radius: 8px;
    min-height: 450px;
    display: flex;
    align-items: center;
    position: relative;
    max-width: 320px;
    flex-direction: column;
}
.canvas-container .demoImages{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    position: absolute;
    bottom: 30px;
    overflow-x: auto;
    width: 100%;
    padding: 0 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    padding-top:10px;
}
#generator {
    width: 100%;
    max-width: 100%;
}

.div-resultBox {
    width: 100%;
}

.div-resultBox .resultImage {
    width: 100%;
    max-width: 100%;
    height: auto;
}
.div-resultBox .resultImage img {
    width: 100%;
    max-width: 100%;
    height: auto;
}
.div-resultBox {
    position: relative;
}

.result-actions {
    position: absolute;
    top: 25px;
    right: 25px;
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-direction: column;
}

.action-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 5px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn i {
    font-size: 14px;
    color: #fff;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

.action-btn:hover i{
    color:#fff;
}
.div-resultImageBox{
    border-radius: 8px; 
    width: 100%;
    height: 300px;
    max-height: 300px;
    object-fit: cover;
    border-radius: 5px;
    text-align: center;
    margin-top: 15px;
    vertical-align: middle;
    display: flex;
    justify-content: center;
}
.div-previewImage{
    width: 100%;
    height: 300px;
    max-height: 300px;
    object-fit: cover;
    border-radius: 5px;
    text-align: center;
    margin-top:15px;
    vertical-align: middle;
    display: flex;
    justify-content: center;
}
.div-previewImage .div-loading{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.div-previewImage.loading img {
    animation: blurAnimation 3s infinite; 
}

@keyframes blurAnimation {
    0% { filter: blur(5px); }
    50% { filter: blur(10px); }
    100% { filter: blur(5px); } 
}

.div-resultImageBox .resultImage img{
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
    object-fit: cover;
}
#generator .resultImage img{
    height: 400px;
    border-radius: 5px;
    object-fit: cover;
}
#generator .div-resultImageBox{
    height: 390px;
    max-height: 390px;
}
.canvas-container .demoImages .item{
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;  
    border: 1px solid #fff;
}
.canvas-container .demoImages .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
    object-fit: contain;
}
#product.canvas-container,
#person.canvas-container{
    min-height: 370px;
}
#product .div-previewImage,
#person .div-previewImage{
    height: 250px;
}
#product.canvas-container .demoImages,
#person.canvas-container .demoImages{
    gap: 10px;
    position: absolute;
    bottom: 20px;
}
#product.canvas-container .demoImages .item,
#person.canvas-container .demoImages .item{
    width: 40px;
    height: 40px;
}
#original{
    max-width: 100%;
}
.max-height-250{
    max-height: 250px;
}
.upload-area {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    margin-top:40px;
    padding: 30px;
    text-align: center;
    transition: all 0.2s;
}
.upload-area:hover {
    border-color:rgb(79, 119, 237);
    background-color: #f8f9fa;
}
.btn-uploadImage{
    cursor: pointer;
}
.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.remove-image:hover {
    background-color: #f4f4f4;
}
.spinner-border{
    scale: 0.5;
}
.resultImageError{
    text-align: center;
    font-size: 13px;
    padding:20px;
    border: 1px dashed #ced4da;
    border-radius: 8px;
}
.resultImageURL{
    width: 100%;
    object-fit: contain;
}
.resultImageURL img{
    width: 100%;
    height: 400px;
    object-fit: contain;
}
.div-resultBox{
    background-color: #f4f4f4;
    border-radius: 8px;
    border:1px dashed #ced4da;
}

.photo-actions{
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom:15px;
    flex-wrap: wrap;
}
.photo-actions .action{
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    vertical-align: middle;
}
.photo-actions .action.active{
    background-color:rgb(215, 234, 255);
    color: #0055FF;
    border: 1px solid #0055FF;
}

.photo-actions .dropdown-menu ul{

}
.photo-actions .dropdown-menu ul li{
    margin: 5px 0px 5px;
}
.photo-actions .dropdown-menu .action{
    background-color:#fff !important; 
    border: none !important;
}
.card{
    margin-bottom: 15px;
    box-shadow: none;
} 

.photo-settings{
    background: #f8f9fa;
    border-radius: 10px;
    padding-bottom:20px;
    margin-bottom:20px;
}
.photo-setting-boxs{
    padding:20px 0px 10px 0px;
}
.photo-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    justify-content: center;
}

.photo-colors .color {
    width: 35px;
    height: 35px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #ffffff;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.photo-colors .color:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1;
}

.photo-colors .color.active {
    border: 2px solid rgb(86, 141, 252);
    padding:3px;
}
/* Style cho color picker */
.photo-colors .custom-color {
    position: relative;
    background: linear-gradient(45deg, 
        #FF6B6B, 
        #4ECDC4, 
        #FCE38A, 
        #95E1D3, 
        #E84A5F
    );
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite;
    border: 2px solid #ffffff;
}


.photo-colors .custom-color input[type="color"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    border-radius: 8px;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.photo-setting-box{
    display: none;
}

.photo-settings .active-tab{
    display: flex;
}

.photo-actions {
    display: none;
}

.photo-actions.active {
    display: block;
}
.photo-settings .nav-tabs .nav-item {
    margin-bottom: -2px;
    margin-top: 0px;
}
.photo-settings .nav-link.active {
    color: #0d6efd;
    background: #dae6ff;
    border-bottom: 2px #05f solid !important;
}
.demo-remove-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

.item:hover .demo-remove-btn {
    opacity: 1;
}
/* Media queries cho mobile */
@media (max-width: 768px) {
    
    .canvas-container .demoImages .item {
        flex-shrink: 0;  
        width: 80px;     
        min-width: 80px; 
    }
    .photo-colors{
        flex-wrap: nowrap;
    }
    .photo-colors .color{
        flex-shrink: 0;  
    }
    .mobileScroll{
        width: 100%;  
        min-width: 320px; 
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        padding: 10px 0;
        -webkit-overflow-scrolling: touch; 
    }
    .mobileScroll::-webkit-scrollbar {
        display: none; 
    }
    .mobileScroll{
        -ms-overflow-style: none; 
        scrollbar-width: none;  
    }
}
