/* style.css */
@font-face {
    font-family: 'The Silver Editorial';
    src: url('fonts/TheSilverEditorial-Regular.eot');
    src: local('fonts/The Silver Editorial Regular'), local('TheSilverEditorial-Regular'),
        url('fonts/TheSilverEditorial-Regular.eot?#iefix') format('embedded-opentype'),
        url('fonts/TheSilverEditorial-Regular.woff2') format('woff2'),
        url('fonts/TheSilverEditorial-Regular.woff') format('woff'),
        url('fonts/TheSilverEditorial-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
        font-family: 'ITC Franklin Gothic Book Condensed';
        
        src: url('/static/fonts/ITCFranklinGothicStd-BkCd.woff') format('woff2'),
            /* url('/static/fonts/BentonModernDisplayCompressed_normal_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-Cm.otf')  format('opentype'); */
    }
    @font-face {
        font-family: 'ITC Franklin Gothic Demi Condensed';
        
        src: url('/static/fonts/ITCFranklinGothicStd-DmCp.woff') format('woff2'),
            /* url('/static/fonts/BentonModernDisplayCompressed_normal_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-Cm.otf')  format('opentype'); */
    }
@font-face {
        font-family: 'Benton';
        
        src: url('/static/fonts/BentonModernDisplayCompressed_normal_extra-condensed.woff2') format('woff2'),
            url('/static/fonts/BentonModernDisplayCompressed_normal_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-Cm.otf')  format('opentype');
    }
    @font-face {
        font-family: 'BentonLight';
        src: url('/static/fonts/BentonModernDisplayCompressedLight_normal_extra-condensed.woff2') format('woff2'),
            url('/static/fonts/BentonModernDisplayCompressedLight_normal_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-CmLight.otf')  format('opentype');
    }
    @font-face {
        font-family: 'BentonItalic';
        src: url('/static/fonts/BentonModernDisplayCompressedItalic_italic_extra-condensed.woff2') format('woff2'),
            url('/static/fonts/BentonModernDisplayCompressedItalic_italic_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-CmIt.otf')  format('opentype');
    }
    @font-face {
        font-family: 'BentonLightItalic';
        src: url('/static/fonts/BentonModernDisplayCompressedLightItalic_italic_extra-condensed.woff2') format('woff2'),
            url('/static/fonts/BentonModernDisplayCompressedLightItalic_italic_extra-condensed.woff') format('woff'),
            url('/static/fonts/BentonModernD-CmLightIt.otf')  format('opentype');
    }


/* ============================================================================
   CANVAS STYLES
   ============================================================================ */

canvas {
    pointer-events: auto;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Allow vertical scroll if needed */
    overflow-y: auto;
    /* background: url('/static/images/tatsum_bg.png') no-repeat center bottom; */
}
.logout-btn button{
  padding: 8px 10px;
  margin: 9px 0;
}
.flash-messages{
    font-family: 'Poppins', sans-serif;
    color: red;
    font-size: 12px;
    list-style: none;
    padding:0px;
}
label {
    color:#333333;
}
main {
    min-height: 100vh;
    /*display: flex;
    justify-content: center; */
    align-items: center;
    padding-top: 0;
}
.hero {
    width: 66%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    background-size: cover;
    color: #fff;
    /* background-color: #fff;*/
    animation: fadeIn 1s ease-out;
}



.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
    margin-top:50px;
}


.hero-text {
    width: 100%;
    text-align: center;
    animation: slideInBottom 1s ease-out;
    /*animation: slideInLeft 1s ease-out;*/
    margin: 0 auto;
}


.hero-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color:#333333;
}

h2 {
  font-weight: 200;
  font-size: 34px;
  color:#333333;
}

.hero-text .brand {
    color: #4a00e0;
    font-size: 65px;
    font-weight: 200;
    margin:0;
}


.hero-text .tagline {
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 200;
    color:#333333;
}


.hero-text .subtext {
    font-size: 16px;
    margin-bottom: 30px;
    color: #f0eefa;
}


.cta-buttons .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 0px;
    font-weight: 600;
    text-decoration: none;
    margin-right: 15px;
    transition: all 0.3s ease;
}


.btn.primary {
    background: #f6871f;
    color: #000000;
    border-radius: 0px;
}


.btn.primary:hover {
    background: #fff200;
}


.btn.secondary {
    color: #ffffff;
    background-color: #333333;
}

.btn.secondary:hover {
    background: #555555;
}


.hero-image img {
    max-width: 450px;
    animation: floatUp 2s ease-in-out infinite alternate;
}


/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


@keyframes slideInLeft {
    from { transform: translateX(-40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


@keyframes floatUp {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}


footer {
    text-align: center;
    padding: 20px;
    color: #6628e3;
    font-size: 14px;
    flex-shrink: 0;
}
.site-header {
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: #000000;
}
.head-wrap{
    width: 80%;
    text-align: center;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-links{
    float:left;
}
.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    float:left;
    margin: 0px 15px;
    padding: 10px 0;
}
.logo-text img {
    width:150px;
}
.nav-links a {
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0 20px;
}
.nav-links a:hover {
    color: #f6871f;
}

.auth-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.8s ease-out;
    width: 50%;
    /* min-width: 320px; */
    /* max-width: 500px; */
    margin: 0 auto;
}

.form-box {
    width: 300px;
    margin: 0 auto 24px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form-box h2, .form-title {
    color: #4a00e0;
    margin-bottom: 20px;
    text-align: left;
    width: 100%;
    font-size: 28px;
    font-weight: 600;
    padding-left: 0;
}

.form-box input[type="email"],
.form-box input[type="password"],
.form-box input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

button {
    background-color: #f6871f;
    color: #000;
    font-weight: 200;
    padding: 12px 20px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    text-transform: uppercase;
    font-size: 14px;
}
.gen_btn{
    background-color: #ffe600;
    color: #000;
    width: 37px;
    height: 37px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin: 0px 5px !important;
    padding: 0;
}

button:hover {
    background-color: #dc7c23;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* editor.html style */ 


  main {
    margin: 0;
    padding: 0;
  }

  .edit-container {
    width: 100%;
    background-color: #fbfcff;
    /* Remove fixed height and margin-top */
    /* height: 97%; */
    /* margin-top: 3%; */
    margin-top: 7vh; /* match .site-header height */
    min-height: calc(100vh - 7vh);
    box-sizing: border-box;
  }

  .heading {
    margin: 12px 12px 12px 12px !important;
    font-size: 15px;
    font-weight: 100;
    text-align: left;
    color:#333333;
    width: 60% !important;
    border: 0px !important;
    background-color: transparent;
    padding:7px
  }

.template-layout {
  width: 100%;
  height: 82%;
  overflow: hidden;
}
.title_and_save {
  width: 100%;
  height: 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.title_and_save .btn-primary {
  margin: 0 15px 0 0;
  text-align: right;
}
@media (max-width: 600px) {
  .title_and_save {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .title_and_save > div {
    width: 100%;
    justify-content: space-between;
  }
}
.history-controls{
  background-color: #fbfcff;
  background: #f8f9fa;
  width: 100%;
  color:#333333;
  height:5%;
  border: 1px solid #cdd7f3;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px;
  margin: 0 0 8px 0;
  flex-wrap: wrap;
}

.preview-panel {
    height: 100%;   
    overflow: scroll;
    background-color: #f1f3f9;
    width:85%;
    float:left;
    position: relative;
}

.zoom-wrapper {
  transform-origin: top left;
}

.full-width {
    width: 92%;
    display: block;
    margin: 7px 4%;
    padding: 0 0 10px 0;
    float:left;
}
.half-width{
    width:42%;
    float:left;
}
/* .half-width:first{margin-left:4px;} */
.half-width:last-child{
    margin-left:10%;
}
input[type="range"]{
    width:100%;
}




.btn-primary,
.btn-secondary {
background: #007bff;
border: none;
color: white;
padding: 10px 16px;
font-size: 15px;
border-radius: 8px;
cursor: pointer;
margin-top: 10px;
}

.btn-secondary {
background: #6c757d;
margin-top: 1px;
padding:5px 12px;
font-weight: normal;
font-size: 12px;
border-radius: 3px;
}

.btn-primary:hover,
.btn-secondary:hover {
opacity: 0.9;
}

.subheading {
font-size: 22px;
margin-bottom: 20px;
}
.lib_icon{
    margin: 13px;
    width: 40px;
    height: 40px;
    padding:0;
}
.button_icons img{
    width:auto;
    height:15px;
}
.history-controls button {
font-size: 16px;
padding: 0px;
margin-right: 0.5%;
border: none;
border-radius: 6px;
cursor: pointer;
background: #f1f3f9;
width:25px;
height:25px;
font-family: 'Poppins', sans-serif;
}

.history-controls button:hover {
background: #ccc;
}

.preview-wrapper {
background: #fff;
border: 1px solid #ddd;
box-shadow: 0px 0px 10px #cdd3eb;
display: block;
width: max-content;
}

.preview-container {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    width: 0px;
    height: 0px;
    border: 1px solid #ddd;
}

.zoom-controls {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
  }

#previewWrapper {
    transform-origin: top left;
    transition: transform 0.2s ease;
}

#sidePanel {
  position: fixed;
  top: 0;
  left: -100%;
  width: 95%;
  height: 100%;
  background-color: #ffffff;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  padding: 20px;
  transition: left 0.3s ease-in-out;
  z-index: 1000;
}

#sidePanel.open {
  left: 0; /* Slide in */
}

#closePanelBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  background: none;
  font-weight: lighter;
  border: none;
  cursor: pointer;
  margin:0;
  padding:0;
}
#sidePanelContent{
    overflow: scroll;
    height: 100%;
    overflow: scroll;
    list-style: none;
    margin: 0;
    padding: 0;
}
#sidePanelContent .template-card strong{
    width: 93%;
    float: left;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    margin: 5px;
    font-weight: 100;
    color:#333333;
}
#sidePanelContent .template-card {
    width: 150px;
    height: 200px;
    float: left;
    background-color: #efefef;
    margin: 0 10px 10px 0;
    overflow:hidden;
    box-shadow: 2px 2px 3px #efefef;
    border: 1px solid #cccccc;
}
#sidePanelContent .template-card img{
    height: 60%;
    width: 100%;
}
#sidePanelContent .template-card a, .template_thumbnails .template-card button{
  text-decoration: none;
  margin:5px;
  border:0px;
}

#sizeBox{
    margin-top: 3px;
    padding: 5px;
    border: 1px solid #ccc;
    width: fit-content;
    font-size: 10px;
    float:right;
}
.selection-box {
    border: 1px dashed #007bff;
    background-color: rgba(0, 123, 255, 0.1);
    position: absolute;
    z-index: 9999;
    /* pointer-events: none; */
}
.previewbox {
  width: 100%; /* or a fixed width like 800px */
  max-width: 100%;
  height: 200px;
  position: relative;
  /* border: 1px solid #ccc; */
  background-color: #eefeef;
}

#previewContainer {
  transform-origin: top left;
  display: inline-block;
}
.guideline {
  position: absolute;
  background: rgba(0, 0, 255, 0.5);
  z-index: 10;
  cursor: pointer;
}

.guideline.vertical {
  position: absolute;
  width: 1px;
  height: 100%;
  top: 0;
  background: rgba(0,0,255,0.5);
}

.guideline.horizontal {
  position: absolute;
  height: 1px;
  width: 100%;
  left: 0;
  background: rgba(0,0,255,0.5);
}
#groupBoundingBox::after {
  content: '';
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: #333333;
  cursor: se-resize;
}
#cropOverlay {
  position: absolute;
  border: 2px dashed #f00;
  display: none;
  background: rgba(255,0,0,0.1);
  cursor: move;
  z-index: 1000;
}
#idList li {
    padding: 4px;
    cursor: pointer;
}
#idList li.highlight {
    background-color: #ffe58f;
    font-weight: bold;
    border-left: 4px solid orange;
}
#previewContainer.drag-over {
  outline: 2px dashed #007bff;
  background-color: #f0f8ff;
}
.image-wrapper {
  position: relative;
  display: inline-block;
}

.rotate-handle {
  position: absolute;
  top: -25px;
  left: 50%;
  width: 16px;
  height: 16px;
  background-color: #4285f4;
  border-radius: 50%;
  cursor: alias;
  transform: translateX(-50%);
  z-index: 100;
  /* pointer-events: auto; */
}
.rotate-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  background-color: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.skew-handle {
  position: absolute;
  z-index: 100;
  /* pointer-events: auto; */
}

.skew-handle.skew-x {
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    cursor: ns-resize;
    width: 50%;
    height: 7px;
    background-color: #4285f4;
    z-index: 100;
    border-radius: 3px;
}

.skew-handle.skew-y {
    position: absolute;
    right: -9px;
    top: 50%;
    transform: translateY(-50%);
    cursor: ew-resize;
    width: 7px;
    height: 50%;
    background-color: #4285f4;
    z-index: 100;
    border-radius: 3px;
}



  .fit-options label {
    display: flex;
    align-items: center;
    gap: 4px;
  }
.input-panel input[type="text"],
.input-panel input[type="number"],
.input-panel select,
.input-panel input[type="file"] {
    width: 100%;
    padding: 3px 3%;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin: 0;
}

.input-panel input[type="color"] {
    width: 22px;
    height: 22px;
    padding: 0px;
    border: 0px;
}
.input-panel input[type="file"]{
    border: 0px !important;
    padding: 0px !important;
}
.half-width label {
    font-weight: 300;
    display: block;
    color: #333;
    font-size: 10px;
    width: 100%;
    margin-bottom:4px;
}
.full-width label{
    font-weight: 300;
    display: block;
    color: #333;
    font-size: 10px;
    width: 100%;
    margin-bottom:4px;
    float:left;
}
.input-panel {
  width:15%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  float:left;
}
.checkbox-group label{
    width:30%;
}
.element-ids {
color:#333;
}
.element-ids h4{
    margin: 10px 0;
    font-size:12px;
}
.element-ids ul {
    list-style: none;
    padding-left: 0px;
    font-size: 11px;
    margin: 0;
}
.element-ids ul li{
    margin:5px 0;
}
input[type="file"] {
  display: none;
}

label.custom-file-upload {
  display: inline-block;
  font-size: 16px;
  padding: 2px;
  margin-right: 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #f1f3f9;
  width: 21px;
  height: 21px;
  font-family: 'Poppins', sans-serif;
  top: -1px;
  position: relative;
}
.scale-handle {
  width: 12px;
  height: 12px;
  background: #007bff;
  border: 2px solid white;
  position: absolute;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: 2px;
  z-index: 1000;
}

.scale-handle.top-left {
  top: -8px;
  left: -8px;
  cursor: nwse-resize;
}

.scale-handle.top-right {
  top: -8px;
  right: -8px;
  cursor: nesw-resize;
}

.scale-handle.bottom-left {
  bottom: -8px;
  left: -8px;
  cursor: nesw-resize;
}

.scale-handle.bottom-right {
  bottom: -8px;
  right: -8px;
  cursor: nwse-resize;
}
button.shadow-active {
    background-color: gold;
}
#designCanvas {
  overflow: visible !important;
}


#sidePanel {
  position: fixed;
  top: 0;
  left: 0;
  width: 95%;   /* full viewport width */
  height: 100vh;  /* full viewport height */
  background: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.3);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 9999;
}
#sidePanel.open {
  transform: translateX(0);
}

.button_icons.lib_icon {
  cursor: pointer;
}

/* AI Button Special Styling */
#aiAnalysisBtn {
  color: white;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

#aiAnalysisBtn:hover {
  transform: scale(1.05);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Resizer Template Styles */
.selected-design-preview {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border-radius: 8px;
  border: none;
}

.selected-design-preview h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.design-thumbnail {
  text-align: center;
  padding: 20px;
  background: white;
  border-radius: 6px;
  border: 2px dashed #dee2e6;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.design-thumbnail img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: block;
  margin: 0 auto 10px auto;
}

.design-thumbnail p {
  width: 100%;
  margin: 5px 0;
  text-align: center;
  font-weight: 500;
  color: #333;
}

.design-thumbnail small {
  width: 100%;
  display: block;
  text-align: center;
  color: #6c757d;
  font-size: 11px;
  margin-top: 5px;
}

.sheet-selection {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border-radius: 8px;
  border: none;
}

.sheet-selection h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.sheet-description {
  margin: 0 0 15px 0;
  font-size: 11px;
  color: #6c757d;
  line-height: 1.4;
  font-style: italic;
}

.sheet-preview {
  margin-top: 10px;
  padding: 10px;
  background: white;
  border-radius: 4px;
  border: 1px solid #e9ecef;
  text-align: center;
  font-size: 12px;
  color: #6c757d;
}

.sheet-data-preview {
  margin-top: 10px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 10px;
  text-align: left;
}

.sheet-headers {
  font-weight: bold;
  color: #495057;
  margin-bottom: 4px;
  padding: 4px;
  background: #e9ecef;
  border-radius: 2px;
}

.sheet-row {
  color: #6c757d;
  padding: 4px;
  background: white;
  border-radius: 2px;
  border: 1px solid #dee2e6;
}

.dimension-templates {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border-radius: 8px;
  border: none;
}

.dimension-templates h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.template-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 5px;
}

.size-template-btn {
  padding: 8px 12px;
  border: 1px solid #007bff;
  background: white;
  color: #007bff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s ease;
  text-align: center;
}

.size-template-btn:hover {
  background: #007bff;
  color: white;
  transform: translateY(-1px);
}

.custom-dimensions {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border-radius: 8px;
  border: none;
}

.custom-dimensions h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.dimension-inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.dimension-inputs .half-width {
  flex: 1;
}

.dimension-inputs input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 12px;
}

.selected-sizes {
  margin-bottom: 20px;
  padding: 15px;
  background: transparent;
  border-radius: 8px;
  border: none;
}

#googleSheetUrl{
  width:95%;
}
.selected-sizes h4 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.sizes-list {
  min-height: 60px;
  margin-bottom: 10px;
}

.size-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  margin-bottom: 5px;
  font-size: 12px;
}

.remove-size-btn {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-size-btn:hover {
  background: #c82333;
}

.resize-preview-container {
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  height: 100%;
}

.resize-preview-container h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 18px;
  font-weight: 600;
}

.preview-summary {
  text-align: center;
  margin-bottom: 25px;
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.preview-summary h3 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 20px;
  font-weight: 600;
}

.preview-summary p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.resize-preview {
  text-align: center;
  color: #6c757d;
  font-size: 14px;
}
  
.design-previews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.design-preview-item {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.design-preview-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  border-color: #007bff;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f3f4;
}
  
.preview-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.dimensions {
  font-size: 12px;
  color: #6c757d;
  font-weight: 500;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
}

.preview-canvas {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.preview-canvas img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Design element styles */
.design-element {
  position: absolute;
  box-sizing: border-box;
}

.design-element.text {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.design-element.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.design-element.shape,
.design-element.rectangle {
  box-sizing: border-box;
}

.design-element.circle {
  border-radius: 50%;
  box-sizing: border-box;
}

/* Preview canvas enhancements */
.preview-canvas {
  position: relative;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f9fa;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

.design-elements-group {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-template-preview {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.design-template-preview > div {
  position: relative;
  transform-origin: top left;
}

/* Fabric.js Canvas Styling */
.design-template-preview canvas {
  border-radius: 4px;
  cursor: default;
}

.design-template-preview canvas:hover {
  cursor: crosshair;
}

/* Fabric.js Control Points */
.canvas-container {
  position: relative;
  overflow: hidden;
}

/* Fabric.js Control Points Enhancement */
.canvas-container .upper-canvas .fabric-canvas .fabric-control {
  background: #007bff;
  border: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.canvas-container .upper-canvas .fabric-canvas .fabric-control:hover {
  background: #0056b3;
  transform: scale(1.2);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.canvas-container .upper-canvas .fabric-canvas .fabric-control.fabric-control-rotate {
  background: #28a745;
}

.canvas-container .upper-canvas .fabric-canvas .fabric-control.fabric-control-rotate:hover {
  background: #218838;
}

/* Selection rectangle styling */
.canvas-container .upper-canvas .fabric-canvas .fabric-selection {
  border: 2px solid #007bff;
  background: rgba(0, 123, 255, 0.1);
}

/* Object hover effects */
.canvas-container .upper-canvas .fabric-canvas .fabric-object:hover {
  cursor: move;
}

/* Zoom controls styling */
.zoom-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 1000;
}

.zoom-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 123, 255, 0.8);
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoom-btn:hover {
  background: rgba(0, 123, 255, 1);
  transform: scale(1.1);
}

/* Modification feedback animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.template-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #6c757d;
  font-size: 12px;
  background: #f8f9fa;
  border-radius: 4px;
}

.design-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.05);
  pointer-events: none;
  border-radius: 4px;
}

.size-indicator {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  z-index: 10;
}

.preview-canvas:hover .design-overlay {
  background: rgba(0,0,0,0.1);
  transition: background 0.2s ease;
}

.preview-canvas:hover .size-indicator {
  background: rgba(0,0,0,0.9);
  transition: background 0.2s ease;
}

.preview-info {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f3f4;
}
  
.preview-info small {
  font-size: 10px;
  color: #6c757d;
  background: #f8f9fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.preview-info small:first-child {
  background: #e3f2fd;
  color: #1976d2;
}

.preview-info small:last-child {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Keep the old sizes-grid for backward compatibility */
.sizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 15px;
  padding: 20px;
}

.size-preview {
  background: #f8f9fa;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 60px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.size-preview span {
  font-size: 10px;
  color: #495057;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}

.select-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 11px;
  margin-top: 5px;
  transition: all 0.2s ease;
}

.select-btn:hover {
  background: #218838;
  transform: translateY(-1px);
}

/* Responsive adjustments for resizer */
@media (max-width: 768px) {
  .template-buttons {
    grid-template-columns: 1fr;
  }
  
  .dimension-inputs {
    flex-direction: column;
  }
  
  .design-previews-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 15px;
  }
  
  .sizes-grid {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    gap: 10px;
  }
}

/* ============================================================================
   SIDEPANEL STYLES (Shared between designer.html and resizer.html)
   ============================================================================ */


.history-controls button {
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    padding: 6px 8px;
    cursor: pointer;
}

.history-controls button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.history-controls button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.history-status {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    color: #495057;
    border: 1px solid #dee2e6;
}

/* Notification styling */
.history-notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* View toggle button specific styling */
.view-toggle-btn {
    background: #28a745;
    border-color: #28a745;
}

.view-toggle-btn:hover {
    background: #218838;
    border-color: #218838;
}

.view-toggle-btn.thumbnail-mode {
    background: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.view-toggle-btn.thumbnail-mode:hover {
    background: #e0a800;
    border-color: #e0a800;
}

.current-path {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    margin-left: auto;
}

/* Folder item styling */
.folder-item {
    /*display: flex;*/
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin: 5px 0;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.folder-item:hover {
    background: #efe8ff !important;
    border-color: #4a00e0;
    /*transform: translateX(5px);*/
}
.thumbnail-mode .template-thumbnail:hover{
  border-color: #4a00e0;
  background: #efe8ff;
}

.folder-item .folder-icon {
    color: #ffc107;
    font-size: 52px;
    margin-bottom: 8px;
    height: 80px;
    background: transparent;
}
.list-mode .folder-item .folder-icon{
  width:33px;
  height:33px;
  font-size:22px;
}
.list-view .folder-name{
  min-width:85%;
  margin: 0;
  font-size: 12px;
}
.folder-item .folder-count {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}
.breadcrumb-container{
  margin:7px;
  padding:5px;
  font-size:12px;
}
/* View Mode Styles */
.folder-item.list-view {
    flex-direction: row;
    align-items: center;
    padding: 0 16px;
    margin: 0;
    border-bottom: 1px solid #aaaaaa;
    border-top: 0px;
    border-right: 0px;
    border-left: 0px;
    display:flex;
    border-radius:0px;
    background:transparent;
}

.folder-item.thumbnail-view {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
    margin:5px;
    min-width: 120px;
    max-width: 150px;
    width: 200px;
    height: 142px;
    background: #efefef;
}

.folder-item.thumbnail-view .folder-name {
    font-size: 12px;
    text-align: center;
    color: #495057;
    font-weight: 500;
    word-wrap: break-word;
    width:80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0x;
    flex: 1;
    display: inline-grid;   
}

.folder-item.thumbnail-view .folder-count {
    font-size: 10px;
}

/* Template thumbnail view modes */
.template-thumbnail.list-view {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0 16px;
    background: none;
    border: none;
    border-bottom: 1px solid #aaaaaa;
    border-top: 0px;
    border-right: 0px;
    border-left: 0px;
    border-radius: 0;
    min-height: 48px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.2s;
}
.template-thumbnail.list-view:hover {
    background: #f8f9fa;
}
.template-thumbnail.list-view img {
    display: none !important;
}
.template-thumbnail.list-view .template-name {
    flex: 1;
    text-align: left;
    font-size: 12px;
    font-weight: 200;
    color: #333;
    margin: 0;
    padding: 0;
}
.list-view button {
    margin-left: 10px;
    margin-right: 0;
    float: right;
    padding: 0;
    border-radius: 0;
    background-color: transparent;
}
.template-thumbnail.list-view button:hover {
  background-color: transparent;
}
.template-thumbnail.thumbnail-view {
    /*display: flex;*/
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
    margin: 5px;
    background: #efefef;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    max-width: 150px;
}

.template-thumbnail.thumbnail-view img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.template-thumbnail.thumbnail-view .template-name {
    font-size: 12px;
    text-align: left;
    color: #495057;
    font-weight: 500;
    word-wrap: break-word;
    width:80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 4px 0;
    display:inline-grid;
}
.thumbnail-view .template-menu-btn{
  width:20%;
  margin:0;
  padding:0;
  display:inline;
}
.thumbnail-view button {
    width:46px;
    height:20px;
    padding:0;
    font-size: 11px;
    border-radius:5px;
    margin:0 2px;
}
/* Side panel content view modes */
#sidePanelContent.thumbnail-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    justify-content: flex-start;
    border: 1px solid #e1e1e1;
    background: #fcfcfc;
    align-content: flex-start;
}

#sidePanelContent.list-mode {
    display: block;
    border: 1px solid #e1e1e1;
    background: #fcfcfc;
}

.folder-search-input{
  width: 180px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  font-size: 14px;
  vertical-align: middle;
  height:33px;
  border-radius: 8px 0 0 8px;
  box-sizing: unset;
}

#folderSearchBtn.folder-btn{
  margin-left: -4px;
  border-radius: 0px 8px 8px 0px;
}
/* Template layout positioning for tag panel */
.template-layout {
    position: relative;
}

/* Tag Panel Styles */
.tag-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 350px;
    max-height: 80vh;
    background: white;
    border: 2px solid #6f42c1;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(111, 66, 193, 0.15);
    z-index: 10001;
    overflow-y: auto;
    animation: slideInDown 0.3s ease-out;
    margin: 10px;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tag-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #6f42c1;
    color: white;
    border-bottom: 1px solid #5a32a3;
}

.tag-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-tag-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-tag-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tag-panel-content {
    padding: 20px;
}

.tag-section {
    margin-bottom: 20px;
}

.tag-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.tag-select, .tag-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.tag-select:focus, .tag-input:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.tag-actions {
    display: flex;
    gap: 10px;
    margin: 25px 0;
}

.tag-save-btn, .tag-clear-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-save-btn {
    background: #28a745;
    color: white;
}

.tag-save-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.tag-clear-btn {
    background: #dc3545;
    color: white;
}

.tag-clear-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.current-tags-display {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.current-tags-display h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.tags-list {
    min-height: 60px;
}

.no-tags {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    margin: 20px 0;
}

.tag-item {
    display: inline-block;
    background: #6f42c1;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px;
    position: relative;
}

.tag-item .remove-tag {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: 5px;
    font-size: 10px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.tag-item .remove-tag:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive tag panel */
@media (max-width: 768px) {
    .tag-panel {
        width: calc(100% - 20px);
        right: 10px;
        max-height: 70vh;
    }
    
    .tag-panel-content {
        padding: 15px;
    }
    
    .tag-actions {
        flex-direction: column;
    }
}

/* AI Modal Styles */
.ai-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.ai-modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    position: relative;
    margin: auto;
    transform: translateY(0);
}

.ai-modal-header {
    padding: 25px;
    background: #6f42c1;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.ai-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.ai-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-modal-body {
    padding: 30px;
}

.ai-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #6f42c1;
}

.ai-section h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.ai-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: #495057;
}

.ai-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.ai-section li {
    margin-bottom: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.ai-modal-footer {
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.ai-apply-btn, .ai-close-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ai-apply-btn {
    background: #28a745;
    color: white;
}

.ai-apply-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}

.ai-close-btn {
    background: #6c757d;
    color: white;
}

.ai-close-btn:hover {
    background: #5a6268;
}

/* Responsive AI modal */
@media (max-width: 768px) {
    .ai-modal-content {
        width: 100%;
        max-height: calc(100vh - 40px);
        margin: 0;
        position: relative;
        transform: translateY(0);
    }
    
    .ai-modal-header {
        padding: 15px 20px;
    }
    
    .ai-modal-header h3 {
        font-size: 18px;
    }
    
    .ai-modal-body {
        padding: 20px;
    }
    
    .ai-section {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .ai-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
    }
    
    .ai-apply-btn, .ai-close-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .template-buttons {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .dimension-inputs {
        flex-direction: column;
    }
    
    .design-previews-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .sizes-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .preview-canvas {
        max-width: 100%;
        height: auto;
        min-height: 150px;
    }
    
    .design-elements-group {
        min-height: 150px;
    }
}

/* Shape Context Menu Styles */
#shapeContextMenu {
  position: fixed;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  z-index: 10000;
  min-width: 180px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  animation: contextMenuFadeIn 0.2s ease-out;
}

#shapeContextMenu div {
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

#shapeContextMenu div:hover {
  background-color: #f8f9fa;
  color: #007bff;
}

.canvas-container {
  border: 1px solid #333333 !important;
  display: inline-block; /* keeps container tight around canvas */
  border-radius: 0px;
}

.canvas-wrapper{
  margin:10px !important;
}

canvas {
    pointer-events: auto;
}

/* Preset sizes styling */
.preset-sizes {
    margin: 10px;
    padding: 0;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.preset-sizes h4 {
    margin: 0;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
}

.preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: scroll;
    height: 100px;
    padding: 8px;
}

.preset-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.chips{
  height:100px;
  overflow: hidden;
  overflow-y: scroll;
  margin: 10px;
  padding: 0;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  display:flex;
  flex-wrap: wrap;
}
.chip{
  background: white;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #495057;
  height:26px;
}
.remove{
  background-color: #ffe600;
  color: #000;
  font-weight: 600;
  padding: 5px 8px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.3s ease;
  margin-left:5px;
}
.preset-label {
    font-weight: 500;
    color: #6c757d;
    min-width: 70px;
    font-size: 11px;
    width:100%;
}

.preset-btn {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 3px 5px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.preset-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preset-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.history-controls button {
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    padding: 1px;
    cursor: pointer;
}

.history-controls button:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.history-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Mask adjustment help text styling */
.mask-help-text {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: center;
    font-style: italic;
    background: rgba(108, 117, 125, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(108, 117, 125, 0.2);
}

/* Mask adjustment button active state */
.button_icons[title*="MASK ADJUSTMENT MODE ON"] {
    color: white !important;
}

/* Notification styling */
.history-notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Design Adaptation Rules Panel Styling */
.design-rules-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.design-rules-panel .design-rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.design-rules-panel .design-rules-header h3 {
    margin: 0;
    color: #fff;
}

.design-rules-panel .close-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.2s ease;
}

.design-rules-panel .close-btn:hover {
    background-color: #c82333;
}

.design-rules-panel .design-rules-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.design-rules-panel .design-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.design-rules-panel .design-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.design-rules-panel .design-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.design-rules-panel .rule-group {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.design-rules-panel .rule-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.design-rules-panel .rule-group h5 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #555;
}

.design-rules-panel .rule-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.design-rules-panel .rule-row label {
    margin-right: 10px;
    color: #333;
    font-weight: 500;
}

.design-rules-panel .radio-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.design-rules-panel .radio-group input[type="radio"] {
    margin-right: 5px;
}

.design-rules-panel .margin-input {
    margin-top: 10px;
}

.design-rules-panel .margin-input input[type="number"] {
    width: 100px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.design-rules-panel .apply-rules-section {
    text-align: center;
    margin-top: 20px;
}

.design-rules-panel .apply-rules-section button {
    padding: 10px 20px;
    font-size: 16px;
    margin: 0 5px;
}

.design-rules-panel .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.design-rules-panel .btn-secondary:hover {
    background-color: #5a6268;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#idList .id-list-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 2px 4px;
  font-size: 14px;
  position: relative;
}
#idList .id-text {
  flex: 1 1 auto;
  text-align: left;
  margin-right: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #333;
  user-select: text;
}
#idList .id-eye-btn, #idList .id-lock-btn {
  background: none;
  border: none;
  padding: 2px;
  margin: 0 0 0 2px;
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}
#idList .id-eye-btn:hover, #idList .id-lock-btn:hover {
  opacity: 1;
}
#idList .id-lock-btn {
  margin-left: auto;
}

/* Responsive adjustments for context menu */
@media (max-width: 768px) {
  #shapeContextMenu {
    min-width: 160px;
    font-size: 13px;
  }
  
  #shapeContextMenu div {
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* Dropdown menu hover for designer, resizer, variator */
.dropdown-menu a:hover {
    background: #ffe600 !important;
    color: #000 !important;
    font-weight: 500;
}

.dropdown-menu{
  border-radius:10px;
  box-shadow: 2px 3px 15px #aaa;
  overflow: hidden;
}

@media (max-width: 900px) {
    .auth-container {
        flex-direction: column;
        width: 90%;
        min-width: unset;
        max-width: 95vw;
        gap: 24px;
        padding: 24px;
    }
    .form-box {
        width: 100%;
        max-width: 350px;
        margin: 0 auto 16px auto;
    }
}

.input-like {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    resize: vertical;
}

.help-flex-form {
    display: flex;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
    margin-bottom: 0;
}
.help-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.help-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.help-right textarea.input-like {
    height: 116px; /* 2 label+input heights (44px each) + 2 label margins (14px) */
    min-height: 116px;
    max-height: 200px;
}
@media (max-width: 700px) {
    .help-flex-form {
        flex-direction: column;
        gap: 0;
    }
    .help-right textarea.input-like {
        height: 90px;
        min-height: 90px;
    }
}

.user-avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #4a00e0;
  color: #fff;
  font-size: 10px;
  font-weight: normal;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(74,0,224,0.08);
  border: 0px;
}
.template-thumbnail{
  border: 1px solid #ccc;
}
.thumbnail-mode .template-thumbnail{
  width:200px;
  height:142px;
}

.list-mode .template-thumbnail img{
  display: none;;
}

#sidePanel .folder-modal {
  position: absolute;
  top: 40px;
  left: 10px;
  right: 10px;
  z-index: 100;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidePanel .folder-modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 320px;
}

.template-menu-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  margin-left: 6px;
  cursor: pointer;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  transition: background 0.2s;
}
.template-menu-btn:hover {
  background: #f1f3f9;
}

.template-context-menu {
  position: absolute;
  z-index: 10001;
  min-width: 160px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0;
  overflow: hidden;
  animation: contextMenuFadeIn 0.2s ease-out;
}
.template-context-menu-item {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}
.template-context-menu-item:hover {
  background: #f8f9fa;
  color: #007bff;
}

@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-5px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* --- Resizer Rules Modal Popup Styles --- */
#resizerRulesModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}
#resizerRulesModal .folder-modal-content {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  padding: 28px 24px 20px 24px;
  max-width: 480px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: contextMenuFadeIn 0.2s;
}
#resizerRulesModal label {
  font-size: 13px;
  font-weight: 500;
  margin-top: 10px;
  margin-bottom: 2px;
  color: #333;
}
#resizerRulesModal input[type="text"],
#resizerRulesModal input[type="email"],
#resizerRulesModal select,
#resizerRulesModal textarea {
  width: 100%;
  padding: 7px 10px;
  margin-bottom: 6px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 13px;
  box-sizing: border-box;
}
#resizerRulesModal select{
  width:25%;
}
#resizerRulesModal textarea {
  resize: vertical;
  min-height: 60px;
}
#resizerRulesModal .element-rule-group {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
#resizerRulesModal .element-rule-group select {
  min-width: 90px;
}
#resizerRulesModal .element-rule-group input[type="text"] {
  flex: 1;
}
#resizerRulesModal .element-rule-group button {
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 0 8px;
  font-size: 15px;
  cursor: pointer;
  height: 32px;
  align-self: center;
}
#resizerRulesModal .element-rule-group button:hover {
  background: #495057;
}
#resizerRulesModal .btn-primary {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 15px;
  margin-right: 8px;
  cursor: pointer;
}
#resizerRulesModal .btn-primary:hover {
  background: #0056b3;
}
#resizerRulesModal .btn-secondary {
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
#resizerRulesModal .btn-secondary:hover {
  background: #495057;
}
@media (max-width: 600px) {
  #resizerRulesModal .folder-modal-content {
    padding: 14px 6px;
    max-width: 98vw;
  }
}

.tickets-chatbox {
  display: flex;
  height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  overflow: hidden;
  margin: 32px auto;
  max-width: 900px;
}
.tickets-sidebar {
  width: 260px;
  background: #f7f7fa;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  padding: 0;
}
.tickets-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: #fafbff;
  position: relative;
}
.ticket-header {
  padding: 18px 24px;
  font-size: 18px;
  font-weight: 600;
  color: #4a00e0;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}
.ticket-messages {
  flex: 1;
  padding: 18px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ticket-reply-form {
  display: flex;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  background: #fff;
}
.ticket-reply-form textarea {
  flex: 1;
  resize: none;
  border-radius: 6px;
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 14px;
}
.ticket-reply-form button {
  background: #4a00e0;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.ticket-reply-form button:hover {
  background: #6628e3;
}
.ticket-list-item {
  padding: 16px 20px;
  border-bottom: 1px solid #ececec;
  cursor: pointer;
  font-size: 15px;
  color: #333;
  background: none;
  transition: background 0.2s;
}
.ticket-list-item.active, .ticket-list-item:hover {
  background: #efe8ff;
  color: #4a00e0;
}
.ticket-list-item .ticket-id {
  font-weight: 600;
  font-size: 14px;
}
.ticket-list-item .ticket-date {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.ticket-message {
  max-width: 70%;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  background: #e9e7fd;
  color: #333;
  align-self: flex-start;
  box-shadow: 0 1px 4px rgba(74,0,224,0.04);
}
.ticket-message.sent {
  background: #ffe600;
  color: #222;
  align-self: flex-end;
}
@media (max-width: 700px) {
  .tickets-chatbox {
    flex-direction: column;
    height: 90vh;
    max-width: 100vw;
  }
  .tickets-sidebar {
    width: 100%;
    min-height: 120px;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .ticket-list-item {
    min-width: 180px;
    border-bottom: none;
    border-right: 1px solid #ececec;
  }
  .tickets-main {
    padding: 0;
  }
}

.ticket-info-card {
  background: #f7f7fa;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  margin: 18px 24px 0 24px;
  padding: 16px 20px;
  font-size: 15px;
  color: #333;
  box-shadow: 0 1px 4px rgba(74,0,224,0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ticket-info-card strong {
  min-width: 120px;
  display: inline-block;
  color: #4a00e0;
  font-weight: 600;
}
.ticket-info-card pre.ticket-element-rules {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #222;
  margin: 6px 0 0 0;
  white-space: pre-wrap;
  word-break: break-word;
}
@media (max-width: 700px) {
  .ticket-info-card {
    margin: 12px 8px 0 8px;
    padding: 10px 8px;
    font-size: 14px;
  }
  .ticket-info-card strong {
    min-width: 90px;
    font-size: 13px;
  }
  .ticket-info-card pre.ticket-element-rules {
    font-size: 12px;
    padding: 6px 6px;
  }
}
/* Global modal styles for popups appended to body */
.folder-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10002;
  background: rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.folder-modal-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  width: 90%;
  max-width: 400px;
}

    /* Canvas Navigation Styles */
    .canvas-nav {
      display: flex;
      align-items: center;
      gap: 15px;
      padding: 10px;
      background: #f8f9fa;
      border-bottom: 1px solid #dee2e6;
      margin-bottom: 10px;
    }

    .canvas-nav button {
      padding: 8px 16px;
      border: 1px solid #007bff;
      background: white;
      color: #007bff;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .canvas-nav button:hover {
      background: #007bff;
      color: white;
    }

    .canvas-nav button:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    #canvasCounter {
      font-weight: bold;
      color: #495057;
    }

    /* Google Sheets Modal Styles */
    .ai-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      box-sizing: border-box;
    }

    .ai-modal-content {
      background: white;
      border-radius: 12px;
      max-width: 600px;
      width: 100%;
      max-height: calc(100vh - 40px);
      overflow-y: auto;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      position: relative;
      margin: auto;
      transform: translateY(0);
    }

    .ai-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 20px;
      border-bottom: 1px solid #dee2e6;
    }

    .ai-modal-header h3 {
      margin: 0;
      color: #495057;
    }

    .close-ai-btn {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #6c757d;
      padding: 0;
      width: 30px;
      height: 30px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .close-ai-btn:hover {
      color: #495057;
    }

    .ai-modal-body {
      padding: 20px;
    }

    .ai-section {
      margin-bottom: 20px;
      padding: 15px;
      border: 1px solid #e9ecef;
      border-radius: 8px;
      background: #f8f9fa;
    }

    .ai-section h4 {
      margin-top: 0;
      color: #495057;
    }

    .ai-apply-btn {
      background: #007bff;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
      transition: background 0.2s;
    }

    .ai-apply-btn:hover {
      background: #0056b3;
    }

    .ai-close-btn {
      background: #6c757d;
      color: white;
      border: none;
      padding: 10px 20px;
      border-radius: 6px;
      cursor: pointer;
      font-weight: 500;
      transition: background 0.2s;
    }

    .ai-close-btn:hover {
      background: #545b62;
    }

    .ai-modal-footer {
      padding: 20px;
      border-top: 1px solid #dee2e6;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
    }

    .ai-loading {
      text-align: center;
      padding: 40px;
    }

    .ai-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid #f3f3f3;
      border-top: 4px solid #007bff;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin: 0 auto 20px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    .canvas-preview-item:hover {
      background: #f8f9fa !important;
    }

    .full-width {
      width: 92%;
    }

    input[type="text"] {
      padding: 8px 12px;
      border: 1px solid #ced4da;
      border-radius: 4px;
      font-size: 14px;
    }

    input[type="text"]:focus {
      outline: none;
      border-color: #007bff;
      box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

    .element-ids h4 {
      margin: 0 0 15px 0;
      color: #495057;
      font-size: 14px;
      font-weight: 600;
    }

    #idList {
      list-style: none;
      padding: 0;
      margin: 0;
      max-height: 300px;
      overflow-y: auto;
    }

    .id-list-item {
      display: flex;
      align-items: center;
      padding: 8px 12px;
      margin: 4px 0;
      background: white;
      border: 1px solid #e9ecef;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      gap: 8px;
    }

    .id-list-item:hover {
      background: #f8f9fa;
      border-color: #007bff;
      box-shadow: 0 2px 4px rgba(0, 123, 255, 0.1);
    }

    .id-list-item.highlight {
      background: #e3f2fd;
      border-color: #2196f3;
      box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
    }

    .id-eye-btn, .id-lock-btn {
      background: none;
      border: none;
      padding: 4px;
      cursor: pointer;
      border-radius: 4px;
      transition: background 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .id-eye-btn:hover, .id-lock-btn:hover {
      background: rgba(0, 0, 0, 0.1);
    }

    .id-text {
      flex: 1;
      font-family: 'Courier New', monospace;
      font-size: 13px;
      color: #495057;
      user-select: none;
    }

    .editable-id-input {
      flex: 1;
      padding: 4px 8px;
      border: 2px solid #007bff;
      border-radius: 4px;
      font-family: 'Courier New', monospace;
      font-size: 13px;
      background: white;
      outline: none;
    }

    .editable-id-input:focus {
      border-color: #0056b3;
      box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

    /* Scrollbar styling for idList */
    #idList::-webkit-scrollbar {
      width: 6px;
    }

    #idList::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 3px;
    }

    #idList::-webkit-scrollbar-thumb {
      background: #c1c1c1;
      border-radius: 3px;
    }

    #idList::-webkit-scrollbar-thumb:hover {
      background: #a8a8a8;
    }

/* ===== MEDIA LIBRARY STYLES ===== */

.media-library-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
    width:100%;
}

.media-library-header {
    margin-bottom: 30px;
    text-align: center;
}

.media-library-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-family: 'Benton', sans-serif;
}

.media-library-header p {
    color: #666;
    font-size: 1.1rem;
}

.media-library-layout {
    display: flex;
    gap: 20px;
    height: calc(100vh - 200px);
}

/* Side Panel Styles */
.media-side-panel {
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.media-side-panel .panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.media-side-panel .panel-header h3 {
    margin: 0;
    color: #333;
    font-family: 'Benton', sans-serif;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Folder Header */
.folder-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.folder-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.folder-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.folder-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.folder-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.view-toggle-btn {
    min-width: auto;
    padding: 8px 12px;
}

/* Breadcrumb */
.breadcrumb-container {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.breadcrumb-item {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.breadcrumb-item:hover {
    background: #f0f0f0;
}

.breadcrumb-item.active {
    color: #007bff;
    font-weight: 500;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

/* Side Panel Content */
.side-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
}

.side-panel-content.thumbnail-mode {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-panel-content.list-mode {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Folder and Template Items */
.folder-item, .template-thumbnail {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.folder-item:hover, .template-thumbnail:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.folder-item.thumbnail-view, .template-thumbnail.thumbnail-view {
    flex-direction: column;
    text-align: center;
    min-height: 120px;
}

.folder-item.list-view, .template-thumbnail.list-view {
    flex-direction: row;
    text-align: left;
    min-height: auto;
}

.folder-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.folder-name, .template-name {
    font-weight: 500;
    color: #333;
    margin: 0;
    font-size: 14px;
}

.folder-count {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: auto;
}

/* Main Content Area */
.media-main-content {
    flex: 1;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.media-toolbar {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.upload-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.upload-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.upload-progress {
    color: #666;
    font-size: 14px;
}

.view-controls {
    display: flex;
    gap: 8px;
}

.view-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #e9ecef;
}

.view-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Media Grid */
.media-grid {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    align-content: start;
}

.media-grid.list-view {
    grid-template-columns: 1fr;
    gap: 10px;
}

.media-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.media-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.media-item.grid-view {
    aspect-ratio: 1;
}

.media-item.list-view {
    display: flex;
    align-items: center;
    padding: 15px;
    aspect-ratio: auto;
    height: auto;
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8f9fa;
}

.media-item.list-view .media-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    margin-right: 15px;
    flex-shrink: 0;
}

.media-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.media-item.list-view .media-info {
    flex: 1;
    padding: 0;
}

.media-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
    margin: 0;
    word-break: break-word;
}

.media-details {
    font-size: 12px;
    color: #666;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.media-item.list-view .media-details {
    flex-direction: row;
    gap: 15px;
}

.media-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.media-item:hover .media-actions {
    opacity: 1;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-family: 'Benton', sans-serif;
}

.empty-state p {
    margin: 0 0 30px 0;
    font-size: 16px;
}

/* Modals */
.folder-modal, .image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.folder-modal-content, .image-preview-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.folder-modal-content h3, .image-preview-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-family: 'Benton', sans-serif;
}

#folderNameInput {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

#folderNameInput:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.folder-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

/* Image Preview Modal */
.image-preview-content {
    max-width: 800px;
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

#previewImage {
    max-width: 400px;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-details {
    flex: 1;
}

.image-details h3 {
    margin: 0 0 15px 0;
    color: #333;
    word-break: break-word;
}

.image-details p {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.image-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

/* Folder List */
.folder-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.folder-option {
    padding: 12px;
    border: 1px solid #ddd;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.folder-option:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.folder-option.selected {
    background: #e7f3ff;
    border-color: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .media-library-layout {
        flex-direction: column;
        height: auto;
    }
    
    .media-side-panel {
        width: 100%;
        order: 2;
    }
    
    .media-main-content {
        order: 1;
        margin-bottom: 20px;
    }
    
    .media-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .media-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-section {
        justify-content: center;
    }
    
    .view-controls {
        justify-content: center;
    }
    
    .image-preview-content {
        flex-direction: column;
        align-items: center;
    }
    
    #previewImage {
        max-width: 100%;
    }
}

/* Notification warning style */
.notification-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
}

/* New Banner Section */
.banner {
    width: 100%;
    height: auto;
    max-height: 500px;
    background: url('/static/images/banner-bg.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 40px 20px;
    overflow: hidden;
}
.banner-content{
  color:#000000;
}
.banner-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    margin-top:70px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.banner-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.demo-btn {
    background-color: #f6871f;
    color: #000000;
    padding: 12px 24px;
    border: none;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.demo-btn:hover {
    background-color: #e07a1a;
}

.start-btn {
    background-color: #000000;
    color: #ffffff;
    padding: 12px 24px;
    border: none;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.start-btn:hover {
    background-color: #333333;
}

/* New Content Section */
.content-section {
    width: 100%;
    background-color: #000000;
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
}

.content-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.content-panels {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.panel-left, .panel-right {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.panel-left p, .panel-right p {
    font-size: 16px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

.highlight {
    color: #f6871f;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* New Who Uses Section */
.who-uses-section {
    width: 100%;
    background-color: #ffffff;
    padding: 60px 20px;
    text-align: center;
}

.who-uses-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    font-family: 'Montserrat', sans-serif;
    color: #000000;
}

.who-uses-parts {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.part {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.part img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    border-radius: 8px;
}

.part p {
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333333;
}

.highlight {
    color: #f6871f;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

/* New Contact Section */
.contact-section {
    width: 100%;
    background-color: #000000;
    padding: 60px 20px;
    color: #ffffff;
}

.contact-parts {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.contact-left, .contact-right {
    flex: 1;
    min-width: 300px;
}

.contact-left h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.contact-left p {
    font-size: 16px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
}

.btn-link {
    color: #f6871f;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #e07a1a;
}

.contact-right form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-right input, .contact-right textarea {
    padding: 12px;
    border: 1px solid #ffffff;
    background-color: #333333;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    border-radius: 0px;
}

.contact-right textarea {
    min-height: 100px;
    resize: vertical;
}

.contact-right input:focus, .contact-right textarea:focus {
    outline: none;
    border-color: #f6871f;
    box-shadow: 0 0 0 2px rgba(246, 135, 31, 0.25);
}

.contact-right select {
    padding: 12px;
    border: 1px solid #ffffff;
    background-color: #333333;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    border-radius: 0px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.contact-right textarea {
    min-height: 100px;
    resize: vertical;
}

.contact-right input:focus, .contact-right textarea:focus, .contact-right select:focus {
    outline: none;
    border-color: #f6871f;
    box-shadow: 0 0 0 2px rgba(246, 135, 31, 0.25);
}

/* Contact Section Send Button */
.send-button {
    background-color: #f6871f;
    color: #000000;
    padding: 12px 24px;
    border: none;
    border-radius: 0px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.send-button:hover {
    background-color: #e07a1a;
}

/* Responsive Design */
@media only screen and (max-width: 600px) {
    /* Mobile devices */
    body {
        font-size: 14px;
    }
    .container {
        width: 95%;
        padding: 10px;
    }
    .header, .footer {
        padding: 10px;
    }
    .nav-links a {
        padding: 8px;
        font-size: 14px;
    }
    .content {
        padding: 10px;
    }
    .banner {
        padding: 40px 0px;
    }
    .content-section {
        padding: 60px 0px;
    }
    .who-uses-section {
        padding: 60px 0px;
    }
    .contact-section {
        padding: 60px 0px;
    }
    .contact-parts {
        margin: 0 20px;
    }
    .who-uses-parts {
        margin: 0 20px;
    }
    .content-panels {
        margin: 0 20px;
    }
}

@media only screen and (min-width: 601px) and (max-width: 1024px) {
    /* Tablets and small desktops */
    body {
        font-size: 16px;
    }
    .container {
        width: 90%;
        padding: 15px;
    }
    .header, .footer {
        padding: 15px;
    }
    .nav-links a {
        padding: 10px;
        font-size: 16px;
    }
    .content {
        padding: 15px;
    }
}

@media only screen and (min-width: 1025px) {
    /* Desktops and iMacs */
    body {
        font-size: 18px;
    }
    .container {
        width: 80%;
        max-width: 1200px;
        /*padding: 20px;*/
    }
    .header, .footer {
        padding: 20px;
    }
    .nav-links a {
        padding: 12px;
        font-size: 18px;
    }
    .content {
        padding: 20px;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Adjust layout for very large screens */
@media only screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
}

/* Hamburger Menu for Mobile */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    margin-right: 15px;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1001;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: block;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    background: #ffffff;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    cursor: pointer;
    color: #333333;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
}

.mobile-nav-links a {
    padding: 15px;
    color: #333333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eeeeee;
    transition: background 0.3s ease;
}

.mobile-nav-links a:hover {
    background: #f8f8f8;
    color: #f6871f;
}

.mobile-dropdown {
    display: flex;
    flex-direction: column;
}

.mobile-dropdown-toggle {
    padding: 15px;
    color: #333333;
    text-decoration: none;
    font-size: 18px;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;
}

.mobile-dropdown-toggle:hover {
    background: #f8f8f8;
    color: #f6871f;
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    background: #f8f8f8;
    padding-left: 15px;
}

.mobile-dropdown-menu.active {
    display: flex;
}

.mobile-dropdown-menu a {
    padding: 10px 15px;
    font-size: 16px;
    color: #555555;
    border-bottom: none;
}

.mobile-dropdown-menu a:hover {
    background: #eeeeee;
    color: #f6871f;
}

@media only screen and (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-overlay {
        display: none;
    }
    .user-dropdown {
        top: 10px;
        right: 60px;
    }
    .logout-btn {
        display: none;
    }
}