body{
    color: #5b5b5b;
}
button.rounded-pill{
    border-color: #244856 !important;
    color: #244856 !important;
}
button.rounded-pill:hover{
    background-color: #244856 !important;
    color: #FFFFFF !important;
}
#elementsSidebar,
.device-screen {
    color: var(--text-color);
}
#dropzone{
    overflow: scroll;
    scrollbar-width: none;
}
#elementsSidebar .element-item{
    padding: 0.5rem !important;
}
.device-screen a,
.device-screen .text-accent {
    color: var(--accent-color);
}

#elementsSidebar .btn-primary{
    background-color: #53538EFF;
    border-color: #53538EFF;
}
.device-screen .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-color);
}
.file-name{
    display: none;
    max-width: 100px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
}
.text_elem p{
    margin-bottom: 0;
}
.tablet-mode .file-name{
    max-width: 200px;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper) .file-name{
    display: block;
}
/*#dropzone .ui-draggable-handle.ui-sortable-helper{*/
/*    max-width: 200px;*/
/*    height: auto;*/
/*}*/
#dropzone .ui-draggable-handle:not(.ui-sortable-helper).element-item.header_elem{
    padding: 0 !important;
}
#dropzone .element-item.header_elem,
#dropzone .element-item.header_elem img{
    max-height: 200px;
}
.tablet-mode #dropzone .element-item.header_elem,
.tablet-mode #dropzone .element-item.header_elem img{
    max-height: 150px;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper).picture_elem{
    /*height: unset !important;*/
    max-height: 150px;
}
#picture img, #header img, .header_elem img, .picture_elem img{
    object-fit: cover;
}
#dropzone .gallery_elem .carousel-inner,
#dropzone .gallery_elem .carousel-item,
#dropzone .gallery_elem .carousel-item img{
    max-height: 150px !important;
}
#dropzone .gallery_elem.edit_element{
    /*padding-right: 0.5rem;*/
    /*padding-left: 0.5rem;*/
    /*margin-top: 0.5rem;*/
    padding: 0.5rem;
}
/*.element-item[data-type="picture"] .media-thumb img{*/
/*    background-image: url('../svg/test-picture.svg');*/
/*}*/
#dropzone .edit_element .media-thumb img{
    height: 100% !important;
    width: 100% !important;
    object-fit: cover;
    /*max-height: 150px;*/
}
#dropzone .edit_element .media-thumb{
    height: 100% !important;
    width: 100% !important;
}

#dropzone .gallery_elem .carousel-item img{
    object-fit: cover;
    object-position: center;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper) .file-name-wrap{
    flex-grow: 1;
}
#elementsSidebar .btn-primary, #dropzone .btn-primary{border-radius: 0;}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper) .btn-primary{border-radius: 15px;}

/*#elementsSidebar .btn-outline-secondary,*/
/*.device-screen .btn-outline-secondary {*/
/*    color: var(--accent-color);*/
/*    border-color: var(--accent-color);*/
/*}*/
a{
    text-decoration: none;
}
.rounded-circle{
    width: 35px;
    height: 35px;
    margin: 0.4rem;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}
.link_icon{
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Start aligns icon with top of text */
    height: 100%;
    padding-top: 2rem; /* fine-tune as needed */
    font-size: 15pt;
}
.element-item {
    cursor: move;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10%;
    user-select: none;
    /*position: relative;*/
}
.dragging-original-hide {
    visibility: hidden;
}

.element-item h6 {
    margin-bottom: 5px;
    font-size: 14px;
}

#file svg, .file_elem svg{
    width: 30px;
}
#elementsSidebar #file svg, #elementsSidebar .file-name{
    color: #53538EFF;
}
.device-screen .file_elem svg, .device-screen .file-name, .device-screen #file svg{
    color: var(--primary-color);
}

.color_button div button{
    margin: 0.5rem;
    width: 32px;
    height: 32px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
#color1,#color2,#color3{
    height: 48px;
    width: 240px;
}
.color_button-active{
    background-color: lightblue;
}
.color_button{
    cursor: pointer;
}
.fa-check{
    margin-right: 10px;
    font-size: 16pt;
    margin-top: 15px;
    opacity: 0.6;
}
.screen_icons{
    border: none;
    background: none;
    font-size: 35px;
    display: flex;
    align-items: center;
    padding: 5px;
}
.screen-icon{
    background-repeat: no-repeat;
    background-size: contain; /* or 100% 100% */
    background-position: center;
    display: inline-block;
}
.tablet-screen-icon{
    background-image: url('../svg/tablet_screen.svg');
    width: 35px;
    height: 45px;
}
.mobile-screen-icon{
    background-image: url('../svg/mobile_screen.svg');
    width: 25px;
    height: 45px;
}
.screen_icons.open{
    background-color: #b9dede;
    border-radius: 15%;
}
.screen_icons:hover{
    background: #b9dede;
    border-radius: 15%;
}
.active{
    background: #b9dede;
    border-radius: 15%;
}

#guideTitle{
   height: 2.8125rem;
   font-size: 1.25rem;
   line-height: 1.6875rem;
   color: #244856;
   border: 3px solid #BADFDF;
   outline: none;
}

#guideTitle:focus {
   outline: none;
}
/*CSS for the Phone/Tablet preview*/
/* Container for the device preview */
.device-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    /*margin-left: 3%; !*tmp test*!*/
}

/* Phone frame styling */
.device-frame {
    position: relative;
    width: 300px;
    height: 600px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

/* Screen area inside the frame */
/*.device-screen {*/
/*    position: absolute;*/
/*    top: 0;*/
/*    !*left: 10%;*!*/
/*    width: 100%;*/
/*    height: 100%;*/
/*    !*background: #fff;*!*/
/*    overflow-y: auto;*/
/*    border-radius: 10px;*/
/*    min-height: 80%;*/
/*    !*z-index: -1;*!*/
/*    background-color: #5D5A94;*/
/*}*/
/* Screen area inside the frame (your dropzone) */
.device-screen {
    position: absolute;
    background-color: var(--bg-color);
    z-index: 1;
    box-sizing: border-box;
}
body:not(.tablet-mode) .device-screen {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px 12px;

    clip-path: inset(15px 12px 15px 12px round 25px);
}
body.tablet-mode .device-screen {
    top: 9%;
    width: 363px;
    max-width: 363px;
    height: 497px;
    border-radius: 0;
}
.ui-sortable-placeholder{
    height: 60px;
    background-color: transparent;
    border: 1px dashed gray;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper) h6{
    display: none;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper){
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="audio"],
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="file"],
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="title"],
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="subtitle"],
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="text"]{
    height: fit-content !important;
    min-height: unset !important;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="video"]{
    height: fit-content !important;
}

#dropzone video{
    pointer-events: none;
}
#dropzone .ui-draggable-handle:not(.ui-sortable-helper)[data-type="audio"] .audio-container{
    margin-top: 0 !important;
}
#sortable-elements{
    min-height: 80%;
}

/* Background images for different devices */
.phone-view {
    background-image: url('../svg/phone.svg');
    width: 300px;
    height: 620px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    /*z-index: 999;*/
}
.device-frame-wrap{
    /*width: 300px;*/
    /*height: 600px;*/
    position: relative;
}

.tablet-view {
    /*background-image: url('/storage/visual/test_tablet.png');*/
    background-image: url('../svg/tablet.svg');
    width: 400px;
    height: 600px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/*extra qr panel css*/
#generatedLink{
    word-break: break-all;
    overflow-wrap: break-word;
    display: block;
    text-align: left;
    text-decoration: underline;
    color: #5B5B5B;
    font-weight: 500;
}
#qrCodeImage{
    height: 100%;
    width: 100%;
}







/*temporary*/

/* Audio Container */
.audio-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 5px;
    margin-top: 10%;
}

/* Play Button */
.play-pause-btn {
    border: none;
    color: white;
    font-size: 10px;
    padding: 7px;
    border-radius: 100%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    height: 30px;/*tmp*/
    width: 30px;/*tmp*/
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#elementsSidebar .play-pause-btn, #elementsSidebar .play-pause-btn:hover{
    background-color: #53538EFF;
    color: #FEFEFEFF;
}
.device-screen .play-pause-btn, .play-pause-btn:hover{
    background-color: var(--primary-color);
    color: var(--bg-color);
}

/* Thumb (circle) */
/* Seek Bar */
.seek-bar {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    cursor: pointer;
    background: #ddd;
    height: 5px;
    border-radius: 5px;
    transition: background 0.3s ease;
}
#elementsSidebar .seek-bar::-webkit-slider-thumb{
    -webkit-appearance: none;
    background: #53538EFF;
    border-color: #53538EFF;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.device-screen .seek-bar::-webkit-slider-thumb{
    -webkit-appearance: none;
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}
#elementsSidebar  .seek-bar::-moz-range-thumb{
    background: #53538EFF;
    border-color: #53538EFF;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.device-screen .seek-bar::-moz-range-thumb{
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.device-screen .audio-info .audio-time{
    color: var(--text-color);
}

/*!* Firefox track *!*/
/*#seekBar::-moz-range-track {*/
/*    height: 6px;*/
/*    border-radius: 3px;*/
/*    background: #ddd;*/
/*}*/

/* IE / Edge */
#seekBar::-ms-fill-lower {
    background: #4caf50;
}
#seekBar::-ms-fill-upper {
    background: #ddd;
}

.play-pause-btn i {
    font-size: 13px;
}

/* Audio Time & Seek Bar */
.audio-info {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 5px;
}

/* Audio Time (current time and duration) */
.audio-time {
    font-size: 11px;
    font-weight: bold;
    color: #555;
}

/* Audio Element */
audio {
    width: 100%;
    height: 30px;
    display: none;
}






/* Sidebar default styling */
.close-sidebar-btn{
    display: none;
}
main {
    position: relative;
    z-index: 0;
}
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
    display: none;
}
.qr_btn,.settings_btn,.elements_btn,.sidebar_save{
    display: none;
}
#layoutRow{
    display: flex;
    justify-content: center;
}
.switch_view-mobile{
    display: none !important;
}
.switch_view-mobile .tablet-screen-icon{
    width: 55px;
    height: 65px;
}
.switch_view-mobile .mobile-screen-icon{
    width: 45px;
    height: 65px;
}
.sidebar_right {
    display: none;
}
@media (max-width: 599px) {
    .sidebar_right {
        display: block;
        position: fixed;
        top: 20%;
        right: -70%; /* Hidden by default */
        width: 70%;
        /*height: 100%;*/
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease-in-out;
        z-index: 1050;
        overflow-y: auto;
        padding: 1rem;
    }
    .open-sidebar-btn.right {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    #qrPanel{
        display: none;
    }
    /* Sidebar Open State */
    .sidebar_right.open {
        right: 0 !important;
    }
    /* Sidebar Close Button */
    .close-sidebar-btn {
        display: block;
        /*position: absolute;*/
        top: 10px;
        left: 10px;
        z-index: 1100;
    }
    .qr_close{
        display: block !important;
        color: #5B5B5B;
    }
    .qr_btn,.sidebar_save{
        display: block;
    }
    .qr_save{
        display: none;
    }
    .switch_view, .switch_view-mobile{
        justify-content: center !important;
    }
    .switch_view-mobile{
        display: flex !important;
    }
    /*.switch_view div button{*/
    /*    font-size: 40px;*/
    /*}*/
    #qrCodeImage{
        height: 97%;
        width: 97%;
    }
}
.sidebar_left{
    display: none;
}
.close-sidebar-icon{
    background-repeat: no-repeat;
    background-size: contain; /* or 100% 100% */
    background-position: center;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../svg/x.svg');
    filter: invert(41%) sepia(19%) saturate(0%) hue-rotate(216deg) brightness(63%) contrast(63%);
}
@media (max-width: 1024px) {
    #elementsSidebar.sidebar_left{
        width: 300px;
        left: -300px;
        top: 20% !important;
    }
    #settingsSidebar.sidebar_left{
        top: 30% !important;
        left: -70%; /* Hidden by default */
        max-width: 70%;
    }
    .sidebar_left {
        display: block;
        position: fixed;
        /*height: 100%;*/
        max-width: 100%;
        background-color: #fff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease-in-out;
        z-index: 1050;
        overflow-y: auto;
        padding: 1rem;
        opacity: 1 !important;
    }
    /* Sidebar Open State */
    .sidebar_left.open {
        left: 0 !important;
    }
    /* Sidebar Close Button */
    .close-sidebar-btn {
        display: block;
        top: 10px;
        left: 10px;
        z-index: 1100;
    }
    .qr_close{
        display: none;
    }
    .open-sidebar-btn.left {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    .settings_btn,.elements_btn{
        display: block;
    }
    #elementsPanel{
        display: none;
    }
    #elementsSidebar{
        display: block;
    }


    /*Needs FIX*/
    /*#elementsPanel {*/
    /*    flex: 0 0 0; !* shrinks in tablet mode *!*/
    /*    transition: flex 0.3s ease;*/
    /*}*/

    /*#previewPanel {*/
    /*    flex: 0 0 50%; !* expands in tablet mode *!*/
    /*    transition: flex 0.3s ease;*/
    /*}*/

    /*#qrPanel {*/
    /*    flex: 0 0 50%;*/
    /*    transition: flex 0.3s ease;*/
    /*}*/

    /*body.tablet-mode #elementsPanel {*/
    /*    flex: 0 0 20%;*/
    /*}*/

    /*body.tablet-mode #previewPanel {*/
    /*    flex: 0 0 45%;*/
    /*}*/


}


.open-sidebar-btn {
    position: fixed; /* Keeps the button in a fixed location */
    top: 20%; /* Vertically centers the button */
    /*transform: translateY(-50%); !* Adjusts for centering *!*/
    z-index: 999; /* Places the button above other elements */
    background-color: #5b5b5b; /* Styling for visibility */
    color: #fff;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    width: 80px;
    font-size: 16pt;
    transition: left 0.4s ease, right 0.4s ease;
}
.open-sidebar-btn.right{
    border-radius: 5px 0 0 5px;
}
.open-sidebar-btn.left{
    border-radius: 0 5px 5px 0;
}
.open-sidebar-btn:hover{
    background-color: #5b5b5b;
}
.open-sidebar-btn.left {
    left: 0;
}

.open-sidebar-btn.right {
    right: 0;
}
.open-sidebar-btn.down{
    top: 30%;
}
.open-sidebar-btn.open{
    left: 0;
    right: auto ;
    z-index: 1;
}
.open-sidebar-btn span{
    background-repeat: no-repeat;
    background-size: contain; /* or 100% 100% */
    background-position: center;
    display: inline-block;
    width: 35px;
    height: 35px;
}
.open-sidebar-btn .qrcode-icon{
    background-image: url('../svg/qrcode.svg');
}
.open-sidebar-btn .gears-icon{
    background-image: url('../svg/gears.svg');
}
.open-sidebar-btn .layer-group-icon{
    background-image: url('../svg/layer_group.svg');
}

/*modal edit*/
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.gallery-img {
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
}
.add-image {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background-color: #ddd;
    border-radius: 8px;
    cursor: pointer;
}
.text-editor button {
    margin-right: 5px;
}
#popupTextEditor h6{
    display: none;
}
.modal-footer button {
    border-radius: 20px;
    padding: 6px 12px;
}
.edit-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.edit-btn, .delete-btn {
    transition: all 0.2s ease-in-out;
}

.edit-btn:hover, .delete-btn:hover {
    opacity: 0.8;
}
#result{
    /*justify-self: center;*/
    height: 20px;
}
.spinner-border{
    width: 20px;
    height: 20px;
}
.file-download{
    height: 40px;
}

/*test*/
.media-thumb {
    position: relative;
}

.overlay-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    opacity: 0.9;
    pointer-events: none;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.gallery-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
    opacity: 0.8;
}



/*editor*/
.editor-popup {
    position: absolute;
    z-index: 10000;
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    /*border-radius: 8px;*/
    padding: 15px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}


/*layout fix*/
#layoutRow {
    display: flex;
    /*gap: 1rem;*/
}

#elementsPanel {
    flex: 0 0 35%; /* shrinks in tablet mode */
    transition: flex 0.3s ease;
}

#previewPanel {
    flex: 0 0 36%; /* expands in tablet mode */
    transition: flex 0.3s ease;
}

#qrPanel {
    flex: 0 0 29%;
    transition: flex 0.3s ease;
}

body.tablet-mode #elementsPanel {
    flex: 0 0 20%;
}

body.tablet-mode #previewPanel {
    flex: 0 0 45%;
}

/*bootstrap carousel*/
.non-interactive {
    pointer-events: none;
    user-select: none;
}
.carousel-indicators [data-bs-target]{
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
}
.carousel-indicators .active{
    background-color: var(--accent-color);
}

/* CUSTOM TOGGLE BUTTON */
.custom-toggle-button {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
}
.custom-toggle-button input {
    opacity: 0;
    width: 0;
    height: 0;
}
.custom-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* OFF color */
    transition: 0.4s;
    border-radius: 25px;
}
.custom-slider::before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}
input:checked + .custom-slider {
    background-color: #244856;
}
input:checked + .custom-slider::before {
    transform: translateX(25px);
}

.btn-add-lang, .btn-remove-lang{
    background-color: #BADFDF;
}
.btn-add-lang span{
    background-repeat: no-repeat;
    background-size: contain; /* or 100% 100% */
    background-position: center;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../svg/+.svg');
}
.btn-remove-lang span{
    background-repeat: no-repeat;
    background-size: contain; /* or 100% 100% */
    background-position: center;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../svg/-.svg');
}
.guide-languages .rounded-circle, .choose-language .rounded-circle{
    box-shadow: none !important;
}
.guide-languages .rounded-circle:hover, .choose-language .rounded-circle:not(.disabled-flag):hover{
    cursor: pointer;
}
.guide-languages .rounded-circle.active, .choose-language .rounded-circle.active{
    border: none; /* Remove the inner border */
    box-shadow: 0 0 0 4px #BADFDF !important; /* Outer border */
}
.choose-language .rounded-circle.disabled-flag{
    opacity: 0.6;
    filter: grayscale(50%);
}


#guideLanguagesDropdown{
    list-style: none;
}

.device-screen .languages .rounded-circle{
    box-shadow: none !important;
    border: 1px solid var(--primary-color);
    z-index: 999;
}
.device-screen .languages a[data-bs-toggle="dropdown"]{
    position: absolute;
    right: 0;
}


.btn-orange{
    background-color:#E74833;
    color: #FEFEFE;
    border-radius: 50rem;
}
.btn-orange:hover{
    background-color:#E74833;
    color: #FEFEFE;
}
/*testing*/

/*#result {*/
/*    opacity: 1;*/
/*    transition: opacity 0.1s ease;*/
/*}*/

/*#result.fade-out {*/
/*    opacity: 0;*/
/*}*/
