html {
  margin: 0 !important;
}
.artsy-page-wrap {
  min-height: 100px !important;
}
.container {
  width: 100%;
  max-width: 1440px;
  /*padding: 0 20px;*/
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

#photobook-share {
  display: none;
}

/* Header Toolbar */
.header-toolbar {
  display: flex;
  width: 100px;
  height: 100%;
  padding: 10px 0;
  /* overflow-y: hidden; */
  /* justify-content: space-between; */
  flex-direction: column;
  align-items: center;
  /* line-height: 70px; */
  /* margin-bottom: 25px; */
  /* flex-wrap: wrap; */
  gap: 10px;
  /* padding: 15px 20px; */
  /* box-shadow: 2px 2px 10px 2px rgba(0, 0, 0, 0.25); */
}

.photobook-content.mode-view .header-toolbar {
  display: none;
}

.toolbar-actions-wrapper {
  display: flex;
  gap: 10px;
  /* height: 100%; */
}

.toolbar-actions-wrapper .divider {
  width: 1px;
  /* height: 122px; */
  background-color: #ccc;
}

.toolbar-actions-wrapper .toolbar-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
  justify-content: center;
  max-width: 120px;
}
.toolbar-actions .option {
  color: white;
  background-color: black;
  padding: 0px 18px;
  line-height: 40px;
  border-radius: 7px;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
}

.topic-wrapper {
  display: flex;
  gap: 10px;
}

.topic-content {
  font-size: 1.2em;
  font-weight: bold;
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
}

.topic-wrapper .topic-content .title {
  line-height: 25px;
  font-size: 14px;
  /* text-align: center; */
  margin-left: 5px;
}

.topic-wrapper .topic-content .select-topic {
  /* margin-top: 10px; */
  font-size: 12px;
  background-color: #ffffff;
  width: 100px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.topic-wrapper .topic-content .select-topic .sod_select {
  padding-right: 40px;
  line-height: 30px;
}

.topic-wrapper .topic-content .select-topic .sod_select:before {
  width: 10px;
  height: 100%;
  font-size: 10px;
}

.topic-content .select-topic .sod_list {
  /* background-color: #ffffff; */
}

.topic-content .select-topic .sod_option {
  font-size: 12px;
}
.topic-wrapper .divider {
  width: 1px;
  height: 122px;
  background-color: #ccc;
}

.layout-toolbar {
  display: flex;
  align-items: center;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.layout-toolbar .custom-arrow {
  font-size: 20px;
  cursor: pointer;
  padding: 5px 0;
}

.layout-toolbar .divider {
  width: 100%;
  height: 1px;
  background-color: #ccc;
  position: absolute;
}

.layout-toolbar .divider.left {
  left: 0;
  top: 0;
  right: 0;
}

.layout-toolbar .divider.right {
  right: 0;
  left: 0;
  bottom: 0;
}

#add-box-to-layout {
  background: #000;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
}

#add-box-to-layout:active {
  transform: translateY(0);
}

.layout-toolbar .layout-option .option {
  cursor: pointer;
  border: solid 1px #e0e0e0;
}

.layout-toolbar .divider.right {
  right: 0;
  left: 0;
  bottom: 0;
}

.layout-options {
  height: 100%;
  width: 100%;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  overflow-y: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  gap: 5px;
  scrollbar-color: rgba(0, 0, 0, 0.4) transparent;
}

/* width của scrollbar */
.layout-options::-webkit-scrollbar {
  width: 0; /* dọc */
  height: 0; /* ngang */
}

/* thanh kéo */
.layout-options::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
}

/* nền scrollbar */
.layout-options::-webkit-scrollbar-track {
  background: transparent;
}

.layout-options::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.layout-option {
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
  gap: 5px;
  height: auto;
}

.layout-option .option {
  display: flex;
  justify-content: center;
  height: 100%;
  margin: 0 6.667%;
}

.layout-option .option img {
  object-position: center;
  width: 100%; 
  /* object-fit: cover; */
  height: 100%
}

.header-full-view {
  width: 100%;
  /* height: 70px; */
  display: flex;
  padding: 5px 20px;
  gap: 20px;
  justify-content: space-between;
  position: relative;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1;
}

.header-full-view .header-left {
  display: flex;
  gap: 50px;
}

.header-full-view .logo img {
  width: auto;
  max-width: 100px;
  /* height: 100%; */
}

.header-full-view .photobook-info {
  display: flex;
  align-items: center;
  max-width: 30%;
  min-width: 200px;
}
.header-full-view .photobook-info .photobook-description {
  display: flex;
  /* align-items: center; */
  font-size: 16px;
  font-weight: 400;
  flex-direction: column;
  width: 100%;
  gap: 3px;
  justify-content: center;
}

.photobook-description .title {
  font-size: 16px;
  font-weight: 700;
  text-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.comment-product{
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.photobook-description .sub-title {
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  text-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 10px;
}

/* Edit Photobook Info Tooltip */
.title-edit-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.edit-info-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: #666;
  transition: color 0.2s;
}

.photobook-content.mode-view .edit-info-btn {
  display: none;
}

.edit-info-btn i {
  font-size: 16px;
}

.edit-info-tooltip {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0 15px 15px 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 320px;
}

.edit-info-tooltip .tooltip-header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    background: white;
}

.edit-info-tooltip .tooltip-header h6 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.edit-info-tooltip .tooltip-body .form-group {
  margin-bottom: 15px;
}

.edit-info-tooltip .tooltip-body .form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 500;
}

.edit-info-tooltip .tooltip-body .form-group input,
.edit-info-tooltip .tooltip-body .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.edit-info-tooltip .tooltip-body .form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.edit-info-tooltip .tooltip-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.edit-info-tooltip .btn-cancel,
.edit-info-tooltip .btn-confirm {
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.edit-info-tooltip .btn-cancel {
  border: 1px solid #ddd;
  background: white;
}

.edit-info-tooltip .btn-confirm {
  border: none;
  background: #000;
  color: white;
}

.size-selection {
  min-width: 100px;
  position: absolute;
  bottom: 5px;
  right: 3px;
}
.size-selection .size {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  text-align: center;
}

.photobook-actions {
  display: flex;
  gap: 10px;
  /* flex-direction: column; */
  /* justify-content: center; */
  /* width: 200px; */
  flex-wrap: wrap;
  align-items: center;
  overflow: auto;
  max-height: 70px;
  min-height: 70px;
}

.photobook-actions .option {
  color: white;
  background-color: black;
  padding: 0px 18px;
  line-height: 35px;
  border-radius: 100px;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  min-width: 90px;
}

.photobook-actions .option a {
    color: #fff;
}

.photobook-actions .option.hidden {
  display: none;
}

.group-btn-select-photos {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.group-btn-select-photos button {
  flex: 1;
}

.btn-clear-all {
  background-color: #ff4d4d;
  color: white;
  border: none;
  padding: 10px 13px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  transition: background 0.3s;
}

.sidebar-image-item .delete-image-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.8);
  color: #ff4d4d;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.full-view {
  display: flex;
  height: calc(100vh - 107px);
  gap: 20px;
  padding: 0 20px;
  border-top: 1px solid #ccc;
  position: relative;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Book Preview */
.photobook-embed .wrapper-top-content-book {
  justify-content: space-between;
}

.wrapper-top-content-book{
  display: flex;
  align-items: center;
  justify-content: end;
}
.photobook-content #viewer-fullscreen {
  margin-top: 8px;
  margin-right: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 12px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(4px);
}

.photobook-content #viewer-zoom {
  margin-top: 8px;
  margin-right: 8px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 12px;
  height: 30px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(4px);
}

.wrapper-book-preview {
  width: calc(100% - 20% - 15%);
  display: flex;
  flex-direction: column;
  background-color: #f4f4f9;
  position: relative;
}

.toggle-thumbnail-btn {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  border: unset;
  border-top-right-radius: 15px;
  color: white;
  width: 40px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: unset !important;
}

.toggle-thumbnail-btn.active {
  background: #0073aa;
}

.toggle-thumbnail-btn i {
  font-size: 15px;
  transition: transform 0.3s ease;
}

.photobook-content.mode-view .wrapper-book-preview {
  width: 100%;
}
.photobook-content .book-action-fast-mobile {
  display: none;
}
.photobook-content .book-action-fast-mobile .save-btn {
  margin: 10px;
  background: #000;
  color: #fff;
  border: none;
  padding: 0 18px;
  height: 30px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.photobook-content .book-action-fast-mobile .save-btn[data-icon="save"]::before {
  content: "\f0c7";
}
.photobook-content .book-action-fast-mobile .save-btn[data-icon="create"]::before {
  content: "\f067";
}
.photobook-content .book-action-fast-mobile .save-btn[data-icon="edit"]::before {
  content: "\f304";
}

.photobook-content .book-action-fast-mobile .save-btn::before {
  font-family: "Font Awesome 5 Pro";
  font-weight: 900;
  font-size: 14px;
}

.photobook-content .book-action-fast-mobile .save-btn:active {
  transform: scale(0.95);
  background: #222;
}
.book-preview {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  /* width: calc(100% - 120px); */
  padding: 0 70px 0px 70px;
}

/* book-preview-content fills all available space inside .book-preview */
.book-preview-content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* book-preview-content-inner is sized by JS (flip-book pixel calc),
   but centered via flex */
.book-preview-content-inner {
  position: relative;
  display: block;
}
/* .thumb-carousel-wrapper {
  width: 100%;
  overflow-y: hidden;
  flex-shrink: 0;
} */
#thumb-carousel {
  width: 100%;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  scroll-behavior: smooth;
}
@media (max-height: 600px) {
  #thumb-carousel {
    display: none;
  }
}
.thumb-slide {
  padding: 3px 10px;
}
.spread-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-shadow: 0px 0px 60px rgba(0, 0, 0, 0.3);
}
.page-thumb.even {
  background-image: url(../../turnjs/pics/gradient-page-left.jpg);
  background-position: right top;
  background-repeat: repeat-y;
}
.page-thumb.odd {
  background-image: url(../../turnjs/pics/gradient-page-right.jpg);
  background-position: left top;
  background-repeat: repeat-y;
}

.page-thumb .page-number {
  display: block;
  position: absolute;
  bottom: 0;
  z-index: 10;
  font-weight: 500;
  font-size: 10px;
  text-align: center;
  background-color: rgba(48, 46, 46, 0.53);
  color: white;
  padding: 2px 8px;
  border-radius: 3px 3px 0 0;
  left: 50%;
  transform: translateX(-50%);
}

.photobook-content .delete-spread-btn {
  position: absolute;
  top: 0;
  right: 5px;
  z-index: 100;
  background: #ff4d4d;
  color: white;
  border: none;
  border-radius: 0 0 4px 4px;
  padding: 5px 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s;
  display: none;
}

.photobook-content .delete-spread-btn.active{
  display: block;
}

.photobook-content.mode-view .delete-spread-btn {
  display: none;
}

.wrapper-book-preview.album {
  flex: 1;
}

.wrapper-book-preview.album .book-preview {
  width: 100%;
}

.header-full-view .group-action-price {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* align-items: center; */
}

.header-full-view .price-expire-time {
  /* CONTAIN-INTRINSIC-BLOCK-SIZE: AUTO 100PX; */
  /* position: absolute; */
  /* bottom: -20px; */
  /* transform: translateY(-50%); */
  /* right: 0; */
  /* left: 0; */
  font-size: 14px;
  display: flex;
  /* justify-content: space-between; */
  gap: 30px;
  width: 100%;
  /* padding: 0 20px 0 175px; */
}

.price-expire-time .calculator-price {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.calculator-price .calculation-price {
  cursor: pointer;
  position: relative;
  display: inline-block;
}

.calculator-price .calculation-price .popup-price {
  display: none;
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 300px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 12px;
}
.calculator-price .calculation-price .popup-price.show {
  display: block;
}

/* Price Summary inside Popup */
.price-summary-box {
  margin-top: auto;
  border-top: 1px dashed #ccc;
  padding-top: 15px;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-row span {
  font-size: 14px;
  color: #555;
}

.price-row span.label-bold {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.price-row strong {
  font-size: 15px;
  color: #333;
}

.price-row strong.total-price {
  font-size: 18px;
  color: #e74c3c;
  white-space: nowrap;
}

.text-nowrap {
  white-space: nowrap;
}
.panel-setting-price .price-row span, .price-row strong{
  font-size: 13px;
}
.panel-setting-price .price-row span.label-bold, .panel-setting-price strong.total-price{
  font-size: 14px;
}
.panel-setting-price .price-summary-box{
  padding-top: 10px;
  margin-top: 10px;
}

#expireMessage.warning {
  color: red;
  animation: blink 2s infinite;
}

.book-preview #photbook-price {
  /* position: absolute; */
  /* top: 25px; */
  /* transform: translateY(-50%); */
  /* left: 70px; */
  /* font-size: 14px; */
}

.book-preview #addPage-btn {
  position: absolute;
  top: 25px;
  transform: translateY(-50%);
  right: 25px;
  font-size: 24px;
  cursor: pointer;
  color: #0d99ff;
}

.photobook-content.mode-view #addPage-btn {
  display: none;
}

.region-controls {
  position: absolute;
  width: 73%;
  height: 63.5%;
  left: 12.5%;
  top: 12.5%;
  padding: 3% calc(3% + 2px) calc(3% + 2px) calc(6% - 5px);
  display: flex;
}

.region-controls .page-left,
.region-controls .page-right {
  width: 50%;
  height: 100%;
}

.book-preview .image-item {
  width: 100%;
  height: 100%;
}
.book-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-button {
  font-size: 2em;
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  transition: color 0.3s;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.nav-button.left {
  left: 10px;
}

.nav-button.right {
  right: 10px;
}

/* Pagination */
.pagination {
  text-align: center;
  font-size: 14px;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000000;
  color: white;
  line-height: 30px;
  padding: 0px 20px;
  border-radius: 100px;
  opacity: 0.7;
  z-index: 100;
}

.book-preview .next-button,
.book-preview .previous-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 35px;
  cursor: pointer;
  z-index: 2;
}

.book-preview .next-button {
  right: 25px;
}

.book-preview .previous-button {
  left: 25px;
}

.book-preview .previous-button,
.book-preview .next-button {
  background-position: center;
  background-repeat: no-repeat;
  color: black;
}

.auto-layout-drawer.show .drawer-content {
  right: 0;
}

.auto-layout-drawer .layout-suggestions-container {
  overflow-y: auto;
  padding: 5px;
  gap: 5px;
  display: grid;
  grid-template-columns: 1fr;
}

.auto-layout-drawer .layout-pair-item {
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  background: #fff;
}

.auto-layout-drawer .layout-preview {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.auto-layout-drawer .layout-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.auto-layout-drawer .swap-button {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #999;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 12px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auto-layout-drawer .swap-button i {
  color: #333;
}

.auto-layout-drawer .layout-suggestions-container::-webkit-scrollbar {
  width: 8px;
}

.auto-layout-drawer .layout-suggestions-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.auto-layout-drawer .layout-suggestions-container::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.auto-layout-drawer .header {
  padding: 12px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.auto-layout-drawer .drawer-content {
  position: fixed;
  top: 0;
  right: -15%;
  width: 15%;
  max-width: 90vw;
  height: 100vh;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.auto-layout-drawer .header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.auto-layout-drawer .header .close-btn {
  cursor: pointer;
  font-size: 24px;
  color: #666;
}

.popup-container.auto-layout-drawer{
  display: none;
}

@media (max-width: 600px) {
  .next-button {
    right: 9px !important;
  }
  .previous-button {
    left: 9px !important;
  }
}

.rotateDeviceOverlay {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 1);
  width: 100%;
  height: 100%;
  color: white;
  overflow-y: auto;
  z-index: 999999;
}

.rotateDeviceOverlay .close-rotate-overlay {
  color: white;
  font-size: 23px;
  cursor: pointer;
  width: 35px;
  height: 35px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000000;
}

.rotateDeviceOverlay .iconContainer {
  padding: 0 1.25rem;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.rotateDeviceOverlay .phone {
  position: relative;
  width: 0;
  height: 0;
  border: 0 solid #000;
  background: #a9a9a9;
  border-radius: 10px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading {
  -webkit-animation: rotation 2s infinite linear;
  width: 50px;
  height: 50px;
}

.rotateDeviceOverlay .iconContainer p {
  display: inline-block;
  width: 100%;
  text-align: center;
  margin: 0;
  font-size: 20px;
}

/* KEYFRAMES
------------------------------------------- */
/* Animate width + height */
@keyframes sizeIncrease {
  0% {
    width: 0;
    height: 10px;
  }
  50% {
    width: 100px;
    height: 10px;
  }
  100% {
    width: 100px;
    height: 160px;
  }
}
/* Add borders */
@keyframes borderIncrease {
  100% {
    border-width: 20px 10px;
  }
}
/* fade-in  */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    color: white;
    opacity: 1;
  }
}
/* Rotate device */
@keyframes rotateRight {
  100% {
    transform: rotate(90deg);
  }
}
/* Animate popup auto layout */
@keyframes popupAutoLayout {
  0% {
    opacity: 0;
    left:60px;
  }
  100% {
    opacity: 1;
    left: 300px;
  }
}
#loading {
  -webkit-animation: rotation 2s infinite linear;
  width: 50px;
  height: 50px;
}

@keyframes rotation {
  from {
    -webkit-transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(180deg);
  }
}

@media only screen and (max-width: 768px) and (min-height: 468px) {
  /* body {
    overflow: hidden;
  } */
  .rotateDeviceOverlay {
    display: flex;
    flex-direction: column;
    justify-content: start;
  }
  .rotateDeviceOverlay .phone {
    animation:
      sizeIncrease 0.5s forwards ease,
      borderIncrease 0.5s 0.5s forwards ease,
      rotateRight 0.7s 1s forwards ease;
  }

  .rotateDeviceOverlay .iconContainer p {
    animation: fadeIn 0.5s 1.3s forwards ease;
  }
}

.header-rotate-overlay{
  position: absolute;
  right: 0;
  z-index: 999999;
  background-color: rgba(0, 0, 0, 1);
  padding: 1.25rem 1.25rem 0 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* Zalo Photobook Instructions */
.zalo-instruction-photobook {
  display: none;
}

body.is-zalo .iconContainer.rotate-normal p{
  display: none;
}

body.is-zalo .rotateDeviceOverlay .zalo-instruction-photobook {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
}

body.is-zalo .zalo-instruction-photobook p:first-child {
  margin-top: 0;
  margin-bottom: 0;
}

body.is-zalo .zalo-instruction-photobook p {
  color: #fff;
  margin-bottom: 15px;
  text-align: center;
  line-height: 1.4;
}
body.is-zalo .rotateDeviceOverlay .iconContainer{
  flex: unset;
}

.zalo-instruction-photobook img{
  max-width: 290px; 
  border-radius: 8px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

#step-2 .container {
  background-color: #ffffff;
  padding: 15px;
  position: relative;
  z-index: 2;
}

#step-2 .step2-overlay {
  /* position: absolute; */
  /* width: 100%; */
  /* height: 100%; */
  /* top: 0; */
  /* left: 0; */
  /* background-color: rgba(0, 0, 0, 0.3); */
  /* z-index: 1; */
  /* opacity: 0.6; */
}

.step2-container {
  margin: 0 auto;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  /* gap: 20px; */
  overflow: hidden;
}

.step2-container.wpadminbar {
  margin: 32px auto 0 auto;
  height: calc(100vh - 32px);
}
@media (min-width: 1400px) {
  .step2-container {
    /* max-width: 1440px !important; */
  }
}

.actions-support .popup-container {
  z-index: 111111;
}

.time-options-mobile {
  display: none;
}
.time-options-mobile .years-options {
  padding: 0 !important;
}
.time-options-mobile .months-options {
  padding: 0 !important;
}

.infocontent-photobook {
  justify-content: center;
}
.photobook-page .artsy-posterwalls-wrap {
  padding-bottom: 3.125rem;
}
.photobook-page .sub-header {
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  font-size: 1.25rem;
}

.photobook-page
  .artsy-posterwalls-wrap
  .content-container.album-photobook-container
  .artsy-products
  .product
  .artsy-shop-loop-thumbnail {
  height: auto;
  aspect-ratio: auto;
}

.photobook-page
  .artsy-posterwalls-wrap
  .content-container.album-photobook-container
  .artsy-products
  .product {
  display: flex;
  justify-content: center;
  flex-direction: column;
  margin-top: 20px;
  width: calc(22% - 20px);
}

body.fullscreen .left-sidebar-menu {
  display: none !important;
}
body.fullscreen .header-toolbar {
  display: none !important;
}
body.fullscreen .header-full-view {
  display: none !important;
}
body.fullscreen .wrapper-book-preview {
  width: 100% !important;
}
body.fullscreen .full-view,.photobook-embed .full-view {
  height: 100vh !important;
}

/* Embed: scale padding with viewport so book fills small iframes */
.photobook-embed .book-preview {
  padding: clamp(0px, 5vw, 70px) clamp(20px, 5vw, 70px);
}

/* Embed: book-preview-content must fill .book-preview */
.photobook-embed .book-preview-content {
  width: 100%;
  height: 100%;
}
body.fullscreen .panel-setting {
  display: none;
}
body.fullscreen .responsive-left-nav {
  display: none;
}
body.fullscreen .book-action-fast-mobile {
  display: none;
}
.photobook-content.mode-view #viewer-fullscreen,
.photobook-content.mode-view #viewer-zoom {
  display: flex;
}

.photobook-content.mode-view #auto-view-btn {
  display: flex;
}

.book-controls-top {
  display: flex;
  gap: 8px;
  align-items: center;
}

#auto-view-btn {
  position: absolute;
  top: 8px;
  right: 60px;
  z-index: 10;
  background: #121212;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 12px;
  height: 36px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.15s ease;
  backdrop-filter: blur(4px);
}

#auto-view-btn.active {
  background: rgba(5, 30, 248, 0.7);
  border-color: rgba(5, 30, 248, 0.7);
}

@media (hover: hover) {
  .photobook-content #viewer-fullscreen:hover,
  .photobook-content #viewer-zoom:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
  }

  #auto-view-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
  }

  #auto-view-btn.active:hover {
    background: rgba(5, 30, 248, 0.7);
  }
}

@media (hover: hover) {
  .photobook-page
    .artsy-posterwalls-wrap
    .content-container.album-photobook-container
    .artsy-products
    .product
    .artsy-shop-loop-thumbnail:hover
    .act-like-print {
    justify-content: center;
  }
}

.photobook-page
  .artsy-posterwalls-wrap
  .content-container.album-photobook-container
  .artsy-products
  .product
  .artsy-shop-loop-details
  .woocommerce-loop-product__title {
  padding-right: 0;
}

.photobook-page
  .artsy-posterwalls-wrap
  .content-container.album-photobook-container
  .artsy-products
  .product
  .artsy-shop-loop-details
  .woocommerce-loop-product__title
  a {
  color: #fff;
}

@media (max-width: 1100px) {
  .photobook-actions .option {
    padding: 0px 16px;
    font-size: 12px;
    line-height: 30px;
  }
}

@media (max-width: 1024px) {
  .photobook-content.mode-view #viewer-zoom {
    display: none;
  }
  .infocontent-photobook .name-photobook,
  .infocontent-photobook .des-photobook {
    max-width: 156px !important;
    min-width: 30px !important;
  }
  .infocontent-photobook .col-content input,
  .infocontent-photobook .col-content select {
    height: 35px;
    font-size: 13px;
    padding: 5px;
  }
  .infocontent-photobook .size-photobook {
    width: 22%;
    max-width: 156px;
  }
  .photobook-page
    .containercontent-photobook
    .infocontent-photobook
    .size-photobook
    .sod_select {
    height: 35px;
  }
  .col-content.size-photobook .sod_label {
    font-size: 13px !important;
    padding-left: 10px !important;
  }
  .photobook-page
    .containercontent-photobook
    .infocontent-photobook
    .size-photobook
    .sod_select::before {
    font-size: 10px;
    top: -3px;
    right: 0;
  }
  .infocontent-photobook .col-content {
    height: auto;
  }
  .rowbutton {
    margin-top: 20px !important;
  }
  .photobook-page .rowbutton .buttonbackground {
    width: 120px;
    height: 35px;
    padding: 0;
    background-color: #d1d1d1;
  }

  .photobook-page .rowbutton .buttonbackground .buttontext {
    font-size: 14px;
  }

  .photobook-page .rowbutton .buttonbackground img {
    width: 16px;
    height: 16px;
  }

  .header-full-view .header-left {
    gap: 25px;
  }
  .pagination {
    font-size: 13px;
    line-height: 21px;
  }
  .book-preview #addPage-btn {
    right: 10px;
    top: 16px;
    font-size: 18px;
  }
  .book-preview {
    padding: 0 30px;
  }
  .book-preview .previous-button {
    font-size: 20px;
    left: 10px;
  }
  .book-preview .next-button {
    font-size: 20px;
    right: 10px;
  }
  .photobook-actions .option {
    padding: 0px 16px;
    font-size: 12px;
    line-height: 30px;
  }
  #photobook-price {
    font-size: 12px;
  }

  .size-selection .size {
    font-size: 12px;
  }
  .topic-wrapper .topic-content .title {
    font-size: 13px;
  }
  .select-topic .sod_select .sod_label {
    font-size: 11px;
  }
  .topic-content .select-topic .sod_option {
    font-size: 11px;
  }

  /* popup */
  #share-photobook {
  }
  #share-photobook .titile-address h2 {
    font-size: 18px;
    margin-bottom: 5px;
  }
  #share-photobook .share-friend h3 {
    font-size: 14px;
  }
  .overlay-share-product .content .share-url-product .url-product {
    font-size: 14px;
  }
  .overlay-share-product .content .share-url-product .copy-url-product {
    font-size: 14px;
    padding: 5px 15px;
  }
  .overlay-share-product .content .share-url-product #message {
    font-size: 14px;
    top: -58px;
  }
  .overlay-share-product .content .share-url-product {
    padding: 10px 20px;
  }

  /* picker */
  .popup-container .popup-content {
    width: 90%;
    height: 90%;
    max-width: 600px;
    max-height: 800px;
    /* top: 0; */
    border-radius: 0;
  }
  .popup-container .popup-content .image-picker {
    border-radius: 10px;
  }

  /*  */
  .time-options {
    display: block;
  }
  .time-options-mobile {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
  }
  .time-options-mobile .left-wrapper {
    display: flex;
    gap: 10px;
  }
  .time-options-mobile .filter-container {
    border: none !important;
  }
  .time-options-mobile .filter-container .form-select {
    padding: 8px;
    /* margin-bottom: 1rem; */
  }
}

/* Left Sidebar Menu Styles */
.left-sidebar-menu {
  width: 20%;
  height: 100%;
  background: #fff;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  padding: 10px;
  /* transition: all 0.3s; */
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.photobook-content.mode-view .left-sidebar-menu {
  display: none;
}

.left-sidebar-menu .sidebar-header {
  margin-bottom: 10px;
  text-align: center;
}

.left-sidebar-menu .btn-custom-primary {
  background: #000;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.left-sidebar-menu .sidebar-content {
  flex: 1;
  overflow-y: auto;
  border-radius: 4px;
  padding: 5px;
  position: relative;
}

.left-sidebar-menu .empty-msg {
  text-align: center;
  color: #999;
  font-size: 13px;
  margin-top: 20px;
  display: block;
}

.sidebar-images-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.sidebar-image-item {
  width: 100%;
  position: relative;
  cursor: grab;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  height: 80px; /* fixed height for thumbnail */
  background: #f9f9f9;
  /* MOBILE SCROLL FIX: allow vertical scrolling while letting interact.js handle dragging via hold */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* prevent default drag of img element to allow jquery ui drag */
}

.sidebar-image-item:active {
  cursor: grabbing;
}

/* Dragging Helper Style */
.ui-draggable-dragging {
  z-index: 9999;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 2px solid #0073aa;
}

/* Updated Layout for 3 Columns */
.full-view {
  display: flex;
  /* height: calc(100% - 88px); */
  gap: 0; /* Remove default gap to control spacing manually */
  padding: 0; /* Full width */
  border-top: 1px solid #ccc;
  position: relative;
}

/* Adjust Book Preview to be the center column */
.book-preview {
  flex: 1; /* Take remaining space */
  width: auto !important; /* Override fixed calculation */
  padding: 0 40px 0 40px; /* Reduced padding */
}

/* Adjust Right Toolbar */
.header-toolbar {
  width: 15%;
  border-left: 1px solid #ccc;
  background: #fff;
  flex-shrink: 0;
}

/* Hide empty msg when content exists */
#sidebar-images-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding-top: 10px;
}
.sidebar-image-item {
  margin-bottom: 0;
}
.sidebar-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1/1;
  border-radius: 4px;
  border: 1px solid #ddd;
}
.sidebar-content.has-images .empty-msg {
  display: none;
}

/* Sidebar Actions Buttons */
.sidebar-actions {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #eee;
}

.btn-sidebar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-sidebar-action:disabled,
#sidebar-add-text-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-sidebar-action i {
  font-size: 16px;
}

/* Responsive Media Query */
@media (max-width: 1440px) {
  .wrapper-book-preview {
    width: calc(100% - 250px - 150px);
    display: flex;
    flex-direction: column;
  }
  .left-sidebar-menu {
    width: 250px;
  }
  .header-toolbar {
    width: 150px;
  }
  .container {
    width: 100%;
  }
  .auto-layout-drawer .drawer-content {
    right: -200px;
    width: 200px;
  }
  .auto-layout-drawer .header h2 {
    font-size: 12px;
  }
  .auto-layout-drawer .header .close-btn {
    font-size: 17px;
  }
}

.photobook-size-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 10;
  font-weight: 500;
}

/* Text Input Drawer */
.text-input-drawer {
  position: fixed;
  left: -250px;
  top: 0;
  width: 250px; /* Match .left-sidebar-menu width */
  height: 100%;
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 10002;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
}

.text-input-drawer.drawer-open {
  left: 0;
}

.text-input-drawer .drawer-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-input-drawer .drawer-header h3 {
  margin: 0;
  font-size: 18px;
}

.text-input-drawer .drawer-header .close-btn {
  cursor: pointer;
  font-size: 20px;
}

.text-input-drawer .drawer-body {
  flex: 1;
  padding: 20px;
}

.text-input-drawer #text-input {
  width: 100%;
  min-height: 150px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  resize: vertical;
}

.text-input-drawer .drawer-footer {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Text Styling Drawer - Horizontal Toolbar */
.text-styling-drawer {
  position: fixed;
  top: -100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  z-index: 10003;
  transition: top 0.3s ease;
  border-bottom: 1px solid #e0e0e0;
}

.text-styling-drawer.drawer-open {
  top: 0;
}

.toolbar-container {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toolbar Select */
.toolbar-select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 140px;
  transition: all 0.2s;
}

.toolbar-select-sm {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: white;
  cursor: pointer;
  min-width: 60px;
}

/* Toolbar Divider */
.toolbar-divider {
  width: 1px;
  height: 24px;
  background: #ddd;
  margin: 0 4px;
}

/* Toolbar Group */
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Toolbar Buttons */
.toolbar-btn {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
}

.toolbar-btn.active {
  background: #e0e7ff;
  border-color: #6366f1;
  color: #6366f1;
}

/* Number Input */
.toolbar-input-number {
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 60px;
  text-align: center;
  font-size: 14px;
}

.toolbar-input-number::-webkit-inner-spin-button,
.toolbar-input-number::-webkit-outer-spin-button {
  opacity: 1;
}

/* Color Button */
.toolbar-color-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.toolbar-color-btn input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.toolbar-color-btn i {
  pointer-events: none;
  font-size: 16px;
}

/* Checkbox */
.toolbar-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.toolbar-checkbox input[type="checkbox"] {
  cursor: pointer;
}

/* Spacer */
.toolbar-spacer {
  flex: 1;
}

/* Remove old drawer styles */
.text-styling-drawer .drawer-header,
.text-styling-drawer .drawer-body,
.text-styling-drawer .drawer-footer,
.text-styling-drawer .style-group {
  display: none;
}

/* Buttons */
.btn-cancel,
.btn-add,
.btn-apply {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-cancel {
  background: #f0f0f0;
  color: #333;
}

.btn-add,
.btn-apply {
  background: #000;
  color: white;
}

/* Moveable Text */
.moveable-text {
  word-wrap: break-word;
  white-space: pre-wrap;
  user-select: none;
}

.moveable-layout .content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* View Mode - Hide Moveable Controls */
.photobook-content.mode-view .moveable-text {
  pointer-events: none;
}

.photobook-content.mode-view .moveable-control-box {
  display: none !important;
}

#flip-book .text-decorate,
#thumb-carousel .text-decoration {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.photobook-content.mode-view .text-delete-btn {
  display: none !important;
}

#flip-book.mode-moveable .text-decorate {
  display: none;
}

#flip-book.mode-moveable .box:not(.text-decor) {
  display: none;
}

/* Image Viewer Popup */
#image-viewer-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-viewer-popup .viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

#image-viewer-popup .viewer-content {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#image-viewer-popup .viewer-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#image-viewer-popup #viewer-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  display: none;
}

#image-viewer-popup .close-viewer {
  position: absolute;
  top: -20px;
  right: -20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  background: rgb(14 14 14 / 22%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#image-viewer-popup .viewer-navigation button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgb(14 14 14 / 22%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#image-viewer-popup .viewer-actions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 1000;
}

#image-viewer-popup .viewer-actions button {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#image-viewer-popup .viewer-actions button:hover {
  background: rgba(0, 0, 0, 0.8);
  border-color: white;
}

#image-viewer-popup #viewer-prev {
  left: 20px;
}
#image-viewer-popup #viewer-next {
  right: 20px;
}

#image-viewer-popup .viewer-actions {
  position: absolute;
  bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
}

#image-viewer-popup .rotate-actions {
  display: flex;
  gap: 10px;
  background: rgb(14 14 14 / 22%);
  padding: 5px 15px;
  border-radius: 100px;
}

#image-viewer-popup #viewer-loading {
  position: absolute;
  font-size: 40px;
  color: white;
}

/* Sidebar Zoom Icon */
.sidebar-image-item .zoom-icon {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@media (hover: hover) {
  .sidebar-image-item:hover .zoom-icon {
    display: flex;
  }

  .sidebar-image-item .zoom-icon:hover {
    background: #fff;
    transform: scale(1.1);
    color: #000;
  }

  #add-box-to-layout:hover {
    background: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .edit-info-btn:hover {
    color: #000;
  }

  .btn-clear-all:hover {
    background-color: #e60000;
  }

  .sidebar-image-item .delete-image-btn:hover {
    background: #ff4d4d;
    color: white;
    transform: scale(1.1);
  }

  .book-preview #addPage-btn:hover {
    font-size: 26px;
  }

  .nav-button:hover {
    color: #333;
  }

  .auto-layout-drawer .layout-pair-item:hover {
    border-color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(-4px);
  }

  .auto-layout-drawer .swap-button:hover {
    background: #f0f0f0;
    border-color: #666;
    transform: scale(1.05);
  }

  .auto-layout-drawer .layout-suggestions-container::-webkit-scrollbar-thumb:hover {
    background: #555;
  }

  .rotateDeviceOverlay .close-rotate-overlay:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }

  .product .artsy-shop-loop-thumbnail:hover .act-like-print {
    justify-content: center;
  }

  .left-sidebar-menu .btn-custom-primary:hover {
    background: #333;
  }

  .btn-sidebar-action:hover:not(:disabled) {
    background-color: #333;
    transform: translateY(-1px);
  }

  .toolbar-select:hover {
    border-color: #999;
  }

  .toolbar-btn:hover {
    background: #f5f5f5;
    border-color: #999;
  }

  .toolbar-color-btn:hover {
    background: #f5f5f5;
    border-color: #999;
  }

  .toolbar-checkbox:hover {
    background: #f5f5f5;
  }

  .btn-cancel:hover {
    background: #e0e0e0;
  }

  .btn-add:hover,
  .btn-apply:hover {
    background: #333;
  }

  #image-viewer-popup .close-viewer:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
  }

  #image-viewer-popup .viewer-navigation button:hover {
    background: rgba(255, 255, 255, 0.3);
  }

  #image-viewer-popup .viewer-actions button:hover {
    transform: scale(1.2);
  }

  @media (max-width: 991px), (max-height: 600px) {
    .responsive-left-nav .nav-item:hover {
      background: #444;
      color: #fff;
    }

    .panel-setting .panel-setting-actions .option:hover {
      background: #333;
    }

    .book-preview #addPage-btn:hover {
      font-size: 18px;
    }
  }
}

@media (hover: none) {
  .sidebar-image-item .zoom-icon {
    display: flex;
  }
}

.panel-setting, .panel-setting.active-panel{
  display: none;
}

.text-panel, .text-panel.active-panel{
  display: none;
}

.responsive-left-nav{
  display: none;
}

.delete-page-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  color: #ff4d4d;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
  z-index: 10;
  display: none;
}

/* Responsive Layout Photobook */
@media (max-width: 991px), (max-height: 600px) {

  .photobook-content #viewer-fullscreen {
    margin-top: 0;
  }

  .step2-container {
    flex-direction: column;
  }
  
  .header-full-view {
    display: none; /* Hide original header */
  }
  .header-full-view-mobile {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow-y: auto;
      background: #fff;
  }
  .header-full-view-mobile .header-left {
      display: flex;
      flex-direction: column;
      gap: 15px;
      padding: 15px;
  }
  
  .header-full-view-mobile .photobook-info {
      padding: 15px;
      max-width: 100%;
  }

  .full-view {
    flex-direction: row;
    height: 100%;
    padding: 0;
  }

  .responsive-left-nav {
    display: flex;
    flex-direction: column;
    width: 60px;
    background: #222;
    color: white;
    z-index: 10002;
    overflow-y: auto;
  }

  .responsive-left-nav .nav-item.sticky-nav-item {
    position: sticky;
    top: 0;
    background: #222;
    z-index: 10;
    border-bottom: 1px solid #444;
  }

  .responsive-left-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    font-size: 11px;
    transition: background 0.3s;
    color: #aaa;
  }
  
  .responsive-left-nav .nav-item i {
      font-size: 20px;
      margin-bottom: 5px;
  }

  .responsive-left-nav .nav-item.active {
    background: #444;
    color: #fff;
  }

  /* Shared styles for panels */
  .left-sidebar-menu,
  .header-toolbar,
  .header-full-view-mobile {
    display: none;
    position: relative; /* Changed from absolute */
    width: 240px;
    background: #fff;
    z-index: 5;
    border-right: 1px solid #ccc;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    left: 0; /* Reset left */
    flex-shrink: 0; /* Prevent panel from shrinking */
    order: 2;
  }

  /* For header toolbar specially, make it flex col like the original but constrain width */
  .header-toolbar.active-panel {
    display: flex;
    flex-direction: column;
  }

   .photobook-content:not(.mode-view) .left-sidebar-menu.active-panel {
      display: flex;
  }
  
  .photobook-content:not(.mode-view) .header-full-view-mobile.active-panel {
      display: flex ;
  }

  .wrapper-book-preview {
    flex: 1; /* Let it fill the remaining space flexibly */
    width: auto ; /* Reset calculated width */
    margin-left: 0; /* Removing the 60px margin, flex layout handles it */
  }
  
  .book-preview {
      padding: 0 20px;
  }
  
  /* Make sure topic wrapper and layout option can scroll or fit left panel */
  .header-toolbar .topic-wrapper {
      width: 100%;
      padding: 5px;
      flex-direction: column;
  }
  

  .header-toolbar .layout-toolbar {
      width: 100%;
  }
  
  .header-toolbar #add-box-to-layout {
      width: 90%;
      margin: 10px auto;
  }
  
  .layout-options .nodata {
      width: 100%;
  }

  /* Overrides for animation and left-side panels */
  .responsive-left-nav {
    order: 1;
  }
  
  .header-toolbar.active-panel {
    flex-direction: column;
  }
  
  .wrapper-book-preview {
    order: 3;
    overflow: hidden;
  }

  /* Mobile Panels (standalone) */
  .mobile-panel {
    display: none;
    position: relative;
    width: 240px;
    overflow: hidden;
    background: #fff;
    z-index: 5;
    border-right: none;
    box-shadow: none;
    flex-shrink: 0;
    flex-direction: column;
    transition: width 0.3s ease-in-out, border-right 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    order: 2;
  }

  .mobile-panel.active-panel {
    display: flex;
    border-right: 1px solid #ccc;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
  }

  /* Photo panel specifics */
  .panel-photo {
    gap: 0;
  }

  .panel-photo .sidebar-header {
    padding: 12px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
  }

  .panel-photo .sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
  }

  .panel-photo .sidebar-actions {
    padding: 8px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
  }

  /* Layout panel specifics */
  .panel-layout .topic-wrapper {
    width: 100%;
    padding: 10px;
    flex-direction: column;
  }

  .panel-layout .layout-toolbar {
    flex: 1;
    width: 100%;
    overflow: hidden;
    flex-direction: column;
  }

  .panel-layout .layout-options {
    width: 100%;
  }

  .panel-layout .js-add-box-to-layout {
    width: 90%;
    margin: 8px auto;
  }

  /* Setting panel specifics */
  .panel-setting {
    gap: 0;
  }

  .panel-setting .panel-setting-info {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 10;
    position: sticky;
  }

  .panel-setting .panel-setting-info .title {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
  }

  .panel-setting .panel-setting-info .sub-title {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    padding: 0;
  }

  .panel-setting .panel-setting-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 10px 5px;
  }

  .panel-setting .panel-setting-actions .option {
    text-align: center;
    padding: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    background: #000;
    color: #fff;
    line-height: 1.4;
    transition: background 0.2s;
  }

  .panel-setting .panel-setting-actions .option.hidden {
    display: none;
  }

  .panel-setting .panel-setting-price {
    padding: 5px 7px;
    border-top: 1px solid #eee;
    font-size: 11px;
    flex-shrink: 0;
  }

  .panel-setting #expireMessageMobile {
    padding: 7px;
    border-top: 1px solid #eee;
    font-size: 11px;
    font-weight: 700;
  }

  .left-sidebar-menu {
    padding: 5px;
  }

  .left-sidebar-menu .sidebar-add-text-btn {
    display: none;
  }

  #sidebar-images-list{
    padding-top: 0;
  }

  .group-btn-select-photos {
    margin-top: 0;
  }
  .left-sidebar-menu .sidebar-content {
    padding-top: 0;
  }
  .sidebar-actions{
    padding: 5px;
    flex-direction: row;
  }

  .btn-sidebar-action{
    font-size: 12px;
    padding: 5px;
  }

  .auto-layout-drawer .drawer-content{
    right: unset;
    left: -300px;
    transition: left 0.3s ease-in-out;
    width: 240px;
  }

  .auto-layout-drawer.show .drawer-content{
    right: unset;
    left: 60px;
  }

  .header-toolbar{
    padding: 0;
    gap: 0;
  }

  .layout-toolbar .custom-arrow{
    display: none;
  }
  
  .layout-options{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 5px;
    overflow-x: hidden;
  }
  .layout-option .option{
    margin: 0;
  }
  .text-styling-drawer{
    width: 240px;
    left: 60px;
    height: 100%;
    overflow-y: auto;
  }
  .book-preview-content{
    justify-content: end;
  }
  .panel-setting .edit-info-tooltip{
    left: -5px;
    padding: 0 10px 10px 10px;
    width: 230px;
    margin-top: 5px;
    min-width: unset;
  }
  .edit-info-tooltip .tooltip-header h6{
    font-size: 14px;
  }
  .edit-info-tooltip .tooltip-body .form-group label{
    font-size: 12px;
  }
  .edit-info-tooltip .tooltip-body .form-group input, .edit-info-tooltip .tooltip-body .form-group textarea{
    font-size: 16px;
  }
  .photobook-content.mode-view .responsive-left-nav .nav-item[data-target="photo-panel"],.photobook-content.mode-view .responsive-left-nav .nav-item[data-target="layout-panel"],.photobook-content.mode-view .responsive-left-nav .nav-item[data-target="text-panel"] {
  display: none;
  }
  .edit-info-tooltip .btn-cancel, .edit-info-tooltip .btn-confirm{
    font-size: 12px;
  }
  .comment-product{
    height: auto;
  }
  .toolbar-container{
    padding: 8px;
  }
  .book-preview .next-button,.book-preview .previous-button{
    width: 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .book-preview .next-button{
    right: 0;
  }
  .book-preview .previous-button{
    left: 0;
  }

  .book-preview #addPage-btn{
    right: 2px;
    top: 14px;
  }

  .photobook-content .book-action-fast-mobile {
    display: flex;
    justify-content: end;
  }

  .fetch-progress-notify{
    top: unset !important;
    bottom: 20px;
  }
}

@media (max-height: 600px) {
  .delete-page-btn.active {
    display: block;
  }
  .photobook-content.mode-view .delete-page-btn {
    display: none;
  }
  .photobook-content #viewer-zoom {
    margin-top: 0;
  }
  .photobook-content .toggle-thumbnail-btn {
    display: none;
  }
}


@media (max-height: 305px) {
  .edit-info-tooltip {
    height: calc(100vh - 37px);
    overflow-y: auto;
  }
}

/* Utils */
.disable-selection, .disable-selection * { 
  user-select: none ; 
  -webkit-user-select: none ; 
}

/* Text Panel Styles */
.text-panel-header {
  justify-content: flex-start;
  border-bottom: 1px solid #eee;
}

.text-panel-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 25px;
  padding: 0 0 5px 5px;
  text-align: start;
}

.text-panel-content {
  padding: 15px;
}

.text-panel-input {
  width: 100%;
  min-height: 100px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  resize: vertical;
  margin-bottom: 15px;
  font-size: 16px;
}

.text-panel-btn {
  width: 100%;
  justify-content: center;
}

/* Coming Soon Print Button */
.option.print-btn.coming-soon-btn {
  background-color: #d1d1d1 !important;
  color: #7b7b7b !important;
  pointer-events: none;
  position: relative;
  cursor: default;
}

.option.print-btn.coming-soon-btn .badge-coming-soon {
  position: absolute;
  top: -6px;
  right: -11px;
  background-color: #2b78d6;
  color: white;
  font-size: 8px;
  padding: 3px 6px;
  border-radius: 12px;
  white-space: nowrap;
  line-height: normal;
  font-weight: 600;
  pointer-events: none;
}

/* Fetch Progress Notification */
.fetch-progress-notify {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  background: rgb(175 211 210 / 90%);
  backdrop-filter: blur(10px);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 220px;
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fetch-progress-notify.inactive {
  opacity: 0;
  transform: translateX(400px);
}

.fetch-progress-notify .progress-content {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #333;
  font-weight: 500;
  font-size: 14px;
}

.fetch-progress-notify i {
  font-size: 18px;
  color: #007bff;
}

.fetch-progress-notify.success {
  background: rgba(40, 167, 69, 0.9);
}

.fetch-progress-notify.success .progress-content {
  color: #fff;
}

.fetch-progress-notify.success i {
  color: #fff;
}

/* ── Footer branding ──────────────────────────────── */
.wrapper-botton-content-book {
    text-align: center;
    padding: 15px;
    font-size: 0.7rem;
    color: rgba(0, 0, 0, 0.45);
    /* text in nghiêng */
    font-style: italic;
    /* background-color: #FFFFFF; */
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 10000;
}

.wrapper-botton-content-book a {
    color: rgba(0, 0, 0, 0.75);
    text-decoration: none;
}

.wrapper-botton-content-book a:hover {
    color: rgba(0, 0, 0, 0.9);
}

/* Ngăn bôi xanh (highlight) và kéo thả ảnh mặc định của trình duyệt */
.book-preview-content img,
.book-preview-content-inner img,
#flip-book img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Thiết lập cursor khi đang ở chế độ zoom (có class .zoom trên body) */
body.zoom .book-preview-content img,body.zoom .book-preview-content {
  cursor: grab !important;
}

/* Scoped fullscreen fixes for the standalone Photobook View page
   Targets only pages using the `photobook-view.php` template
   (wrapper has class `photobook-view-only`) so it doesn't affect
   the original photobook template. */
   /* VIEW ONLY FULLSCREEN */
#artsy-shop.photobook-view-only .full-view {
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  border-top: 0 !important;
}

/* nếu có admin bar */
body.admin-bar #artsy-shop.photobook-view-only .full-view {
  height: calc(100vh - 32px) !important;
  min-height: calc(100vh - 32px) !important;
}

#artsy-shop.photobook-view-only .wrapper-book-preview {
  width: 100% !important;
  height: 100% !important;
}

#artsy-shop.photobook-view-only .photobook-content.mode-view #viewer-fullscreen {
  display: none !important;
}

#artsy-shop.photobook-view-only .photobook-content.mode-view .wrapper-book-preview {
  height: 100vh !important;
}
#artsy-shop.photobook-view-only button:focus,
#artsy-shop.photobook-view-only button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
#artsy-shop.photobook-view-only .next-button,
#artsy-shop.photobook-view-only .previous-button,
#artsy-shop.photobook-view-only #viewer-fullscreen {
  display: none !important;
}

#artsy-shop.photobook-view-only .wrapper-botton-content-book {
  font-size: 1.1rem;
  top: 0;
  left: 0;
  bottom: auto;
  right: auto;
}