/**
 * 2008-2024 Prestaworld
 *
 * NOTICE OF LICENSE
 *
 * The source code of this module is under a commercial license.
 * Each license is unique and can be installed and used on only one website.
 * Any reproduction or representation total or partial of the module, one or more of its components,
 * by any means whatsoever, without express permission from us is prohibited.
 *
 * DISCLAIMER
 *
 * Do not alter or add/update to this file if you wish to upgrade this module to newer
 * versions in the future.
 *
 * @author    prestaworld
 * @copyright 2008-2024 Prestaworld
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 * International Registered Trademark & Property of prestaworld
 */
/* Modal General Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    z-index: 1050;
    overflow: hidden; /* Prevent scrolling on modal */
}

/* Center the Modal */
.modal-dialog {
    margin: auto;
    max-width: 600px;
    width: 90%;
    height: 80vh; /* Fixed height for the modal */
    display: flex;
    flex-direction: column; /* Stack header, body, footer */
}

/* Modal Content */
.modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Header and Footer - Fixed height */
.modal-header{
    flex-shrink: 0; /* Do not resize */
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
}
.modal-header .presta-model-close {
    margin-top: -26px;

}

/* Modal Body - Scrollable */
.modal-body {
    flex-grow: 1; /* Take up remaining space */
    padding: 15px;
    overflow-y: auto; /* Enable vertical scrolling for overflow content */
    background-color: #fff;
}

.designer-container {
    display: flex;
    gap: 20px;
    height: 650px;
}

.image-container {
    width: 330px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 640px; /* Fixed height for the container */
    overflow-y: auto; /* Enable vertical scrolling for overflowing content */
    box-sizing: border-box; /* Ensures padding is included in width/height */
}



.tshirt-preview {
    /* width: 300px; */
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 640px;
}
.controls {
    width: 900px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 640px; /* Fixed height for the container */
    overflow-y: auto; /* Enable vertical scrolling for overflowing content */
    box-sizing: border-box; /* Ensures padding is included in width/height */
}

/* Optional styling for the inner content */
.controls > div {
    width: 100%; /* Ensure it fits within the parent container */
    box-sizing: border-box; /* Prevent content from exceeding container width */
}
.add-text-input {
    width: 600px;
    height: 33px;

}
#fontFamilySelect {
    width: 660px;
    height: 33px;

}
#toLowerCase {
    margin-top: 10px;

}

.image-iteam .active {
    border: solid;
    /* Change color as needed */
}
.common-style-list {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.common-style-list li {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.common-style-list li:hover {
    background-color: #007BFF;
    color: #fff;
    transform: scale(1.1);
}

.common-style-list li span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: currentColor;
}

/* Specific Icons (You can customize these as needed) */
#flip-vertical::before {
    content: '↕';
    font-size: 18px;
}

#flip-horizontal::before {
    content: '↔';
    font-size: 18px;
}

#send-to-back::before {
    content: '⬇';
    font-size: 18px;
}

#bring-to-front::before {
    content: '⬆';
    font-size: 18px;
}

#vertically-center::before {
    content: '⦵';
    font-size: 18px;
}

#horizontally-center::before {
    content: '⊖';
    font-size: 18px;
}

#undo-list::before {
    content: '↺';
    font-size: 18px;
}

#redo-list::before {
    content: '↻';
    font-size: 18px;
}

#delete::before {
    content: '✖';
    font-size: 18px;
}

.common-style-list {
    padding: 10px 900px;
}

/* Accessibility: Tooltip titles */
.common-style-list li[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    /* padding-left: 200px; */
}

/* Specific Icons (You can customize these as needed) */
#flip-vertical::before {
    content: '↕';
    font-size: 18px;
}

#flip-horizontal::before {
    content: '↔';
    font-size: 18px;
}

#send-to-back::before {
    content: '⬇';
    font-size: 18px;
}

#bring-to-front::before {
    content: '⬆';
    font-size: 18px;
}

#vertically-center::before {
    content: '⦵';
    font-size: 18px;
}

#horizontally-center::before {
    content: '⊖';
    font-size: 18px;
}

#undo-list::before {
    content: '↺';
    font-size: 18px;
}

#redo-list::before {
    content: '↻';
    font-size: 18px;
}

#delete::before {
    content: '✖';
    font-size: 18px;
}

.common-style-list {
    padding: 10px 900px;
}

/* Accessibility: Tooltip titles */
.common-style-list li[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    background: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    /* padding-left: 200px; */
}
/* Responsive Adjustments */

#container {
    width: 100%;
    max-width: 645px;
    margin: auto;
    display: flex;             /* Use flex to center the image */
    justify-content: center;   /* Center the image horizontally */
    align-items: center;       /* Center the image vertically */
    position: relative;
}
canvas {
    display: block;
    width: 100%;
    height: auto;
}
.common-style-list li {
    padding:20px;
}
input[type="range"] {
    width: 638px;
  }

/* General layout */
.alert-info {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #d1ecf1;
    border-radius: 4px;
    background-color: #d1ecf1;
    color: #0c5460;
    font-weight: 600;
}
.alert-info strong {
    display: block;
    /* margin-bottom: 10px; */
}
.alert-info .highlight {
    font-weight: bold;
    }
.alert-info {
    display: none;
}



/* Responsive Design for Different Screen Sizes */
@media (max-width: 1440px) {
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
        z-index: 1050;
        overflow: hidden; /* Prevent scrolling on modal */
    }

    /* Center the Modal */
    .modal-dialog {
        margin: auto;
        max-width: 600px;
        width: 90%;
        height: 80vh; /* Fixed height for the modal */
        display: flex;
        flex-direction: column; /* Stack header, body, footer */
    }

    /* Modal Content */
    .modal-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        overflow: hidden;
        background-color: #fff;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    }

    /* Header and Footer - Fixed height */
    .modal-header{
        flex-shrink: 0; /* Do not resize */
        padding: 15px;
        border-bottom: 1px solid #dee2e6;
        border-top: 1px solid #dee2e6;
        background-color: #f8f9fa;
    }

    .modal-header {
        border-bottom: 1px solid #dee2e6;
    }
    .modal-header .presta-model-close {
        margin-top: -26px;

    }

    /* Modal Body - Scrollable */
    .modal-body {
        flex-grow: 1; /* Take up remaining space */
        padding: 15px;
        overflow-y: auto; /* Enable vertical scrolling for overflow content */
        background-color: #fff;
    }

    .designer-container {
        display: flex;
        gap: 20px;
        height: 650px;
    }

    .image-container {
        width: 230px;
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px; /* Fixed height for the container */
        overflow-y: auto; /* Enable vertical scrolling for overflowing content */
        box-sizing: border-box; /* Ensures padding is included in width/height */
    }
    .tshirt-preview {
        /* width: 300px; */
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px;
    }

    .controls {
        width: 900px;
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px; /* Fixed height for the container */
        overflow-y: auto; /* Enable vertical scrolling for overflowing content */
        box-sizing: border-box; /* Ensures padding is included in width/height */
    }

    /* Optional styling for the inner content */
    .controls > div {
        width: 100%; /* Ensure it fits within the parent container */
        box-sizing: border-box; /* Prevent content from exceeding container width */
    }
    .add-text-input {
        width: 600px;
        height: 33px;

    }
    #fontFamilySelect {
        width: 660px;
        height: 33px;

    }
    #toLowerCase {
        margin-top: 10px;

    }

    .image-iteam .active {
        border: solid;
        /* Change color as needed */
    }
    .common-style-list {
        display: flex;
        gap: 10px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .common-style-list li {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 50px;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }

    .common-style-list li:hover {
        background-color: #007BFF;
        color: #fff;
        transform: scale(1.1);
    }

    .common-style-list li span {
        display: block;
        width: 30px;
        height: 2px;
        background-color: currentColor;
    }

    /* Specific Icons (You can customize these as needed) */
    #flip-vertical::before {
        content: '↕';
        font-size: 18px;
    }

    #flip-horizontal::before {
        content: '↔';
        font-size: 18px;
    }

    #send-to-back::before {
        content: '⬇';
        font-size: 18px;
    }

    #bring-to-front::before {
        content: '⬆';
        font-size: 18px;
    }

    #vertically-center::before {
        content: '⦵';
        font-size: 18px;
    }

    #horizontally-center::before {
        content: '⊖';
        font-size: 18px;
    }

    #undo-list::before {
        content: '↺';
        font-size: 18px;
    }

    #redo-list::before {
        content: '↻';
        font-size: 18px;
    }

    #delete::before {
        content: '✖';
        font-size: 18px;
    }

    .common-style-list {
        padding: 10px 900px;
    }

    /* Accessibility: Tooltip titles */
    .common-style-list li[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -25px;
        background: #333;
        color: #fff;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        /* padding-left: 200px; */
    }

    .common-style-list {
        padding: 0px 286px !important;
    }

    /* Accessibility: Tooltip titles */
    .common-style-list li[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -25px;
        background: #333;
        color: #fff;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        /* padding-left: 200px; */
    }
    /* Responsive Adjustments */

    #container {
        width: 100%;
        max-width: 645px;
        margin: auto;
        display: flex;             /* Use flex to center the image */
        justify-content: center;   /* Center the image horizontally */
        align-items: center;       /* Center the image vertically */
        position: relative;
    }

    /* .canvas-container {
        width: 625px !important;
        height: 625px !important;
    } */
    canvas {
        display: block;
        width: 100%;
        height: auto;
    }
    .common-style-list li {
        padding:20px;
    }
    input[type="range"] {
        width: 638px;
    }
    .image-gallery {
        height: 132px !important;
    }
    #text-to-add {
        width: 386px;
    }
    #fontFamilySelect{
        width: 386px;
    }
    input[type="range"] {
        width: 386px;
    }
}

@media (max-width: 1024px) {
    .modal {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
        z-index: 1050;
        overflow: hidden; /* Prevent scrolling on modal */
    }

    /* Center the Modal */
    .modal-dialog {
        margin: auto;
        max-width: 600px;
        width: 90%;
        height: 80vh; /* Fixed height for the modal */
        display: flex;
        flex-direction: column; /* Stack header, body, footer */
    }

    /* Modal Content */
    .modal-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        border-radius: 8px;
        overflow: hidden;
        background-color: #fff;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    }

    /* Header and Footer - Fixed height */
    .modal-header{
        flex-shrink: 0; /* Do not resize */
        padding: 15px;
        border-bottom: 1px solid #dee2e6;
        border-top: 1px solid #dee2e6;
        background-color: #f8f9fa;
    }

    .modal-header {
        border-bottom: 1px solid #dee2e6;
    }
    .modal-header .presta-model-close {
        margin-top: -26px;

    }

    /* Modal Body - Scrollable */
    .modal-body {
        flex-grow: 1; /* Take up remaining space */
        padding: 15px;
        overflow-y: auto; /* Enable vertical scrolling for overflow content */
        background-color: #fff;
    }

    .designer-container {
        display: flex;
        gap: 20px;
        height: 650px;
    }

    .image-container {
        width: 230px;
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px; /* Fixed height for the container */
        overflow-y: auto; /* Enable vertical scrolling for overflowing content */
        box-sizing: border-box; /* Ensures padding is included in width/height */
    }



    .tshirt-preview {
        /* width: 300px; */
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px;
    }
    .controls {
        width: 900px;
        background: #fff;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        height: 640px; /* Fixed height for the container */
        overflow-y: auto; /* Enable vertical scrolling for overflowing content */
        box-sizing: border-box; /* Ensures padding is included in width/height */
    }

    /* Optional styling for the inner content */
    .controls > div {
        width: 100%; /* Ensure it fits within the parent container */
        box-sizing: border-box; /* Prevent content from exceeding container width */
    }
    .add-text-input {
        width: 600px;
        height: 33px;

    }
    #fontFamilySelect {
        width: 660px;
        height: 33px;

    }
    #toLowerCase {
        margin-top: 10px;

    }

    .image-iteam .active {
        border: solid;
        /* Change color as needed */
    }
    .common-style-list {
        display: flex;
        gap: 10px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .common-style-list li {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 50px;
        height: 50px;
        background-color: #fff;
        border: 1px solid #ddd;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
    }

    .common-style-list li:hover {
        background-color: #007BFF;
        color: #fff;
        transform: scale(1.1);
    }

    .common-style-list li span {
        display: block;
        width: 30px;
        height: 2px;
        background-color: currentColor;
    }

    /* Specific Icons (You can customize these as needed) */
    #flip-vertical::before {
        content: '↕';
        font-size: 18px;
    }

    #flip-horizontal::before {
        content: '↔';
        font-size: 18px;
    }

    #send-to-back::before {
        content: '⬇';
        font-size: 18px;
    }

    #bring-to-front::before {
        content: '⬆';
        font-size: 18px;
    }

    #vertically-center::before {
        content: '⦵';
        font-size: 18px;
    }

    #horizontally-center::before {
        content: '⊖';
        font-size: 18px;
    }

    #undo-list::before {
        content: '↺';
        font-size: 18px;
    }

    #redo-list::before {
        content: '↻';
        font-size: 18px;
    }

    #delete::before {
        content: '✖';
        font-size: 18px;
    }

    .common-style-list {
        padding: 10px 900px;
    }

    /* Accessibility: Tooltip titles */
    .common-style-list li[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -25px;
        background: #333;
        color: #fff;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        /* padding-left: 200px; */
    }

    .common-style-list {
        padding: 0px 126px !important;
    }

    /* Accessibility: Tooltip titles */
    .common-style-list li[title]:hover::after {
        content: attr(title);
        position: absolute;
        bottom: -25px;
        background: #333;
        color: #fff;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        white-space: nowrap;
        /* padding-left: 200px; */
    }
    /* Responsive Adjustments */

    #container {
        width: 100%;
        max-width: 645px;
        margin: auto;
        display: flex;             /* Use flex to center the image */
        justify-content: center;   /* Center the image horizontally */
        align-items: center;       /* Center the image vertically */
        position: relative;
    }
    canvas {
        display: block;
        width: 100%;
        height: auto;
    }
    .common-style-list li {
        padding:20px;
    }
    input[type="range"] {
        width: 638px;
    }
    .image-gallery {
        height: 57px !important;
    }
    #text-to-add {
        width: 178px;
    }
    #add-text-button {
        margin-top: 10px;
    }
    #fontFamilySelect{
        width: 184px;
    }
    input[type="range"] {
        width: 136px;
    }
}

/* Responsive layout for mobile */
@media (max-width: 767px) {
    .modal-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    /* Style for list items */
    .common-style-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
    .common-style-list li {
        width: calc(20% - 10px); /* 5 items per row */
        margin: 5px;
        list-style-type: none;
    }
    .common-style-list li {
        width: calc(25% - 10px); /* 4 items per row */
    }
}

/* Responsive layout for smaller mobile screens */
@media (max-width: 480px) {
    .common-style-list li {
        width: calc(33.33% - 10px); /* 3 items per row */
    }
    #button-div {
        width: 100%;
        justify-content: space-between;
    }
    #downloadImage
    #saveImage {
        width: 48%; /* Buttons side by side on smaller screens */
    }
}
@media (max-width: 768px) {
    .designer-container {
        display: flow;
        /* gap: 20px;
        height: 650px; */
    }
    .image-container {
        height: auto !important;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap; /* Images ko wrap karne ke liye */
        max-width: 100%; /* Container ki width ko restrict karne ke liye */
        margin: auto; /* Center align karne ke liye */
    }
    .image-container ul {
        display: flex;
        flex-wrap: wrap; /* Images line break karengi agar jagah kam ho */
        gap: 10px; /* Images ke beech ka gap */
        padding: 0;
        margin: 0;
        list-style: none; /* Remove bullets */
    }
    .image-container .image-iteam {
        flex: 1 1 200px; /* Images responsive aur flexibily align hongi */
        max-width: calc(33.33% - 20px); /* Ek line me teen images tak allow kare */
        box-sizing: border-box; /* Padding aur border ko size mein include kare */
    }
    .image-container img {
        width: 100%; /* Image container ke andar fit karne ke liye */
        height: auto !important; /* Image ka aspect ratio maintain karne ke liye */
        object-fit: cover; /* Image ko properly crop karne ke liye */
        border-radius: 5px; /* Rounded corners ke liye */
    }
    .tshirt-preview{
        height: auto !important;
    }
    .controls {
        width: 100%;
    }
    #text-to-add {
        width: 126px;
    }
    #fontFamilySelect{
        width: 167px;
    }
    input[type="range"] {
        width: 200px;
    }
}
