.wtbc-frontend-bottle-customozer {
  --wtbc-logo-image-url: url("./../media/logo.png");
}

/* Theme variables */
:root {
  --wtbc-bg-color: #f5f5f5;
  --wtbc-text-color: #333;
  --wtbc-header-bg: #FFFFFF;
  --wtbc-sidebar-bg: #e9e9e9;
  --wtbc-panel-bg: #ffffff;
  --wtbc-preview-bg: #f5f5f5;
  --wtbc-photos-bg: #f5f5f5;
  --wtbc-design-box-bg: white;
  --wtbc-input-bg: #fff;
  --wtbc-input-color: #333;
}

.dark-theme {
  --wtbc-bg-color: #1a1a1a;
  --wtbc-text-color: #f5f5f5;
  --wtbc-header-bg: #0a1520;
  --wtbc-sidebar-bg: #2a2a2a;
  --wtbc-panel-bg: #252525;
  --wtbc-preview-bg: #1a1a1a;
  --wtbc-photos-bg: #252525;
  --wtbc-design-box-bg: #2a2a2a;
  --wtbc-input-bg: #333;
  --wtbc-input-color: #f5f5f5;
}

.page-template-page-template-customizer.wc-styles-loaded
  #wtbc-frontend-bottle-customizer {
  visibility: visible !important;
  transition: visibility 0s ease 0s;
}

.wtbc_icon {
  width: 24px;
  height: 24px;
  display: flex;
  fill: #666;
  line-height: 0;
  justify-content: center;
  align-items: center;
}

/* Global Reset */
.wtbc-frontend-bottle-customozer * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: redhattext, sans-serif;
}

.wtbc-frontend-bottle-customozer {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--wtbc-bg-color, #f5f5f5);
  color: var(--wtbc-text-color, #333);
  /* padding-top: 110px;
  background-color: #00283e; */
  /* position: relative;
  z-index: 9999; */
  /* Prevent horizontal scrollbar */
}

body.logged-in.admin-bar .wtbc-frontend-bottle-customozer {
  height: calc(100vh - 32px);
}

.wtbc-panel-header h3 {
  font-size: 30px !important;
  font-weight: 800 !important;
  color: #58595b !important;
}

/* ==================== HEADER STYLES ==================== */
.wtbc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--wtbc-header-bg, #FFFFFF);
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  height: 70px;
  margin: 0;
}

/* Logo styling */
.wtbc-logo img {
  height: 55px;
  width: 141px;
}

/* Content area in header */
.wtbc-content-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  flex-grow: 1;
  padding: 0 10px;
  line-height: 1rem;
  min-width: 0;
}

/* Project title styling */
.wtbc-project-title:nth-child(1) {
  color: #161616;
  font-size: 14px;
  font-weight: 700;
}

.wtbc-project-title .wtbc-unsaved {
  font-weight: 500;
}

/* Save link styling */
.wtbc-content-area .wtbc-save {
  color: #00bcd4;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-left: 5px;
}

/* Price area styling */
.wtbc-price-area {
  margin-top: 2px;
  font-weight: normal;
  display: flex;
}

.wtbc-price-text {
  display: inline-flex; /* confine width to content so underline doesn't span full header */
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 5px;
}

/* Prevent layout shifts when hovering price text: do not change width */
.wtbc-price-text:hover {
  width: auto !important;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

/* Keep caret + tutorial button in a stable stacking context so they don't get covered */
.wtbc-price-actions{position:relative;z-index:30;display:inline-flex;align-items:center;gap:8px}
#wtbc-tutorial-btn{position:relative;z-index:31}

.wtbc-price-area span {
  font-size: 12px;
  color: #0B1A41;
}

/* .wtbc-price-area .wtbc_icon {
  width: 8px;
  height: 8px;
  fill: #00bcd4;
} */

/* Original price with strikethrough */
.wtbc-price-area .wtbc-price {
  text-decoration: line-through;
  font-size: 12px;
}

/* Discounted price styling */
.wtbc-price-area .wtbc-discount-price {
  color: #161616;
  font-weight: 500;
}

/* Header buttons container */
.wtbc-buttons {
  display: flex;
  gap: 10px;
  margin-right: 10px;
}

/* Common button styling */
.add-to-cart{
  background-color: #0B1A41;
  color: white;
  font-weight: bold;
  padding: 10px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 12px;
}


.add-to-cart:hover {
  cursor: pointer;
  background-color: white  !important;
  color: black !important;
  border: 1px solid #0B1A41 !important;
}

.add-to-cart:focus {
  cursor: pointer;
  background-color: white  !important;
  color: black !important;
  border: 1px solid #0B1A41 !important;
}


/* Preview button specific styling */
.wtbc-preview-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700 !important;
  background-color: white !important;
  color: #0B1A41 !important;
  border: 1px solid #0B1A41 !important;
  padding: 8px 12px;
  border-radius: 8px;
  margin-left: 12px;
  z-index: 9999;
  white-space: nowrap;
  min-width: 96px;
}
.wtbc-preview-btn:hover {
  cursor: pointer;
  background-color: white  !important;
  color: #161616 !important;
}

.wtbc-preview-btn.is-3d{
  background-color: #0B1A41 !important;
  color: #ffffff !important;
  border-color: rgba(0,0,0,0.12) !important;
  transition: all 0.3s ease-in-out 0s;
}



/* Cart button hover effect */






.wtbc-cart-btn:hover {
  cursor: pointer;
  background-color: #fff !important;
  color: #bb9b49 !important;
  border: 1px solid #bb9b49 !important;
}

/* ==================== MAIN LAYOUT STYLES ==================== */
.wtbc-main-container {
  display: flex;
  height: calc(100vh - 103px);
  width: 100%;
  overflow: hidden;
}

/* ==================== LEFT SIDEBAR STYLES ==================== */
.wtbc-left-sidebar {
  width: 80px;
  min-width: 80px;
  /* Ensure minimum width */
  background-color: var(--wtbc-sidebar-bg, #e9e9e9);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0px;
  border-right: 0px solid #e0e0e0;
  height: 100%;
  /* Full height */
  overflow-y: auto;
  overflow-x: hidden;
  /* Allow scrolling if needed */
}

/* Sidebar item styling */
.wtbc-sidebar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px;
  cursor: pointer;
  position: relative;
  /* transition: background-color 0.2s ease; */
  z-index: 10;
}

/* Sidebar item hover effect */
.wtbc-sidebar-item:hover {
  background-color: rgba(255, 255, 255, 0.7);
  width: 80px;
}

/* Active sidebar item styling */
.wtbc-sidebar-item.active {
  background-color: #f5f5f5;
  width: 80px;
}

/* Sidebar icon styling */
.wtbc-sidebar-icon {
  font-size: 20px;
  color: #666;
  margin-bottom: 5px;
  position: relative;
}

/* Sidebar text styling */
.wtbc-sidebar-item span {
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* ==================== DESIGN PANEL STYLES ==================== */
.wtbc-design-panel {
  width: 245px;
  min-width: 245px;
  /* Ensure minimum width */
  height: 100%;
  /* Full height */
  background-color: var(--wtbc-bg-color, #f5f5f5);
  border-right: 1px solid #e0e0e0;
  /* overflow-y: auto;  */
  padding: 15px;
}

/* Panel header styling */
.wtbc-panel-header {
  color: #58595b;
}

/* Layout options container */
.wtbc-layout-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Individual layout option */
.wtbc-layout-option {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Layout preview box */
.wtbc-layout-preview {
  width: 100%;
  height: 150px;
  /* border: 1px solid #e0e0e0; */
  background-color: #f5f5f5;
  margin-bottom: 5px;
  cursor: pointer;
}

/* Remove bullet points from design items */
.wtbc-design-item {
  list-style: none;
}

/* Text-only layout preview styling */
.wtbc-layout-preview.wtbc-text-only {
  margin: 10px 0px;
  background-image: repeating-linear-gradient(
    #e0e0e0,
    #e0e0e0 1px,
    transparent 1px,
    transparent 10px
  );
  background-size: 100% 10px;
  background-position: 0 10px;
}

/* Single photo layout preview styling */
.wtbc-layout-preview.wtbc-one-photo {
  margin: 10px 0px;
  /* background-image: repeating-linear-gradient(#e0e0e0, #e0e0e0 1px, transparent 1px, transparent 10px); */
  background-size: 100% 10px;
  background-position: 0 10px;
}

/* Layout option text styling */
.wtbc-layout-option span {
  font-size: 12px;
  color: #58595b;
}

/* ==================== RIGHT CONTENT AREA STYLES ==================== */
.wtbc-right-content {
  flex: 1;
  height: 100%;
  justify-content: space-between;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

/* Preview area styling */
/* .wtbc-preview-area {
  height: 75%;
  background-color: var(--wtbc-preview-bg, #f5f5f5);
  padding: 20px;
  overflow: auto;
  width: 100%;
  transition: all 0.3s ease; 
  transform-origin: center center;
  position: relative;
  flex: 1;
} */

/* Adjust preview area height when photos section is collapsed */
.wtbc-add-photos-section.collapsed + .wtbc-preview-area {
  height: calc(100% -40px);
}

/* ==================== ZOOM CONTROLS STYLES ==================== */
.wtbc-zoom-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  background-color: var(--wtbc-input-bg, #fff);
  border-radius: 20px;
  padding: 5px 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Zoom buttons styling */
.wtbc-zoom-controls button {
  background: none !important;
  border: none;
  font-size: 16px;
  color: #666 !important;
  cursor: pointer !important;
  padding: 5px;
}

/* Zoom percentage text */
.wtbc-zoom-controls span {
  margin: 0 10px;
  font-size: 14px;
  color: #666;
}

.wtbc-zoom-controls .wtbc_icon {
  width: 18px;
  height: 18px;
  fill: #666;
}

/* ==================== PHOTOS SECTION STYLES ==================== */
.wtbc-add-photos-section {
  height: 25%;
  min-height: 20px;
  /* Minimum height */
  max-height: 25%;
  /* Maximum height as percentage */
  background-color: var(--wtbc-photos-bg, #f5f5f5);
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
  width: 100%;
  position: relative;
  /* transition: height 0.3s ease; */
}

/* Adjust collapsed photos section height */
.wtbc-add-photos-section.collapsed {
  height: 10px;
  /* Set a minimum height for visibility */
  /* transition: height 0.3s ease; */
  /* Smooth transition */
}

/* Toggle button container */
.wtbc-toggle-photos {
  position: absolute;
  top: -7px;
  left: 52%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Toggle button styling */
.wtbc-toggle-btn {
  background-color: var(--wtbc-bg-color, #fff) !important;
  border: 1px solid #e0e0e0;
  opacity: 1;
  border-radius: 4px;
  width: 32px;
  height: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #232323 !important;
  /* transition: all 0.3s ease; */
}

/* Toggle button hover effect */
.wtbc-toggle-btn:hover {
  background-color: #a09c9c !important;
}

/* Toggle button icon transition */
.wtbc-toggle-btn .fa-chevron-down {
  transition: transform 0.3s ease;
  padding-bottom: 2px;
  padding-left: 2px;
}

/* Rotate icon when collapsed */
.wtbc-toggle-btn.collapsed i {
  transform: rotate(180deg);
  top: -5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.wtbc-toggle-btn .wtbc_icon {
  width: 12px;
  height: 12px;
  transform: rotate(180deg);
  fill: #232323;
  /* transform: translateX(-50%); */
  transition: all 0.3s ease-in-out;
}

.wtbc-toggle-btn.collapsed .wtbc_icon {
  transform: rotate(0deg);
}

/* Add photos button styling */
.wtbc-add-photos-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  background-color: transparent;
  border: none;
  color: #0B1A41 !important;
  font-size: 16px;
  cursor: pointer;
}

.wtbc-add-photos-btn .wtbc_icon svg {
  width: 30px;
  height: 30px;
  fill: #0B1A41;
}

/* Add photos button icon */
.wtbc-add-photos-btn i {
  font-size: 24px;
  color: #0B1A41 !important;
}

/* Hide images icon when photos are added */
.wtbc-add-btn-container.has-photos .wtbc-images-icon {
  display: none;
}

/* Photo preview container */
.wtbc-photo-preview {
  display: flex;
  flex-direction: row;
  gap: 10px;
  /* overflow-x: auto; */
  padding: 15px 0;
  margin-left: 0;
  opacity: 1;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

/* Show photo preview when photos are added */
.wtbc-photo-preview:not(:empty) {
  opacity: 1;
  margin-left: 0;
}

.bulk-upload-prompt {
  padding: 5px 10px;
  background-color: lightgreen;
  border: 2px dashed green;
  font-size: 15px;
}

/* Individual photo item styling */
.wtbc-photo-item {
  position: relative;
  width: 45%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: inline-block;
}

/* Photo image styling */
.wtbc-photo {
  /* width: 120px;*/
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

/* Remove photo button */
.wtbc-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.8) !important;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  padding: 0;
}

/* Remove button hover effect */
.wtbc-photo-remove:hover {
  background-color: rgba(255, 255, 255, 1);
  color: #f05a28;
}
.mobile-bulk-upload-preview {
  display: none !important;
}
section.wtbc-photo-upload-area {
  display: none;
}
section.wtbc-photo-upload-area.has-image {
  display: block;
}
.wtbc-photo-upload-area .wtbc-upload-header {
  display: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  background-color: #f0f0f0;
}
@media screen and (max-width: 600px) {
  .desktop-bulk-upload-preview {
    display: none !important;
  }

  .wtbc-photo-upload-area .wtbc-upload-header {
    padding: 5px 20px;
    font-size: 13px;
    align-items: center;
  }

  .mobile-bulk-upload-preview-wrapper {
    width: 100%;
    padding: 5px 10px;
  }

  .mobile-bulk-upload-preview {
    display: flex !important;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }


  .mobile-bulk-upload-preview .bulk-image-wrapper {
    max-width: 80px !important;
    min-width: 80px !important;
  }

  .mobile-bulk-upload-preview .bulk-image-wrapper img {
    max-height: 80px !important;
    width: 80px !important;
  }

  .wtbc-photo-upload-area .wtbc-upload-header.active {
    display: flex;
  }

  .wtbc_icon {
    width: 20px;
    height: 20px;
  }
}

@media screen and (max-width: 400px) {
  .wtbc-photo-upload-area .wtbc-upload-header {
    padding: 5px 10px;
    font-size: 12px;
    align-items: center;
  }

  .mobile-bulk-upload-preview .bulk-image-wrapper img {
    max-height: 70px !important;
  }

  .bulk-upload-prompt {
    padding: 0px 10px 2px;
    font-size: 14px;
  }
}

/* ==================== FILEPOND CUSTOMIZATION ==================== */
.filepond--root {
  width: 100%;
  margin: 0;
}

.filepond--panel-root {
  background-color: transparent;
}

.filepond--item {
  width: 120px !important;
}

.filepond--drop-label {
  display: none;
}

.wtbc-add-photos-section .filepond--list {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  padding-left: 10px;
}

/* Layout option text styling */
.wtbc-layout-option span {
  font-size: 12px;
  color: #58595b;
}

/* ==================== PHOTOS CONTAINER STYLES ==================== */
.wtbc-photos-container {
  display: flex;
  flex-direction: column;
  /* Always row */
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 5px 15px 0px 15px;
  position: relative;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
    height 0.5s ease-in-out;
}

/* Hide photos container when section is collapsed */
.wtbc-add-photos-section.collapsed .wtbc-photos-container {
  opacity: 0;
  visibility: hidden;
  height: 0%;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out,
    height 0.5s ease-in-out;
}

/* Add button container styling */
.wtbc-add-btn-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  /*left: 0; */
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Adjust button container when photos are added */
.wtbc-add-btn-container.has-photos {
  width: auto;
  /* position: relative; */
  /* margin-right: 20px; */
}

/* Hide images icon when photos are added */
.wtbc-add-btn-container.has-photos .wtbc-images-icon {
  display: none;
}

.wtbc-add-btn-container input#bulk-upload-input {
  position: absolute;
  inset: 0;              /* top:0; right:0; bottom:0; left:0 */
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;       /* shows the hand */
  z-index: 5;            /* above the button */
}

/* Add photos button styling */
.wtbc-add-photos-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  background-color: #ffffff !important;
  border: none;
  color: #00bcd4;
  font-size: 16px;
  cursor: pointer;
  box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
}

/* .wtbc-add-photos-btn:before {
    position: absolute;
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
} */

canvas {
  touch-action: manipulation; /* Prevents iOS double-tap zoom */
}

/* ==================== PREVIEW CONTENT STYLES ==================== */
.wtbc-preview-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  transition: transform 0.3s ease;
}

/* layout: canvas + controls column */
.preview-row{
  display:flex;
  gap:16px;
  align-items:flex-start;
}
.canvas-wrap{flex:1}
.preview-controls{
  display: flex;
  align-items: center;
  /* position the controls outside the canvas by anchoring at the center
     and translating half the canvas width (300px) + offset (16px)
     This keeps the button visually just outside the right edge of a
     centered 600px canvas. Adjust the 300px value if your canvas width
     changes. */
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(calc(300px + 16px));
  z-index: 9999;
  pointer-events: auto;
}

@media (max-width: 768px){
  .preview-row{flex-direction:column-reverse;gap:8px}
  /* On mobile revert controls to normal flow so they sit above the canvas */
  .preview-controls{position:static;justify-content:flex-end;left:auto;transform:none}
  .wtbc-preview-btn{margin-left:0;align-self:flex-end;min-width:64px;padding:6px 10px}
}

/* make bottle preview a positioned container so the preview button can be placed relative to it */
.wtbc-bottle-preview {
  position: relative;
}

/* prevent clipping of overlay controls */
.wtbc-preview-area,
.wtbc-preview-content,
.wtbc-bottle-preview {
  overflow: visible !important;
}

/* Bottle image styling */
.wtbc-bottle-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ==================== DESIGN BOX STYLES ==================== */
.wtbc-panel-close {
  display: none;
}

.wtbc-design-box {
  width: auto;
  height: auto;
  background-color: var(--wtbc-design-box-bg, white);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

.dark-theme .wtbc-design-box {
  border-color: #444;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-theme .wtbc-panel-header h3 {
  color: #f5f5f5 !important;
}

.dark-theme .wtbc-sidebar-item span,
.dark-theme .wtbc-sidebar-icon {
  color: #ddd;
}

.dark-theme .wtbc-layout-preview {
  border-color: #444;
  background-color: #333;
}

.dark-theme .wtbc-sidebar-item.active {
  background-color: #333;
}

.dark-theme .wtbc-toggle-btn {
  background-color: #333 !important;
  border-color: #444;
  color: #ddd !important;
}

.dark-theme .wtbc-zoom-controls {
  background-color: #333;
}

.dark-theme .wtbc-zoom-controls span,
.dark-theme .wtbc-zoom-controls button {
  color: #ddd !important;
}

.dark-theme .wtbc-add-photos-btn i,
.dark-theme .wtbc-add-photos-btn {
  color: #00bcd4 !important;
}

/* Design box image styling */
.wtbc-design-box img {
  max-width: 90%;
  max-height: 80%;
  object-fit: contain;
}

/* Design text styling */
.wtbc-design-text {
  position: absolute;
  text-align: center;
  color: var(--wtbc-text-color, #333);
  font-size: 16px;
  padding: 10px;
  width: 80%;
  word-wrap: break-word;
  z-index: 10;
}

/* ==================== PANEL CONTENT STYLES ==================== */
.wtbc-panel-content {
  width: 100%;
  height: 100%;
}

/* ==================== COLOR GRID STYLES ==================== */
.wtbc-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  margin: 15px 5px;
  padding-left: 2px;
}
.wtbc-flip-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
  gap: 10px;
  margin: 15px 5px;
  padding-left: 2px;
}
.wtbc-color-options,
.wtbc-lid-options,
.wtbc-text-options,
.wtbc-layout-options {
  overflow-y: auto;
  height: calc(100vh - 195px);
  padding-bottom: 20px;
  scrollbar-width: thin;
  scrollbar-color: #00283e #f1f1f1;

  /* For Webkit browsers like Chrome/Safari */
  &::-webkit-scrollbar {
    width: 8px;
  }

  &::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb {
    background: #00283e;
    border-radius: 4px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #001f30;
  }
}

/* Color item styling */
.wtbc-color-item {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Color item hover effect */
.wtbc-color-item:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==================== TEXT OPTIONS STYLES ==================== */
.wtbc-text-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
}

/* Text input container */
.wtbc-text-input {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Text input textarea */
.wtbc-text-box-wrapper textarea {
  width: 100%;
  height: 100px;
  border: 1px solid #e0e0e0;
  border-radius: 6px !important;
  padding: 10px;
  resize: none;
  font-family: inherit;
  opacity: 0.8;
  background-color: var(--wtbc-input-bg, #fff);
  color: var(--wtbc-input-color, #333);
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

/* ==================== RESPONSIVE STYLES FOR MOBILE ==================== */
@media (max-width: 950px) {
  .wtbc-panel-header h3 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #58595b !important;
    padding-right: 5px;
  }

  /* Main container - adjust structure */
  .wtbc-main-container {
    flex-direction: column-reverse;
    height: auto;
    /* Allow content to determine height */
    min-height: calc(100vh - 70px);
    margin-top: auto;
    overflow: visible;
    /* Allow scrolling on mobile */
  }

  /* First row: Preview section */
  .wtbc-right-content {
    width: 100%;
    height: auto;
    justify-content: flex-start;
  }

  /* Adjust preview area for mobile */
  /* Adjust preview area for mobile */
  .wtbc-preview-area {
    width: 100%;
    /* Calculate remaining height: 100vh - (header + leftsidebar + photo section) */
    /* height: calc(100vh - (70px + 94px + 99px)); */

    /* When photos section is collapsed */
    &.photos-collapsed {
      height: calc(100vh - (70px + 94px + 20px));
    }

    min-height: 200px;
  .wtbc-preview-btn {
    z-index: 9999;
  }
  }

  /* Header adjustments for mobile */
  .wtbc-header {
    background-image: var(--wtbc-logo-image-url);
    background-size: 141px 55px;
    background-position: center 10px;
    background-repeat: no-repeat;
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    padding: 5px 10px;
    align-items: center;
    justify-content: space-between;
    z-index: 200;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #FFFFFF;

    &::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      /* background-color: rgba(0, 0, 0, 0.7); */
      z-index: -1;
    }
  }

  /* Third row: Sidebar - Make it stick to the bottom */
  .wtbc-left-sidebar {
    /* order: 3; */
    width: 100%;
    min-width: 100%;
    height: 70px;
    min-height: 70px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0px;
    border-right: none;
    border-top: 1px solid #e0e0e0;
    background-color: var(--wtbc-sidebar-bg, #e9e9e9);
    z-index: 150;
    position: sticky;
    bottom: 0;
  }

  .wtbc-add-photos-section {
    order: 2;
    width: 100%;
    height: 99px;
    min-height: 99px;
    max-height: 99px;
  }

  /* Collapsed state for photos section */
  .wtbc-add-photos-section.collapsed {
    height: 20px;
    min-height: 20px;
    max-height: 20px;
  }

  /* Hide logo on mobile */
  .wtbc-logo {
    display: none;
  }

  /* Content area for mobile */
  .wtbc-content-area {
    width: 60%;
    text-align: left;
    margin: 0;
    padding: 0 5px;
  }

  /* Header buttons for mobile */
  .wtbc-buttons {
    width: 40%;
    justify-content: flex-end;
    margin: 0;
    gap: 8px;
  }

  /* Button styling for mobile */
  .wtbc-buttons button {
    min-width: 80px;
    padding: 8px;
    font-size: 10px;
  }

  /* Second row: Add photos section */
  .wtbc-add-photos-section {
    order: 2;
    width: 100%;
    height: 100px;
    min-height: 20px;
    max-height: 100px;
  }

  .wtbc-photo {
    width: 100px;
    height: 100px;
    object-fit: fill;
  }

  /* Add photos button for mobile */
  .wtbc-add-photos-btn {
    margin-top: 0;
  }

  /* Photos container for mobile */
  .wtbc-photos-container {
    gap: 0px;
  }

  /* Photo preview for mobile */
  .wtbc-photo-preview {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    width: 100%;
    height: 80px;
    padding: 0 10px;
  }

  /* Photo item for mobile */
  .wtbc-photo-item {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
  }

  /* Sidebar items for mobile */
  .wtbc-sidebar-item {
    flex-direction: column;
    width: 25%;
    padding: 10px 1px;
    text-align: center;
    margin-bottom: 0;
  }

  /* Sidebar hover for mobile */
  .wtbc-sidebar-item:hover {
    width: 25%;
    background-color: rgba(255, 255, 255, 0.7);
  }

  /* Active sidebar item for mobile */
  .wtbc-sidebar-item.active {
    width: 25%;
  }

  /* Design panel for mobile and tablet */
  .wtbc-design-panel {
    position: fixed;
    top: 100px;
    left: 0;
    width: 60%;
    min-width: 50%;
    height: calc(100vh - 100px);
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-right: none;
    overflow-y: auto;
    background-color: var(--wtbc-bg-color, #f5f5f5);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px 15px 15px 15px;
    overflow-y: auto;
  }

  /* Show design panel when active */
  .wtbc-design-panel.active {
    transform: translateY(0);
  }

  /* Panel close button */
  .wtbc-panel-close {
    display: block;
    position: absolute;
    top: 15px;
    right: 15px;
    cursor: pointer;
    font-size: 24px;
    color: #666;
  }

  /* Panel overlay */
  .panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 90;
  }

  /* Show panel overlay when active */
  .panel-overlay.active {
    display: block;
  }
}

@media screen and (max-width: 600px) {
  .wtbc-photo-preview {
    height: calc(100% - 130px);
  }
  #bulk-upload-preview .bulk-image-wrapper {
    max-width: 30% !important;
    touch-action: none;
  }  
}

/* ==================== RESPONSIVE STYLES FOR EXTRA SMALL SCREENS ==================== */
@media (max-width: 782px) {
  body.logged-in.admin-bar .wtbc-frontend-bottle-customozer {
    height: calc(100vh - 46px);
  }

  .wtbc-design-panel {
    top: 115px;
    bottom: 94px;
    height: calc(100vh - 209px);
    overflow-y: hidden;
  }
}

@media (max-width: 600px) {
  .wtbc-panel-header h3 {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #58595b !important;
    padding-right: 5px;
  }

  .wtbc-panel-close {
    display: block;
    position: absolute;
    top: 4px;
    right: 10px;
    cursor: pointer;
    font-size: 18px;
    color: #666;
  }

  .wtbc-main-container {
    /* Allow content to determine height */
    min-height: calc(100vh - 0px);
    /* Allow scrolling on mobile */
  }

  /* Header adjustments for extra small screens */
  .wtbc-header {
    flex-direction: column;
    align-items: center;
    padding: 5px 10px;
    height: auto;
    /* Keep logo as background */
    background-position: center 10px;
  }

  /* Design panel adjustments for extra small screens */
  .wtbc-design-panel {
    width: 100%;
    height: calc(100vh - 65%);
    /* Adjust height based on header */
    top: unset;
    bottom: 0;
    /* Match header height */
  }

  .wtbc-color-options,
  .wtbc-lid-options,
  .wtbc-text-options,
  .wtbc-layout-options {
    overflow: scroll;
    height: 100%;
    padding-bottom: 75px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 #f1f1f1;

    /* For Webkit browsers like Chrome/Safari */
    &::-webkit-scrollbar {
      width: 8px;
    }

    &::-webkit-scrollbar-track {
      background: #f1f1f1;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb {
      background: #00283e;
      border-radius: 4px;
    }

    &::-webkit-scrollbar-thumb:hover {
      background: #001f30;
    }
  }

  /* Preview area adjustments */
  .wtbc-preview-area {
    /* height: calc(100vh - 260px); */
    /* Subtract header (100px) + photos section (100px) + sidebar (60px) */
    min-height: 150px;
  }

  .wtbc-content-area {
    width: 100%;
    text-align: center;
    display: none;
  }

  .wtbc-project-title {
    font-size: 13px !important;
    text-shadow: 1px 1px 2px #666;
  }

  .wtbc-price-area span {
    font-size: 11px !important;
    justify-content: center;
  }

  /* Price area for extra small screens */
  .wtbc-price-area {
    text-shadow: 1px 1px 2px #00264ce8;
    font-size: 11px !important;
  }

  .wtbc-buttons {
    width: 100%;
    justify-content: center;
    gap: 10px;
    opacity: 0.9;
    padding-top: 0px;
  }

  /* Button styling for extra small screens */
  .wtbc-buttons button {
    min-width: 90px;
    padding: 5px;
    font-size: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  /* ==================== ZOOM CONTROLS STYLES ==================== */
  .wtbc-zoom-controls {
    bottom: 5%;
    right: 10px;
    padding: 5px 5px;
  }

  /* Zoom buttons styling */
  .wtbc-zoom-controls button {
    font-size: 14px;
  }

  /* Zoom percentage text */
  .wtbc-zoom-controls span {
    margin: 0 5px;
  }
}

@media (max-width: 400px) {
  .wtbc-preview-area {
    padding: 5px 10px;
  }
}

@media (max-width: 330px) {
  .wtbc-panel-header h3 {

  /* Ensure preview controls don't remain translated off-screen on very small devices */
  .preview-controls{position:static !important;left:auto !important;transform:none !important}
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #58595b !important;
    padding-right: 5px;
  }

  .wtbc-project-title {
    font-size: 11px !important;
  }

  .wtbc-content-area .wtbc-save {
    font-size: 11px !important;
  }

  .wtbc-price-area span {
    font-size: 9px !important;
    font-weight: 700 !important;
  }

  /* Price area for extra small screens */
  .wtbc-price-area {
    font-size: 9px !important;
    font-weight: 800 !important;
  }
}

/* ==================== THEME TOGGLE STYLES ==================== */
.wtbc-theme-toggle-preview {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 50;
}

.theme-toggle-btn {
  position: relative;
  width: 140px;
  height: 35px;
  border-radius: 40px;
  background-color: #000 !important;
  color: #fff !important;
  border: none;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Toggle circle with moon icon */
.toggle-circle {
  position: absolute;
  left: 2px;
  top: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #ffffff00;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Moon icon styling */
.toggle-circle .wtbc-moon {
  width: 18px;
  height: 18px;
  fill: #fff;
}

/* Sun icon for light mode (initially hidden) */
.toggle-circle .wtbc-sun {
  display: none;
  width: 18px;
  height: 18px;
  fill: #000000;
}

/* Mode text */
.mode-text {
  position: absolute;
  right: 24px;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Light mode styles */
.theme-toggle-btn.light-active {
  background-color: #f0f0f0 !important;
}

.theme-toggle-btn.light-active .toggle-circle {
  left: calc(100% - 36px);
}

.theme-toggle-btn.light-active .mode-text {
  color: #000 !important;
  left: 24px;
  right: auto;
}

/* Show sun icon in light mode, hide moon icon */
.theme-toggle-btn.light-active .toggle-circle .wtbc-moon {
  display: none;
}

.theme-toggle-btn.light-active .toggle-circle .wtbc-sun {
  display: block;
}

/* Responsive styles for theme toggle */
@media (max-width: 950px) {
  .wtbc-theme-toggle-preview {
    top: 12px;
    right: 8px;
  }

  .theme-toggle-btn {
    width: 120px;
    height: 35px;
  }

  .toggle-circle {
    width: 30px;
    height: 30px;
    left: 0px;
    top: 2px;
  }

  .moon-icon {
    width: 18px;
    height: 18px;
  }

  .mode-text {
    font-size: 10px;
    right: 18px;
  }

  .theme-toggle-btn.light-active .toggle-circle {
    left: calc(100% - 35spx);
  }

  .theme-toggle-btn.light-active .mode-text {
    left: 18px;
  }
}

@media (max-width: 782px) {
  .wtbc-theme-toggle-preview {
    top: 12px;
    right: 8px;
  }
}

@media (max-width: 600px) {
  .wtbc-theme-toggle-preview {
    top: 20px;
    right: 5px;
  }

  .theme-toggle-btn {
    width: 100px;
    height: 25px;
  }

  .toggle-circle {
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
  }

  .moon-icon {
    width: 12px;
    height: 12px;
  }

  .mode-text {
    font-size: 8px;
    right: 14px;
  }

  /* Moon icon styling */
  .toggle-circle .wtbc-moon {
    width: 18px;
    height: 18px;
    fill: #fff;
  }

  /* Sun icon for light mode (initially hidden) */
  .toggle-circle .wtbc-sun {
    display: none;
    width: 18px;
    height: 18px;
    fill: #000000;
  }

  .theme-toggle-btn.light-active .toggle-circle {
    left: calc(100% - 24px);
  }

  .theme-toggle-btn.light-active .mode-text {
    left: 20px;
  }

}

@media (max-width: 400px) {


  .wtbc-left-sidebar {
    height: 65px;
    min-height: 65px;
  }
}
@media screen and (max-width: 330px) {
  .wtbc-main-container {
    min-height: calc(100vh - 0px);
  }
  .wtbc-sidebar-item {
    padding: 5px 0px;
  }
}
.wtbc_loader {
  display: none;
  position: absolute;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: calc(100% + 24px);
  height: calc(100% + 6px);
  background-color: #00000069;
  top: -6px;
  left: -12px;
  z-index: 99999;
}
.wtbc-right-content { position: relative; }
/* Own the outer box: square, centered, no overflow */
#frontend_2d_canvas_container{
  position:relative;
  margin:0 auto;
  width:600px;                /* desktop logical size */
  aspect-ratio:1 / 1;         /* makes it square */

}

/* 3D container same idea if you need */
#wtbc_customizer_bottle_3d{
  position:relative;
  margin:0 auto;
  width:600px;
  aspect-ratio:1 / 1;
}

#frontend_2d_canvas_container { aspect-ratio: 1 / 1; }
#frontend_2d_canvas_container .canvas-container,
#frontend_2d_canvas_container canvas.lower-canvas,
#frontend_2d_canvas_container canvas.upper-canvas {
  width:100%; height:100%; position:absolute; left:0; top:0; transform:none !important;
}

/* Mobile: force 300 × 300 look via width only; height comes from aspect-ratio */
@media (max-width:600px){
  #frontend_2d_canvas_container,
  #wtbc_customizer_bottle_3d{
    width:300px !important;
  }
}

#frontend_2d_canvas_container[style*="display: none"] {
  display: none !important;
}
#frontend_2d_canvas_container[style*="display: none"] .canvas-container,
#frontend_2d_canvas_container[style*="display: none"] canvas {
  display: none !important;
}


.wtbc-design-item.selected {
  border: 3px solid #0073e6;
  box-shadow: 0 0 10px rgba(0, 115, 230, 0.4);
  border-radius: 6px;
}
.wtbc-color-item.selected {
  outline: 3px solid #007bff;
  box-shadow: 0 0 5px #007bff;
  border-radius: 4px;
}
.wtbc-dual-color-item {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 5px;
  display: inline-block;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: 0.2s;
}

.wtbc-dual-color-item.selected {
  outline: 3px solid #000;
  outline-offset: 2px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.4);
}
.wtbc-bg-grid ul {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
  justify-content: space-between;
}

.wtbc-bg-grid ul li {
  max-width: 45%;
  width: 100%;
}
@media screen and (max-width: 768px) {
  .wtbc-preview-content {
    height: auto;
  }

  #wtbc_customizer_bottle_3d {
    width: 400px;
    height: 400px; /* Or whatever height you need */
    position: relative;
  }
  #wtbc_customizer_bottle_3d canvas {
    max-width: 400px;
    max-height: 400px; /* Or whatever height you need */
  }

  .wtbc-bg-grid ul {
    gap: 15px;
    justify-content: center;
  }

  .wtbc-bg-grid ul li {
    max-width: 30%;
  }
}

/* ===== Tutorial button + modal styles (moved from template) ===== */
.wtbc-price-actions{display:inline-flex;align-items:center;gap:8px}

#wtbc-tutorial-btn{display:none;align-items:center;gap:8px;padding:6px 10px;height:36px;background: linear-gradient(135deg, red);color:white !important;border: none;

  color: white;

  font-weight: bold;

  border-radius: 5px;

  cursor: pointer;

  transition: transform 0.2s ease;}
#wtbc-tutorial-btn span{display:inline-block}
#wtbc-tutorial-btn svg {
 
  width: 20px; 
  height: 20px;

  flex: 0 0 20px; 

  display: block;
}
#wtbc-tutorial-btn:hover{transform: scale(1.05);
  filter: brightness(1.05);}
#wtbc-tutorial-btn:focus{outline:3px solid rgba(11,26,65,0.18);outline-offset:2px}

/* Ensure tutorial button doesn't cause layout shifts on hover/focus */
.wtbc-price-text, .wtbc-price-actions{min-height:36px}

/* Modal close button styling */
#wtbc-tutorial-modal button#wtbc-tutorial-close{position:absolute;top:12px;right:12px;z-index:10;background:#000;color:#fff;border:none;border-radius:50%;width:36px;height:36px;display:flex;align-items:center;justify-content:center}

/* Mobile: keep header action buttons compact and equal-sized */
@media (max-width: 600px){
  .wtbc-buttons{display:flex;gap:8px;align-items:center}
  .wtbc-buttons .add-to-cart, #wtbc-tutorial-btn{padding:8px 10px;height:36px;font-size:13px;min-width:0;border-radius:6px}
  /* Make tutorial btn slightly narrower (icon visible) */
  #wtbc-tutorial-btn{padding:6px 8px}
}

/* Very small screens: show icon-only tutorial button to save space */
@media (max-width: 420px){
  #wtbc-tutorial-btn span{display:none}
  #wtbc-tutorial-btn{padding:6px;width:40px;display:inline-flex;align-items:center;justify-content:center}
}

