#moblayer:has(> .btn.fullwidth),
#moblayer:has(> .btn.fullwidth) * {
  box-sizing: border-box;
}

#moblayer:has(> .btn.fullwidth) {
  width: 100%;
  padding: 10px;
  /* box-shadow: 0px 0px 30px rgba(0, 0, 0, 0.5); */
  background: inherit;
}

#moblayer:has(> .btn.fullwidth):before {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(0px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 44%, rgba(255, 255, 255, 1) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#moblayer:has(> .btn.fullwidth) .btn.fullwidth {
  margin: 0px;
  display: block;
  max-width: initial;
  position: relative;
}

section#home:has(#margin).single-tile-page>div#margin {
  margin: 0px;
}

#moblayer:has(> .btn.fullwidth)>.btn.fullwidth:before {
  left: 50%;
  margin: 0px;
  transform: translateX(-50%);
}

#moblayer:has(> .btn.fullwidth)>.btn.fullwidth:after {
  transform: translateY(100%);
}

@media screen and (min-width: 980px) {
  #moblayer:has(> .btn.fullwidth) {
    display: none !important;
  }
}

/* single tile page - header */
.single-tile-page>#margin>#view {
  gap: 40px;
  justify-content: center;
}

.single-tile-page>#margin>#view>div {
  display: flex;
  gap: 40px;
  align-items: center;
  width: 100%;
}

.single-tile-page>#margin>#view #item {
  margin: 0px;
  flex-grow: 100;
  flex: initial;
  width: 50%;
}

.single-tile-page>#margin>#view #product {
  width: 50%;
  flex: initial;
  display: flex;
  justify-content: center;
}

.single-tile-page>#margin>#view #item .producttext {
  margin-left: 32px;
}

.single-tile-page>#margin>#view figure {
  margin: 0px;
}

.single-tile-page>#margin>#view figure>a {
  margin-left: 0px;
  margin-right: 0px;
  display: block;
}

.single-tile-page>#margin>#view figure>a img {
  max-width: inherit;
  max-height: inherit;
  width: 100%;
  height: auto;
}

.single-tile-page>#margin>#productgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.single-tile-page>#margin>#productgrid>div {
  width: calc(50% - 20px);
}

.single-tile-page>#margin>#productgrid>div:has(#cadeau) img {
  display: block;
  max-width: initial;
  width: 100%;
}

.single-tile-page>#margin>#view #item .btn.btn-success:has(i.fa-shopping-basket) {
  margin-right: 10px;
}

.return-form-page textarea {
  box-sizing: border-box;
  width: 100%;
}


@media not screen and (min-width: 980px) {
  .single-tile-page>#margin>#view>div>#product {
    width: 40%;
  }

  .single-tile-page>#margin>#view>div>#item {
    width: 60%;
  }

  .single-tile-page>#margin>#view figure>a {
    width: 100%;
    height: auto;
    max-width: initial;
    max-height: initial;
  }

  .single-tile-page>#margin>#view figure>a img {
    width: 100%;
  }

  body:has(#moblayer > .btn.fullwidth) {
    footer {
      padding-bottom: 100px;
    }
  }

  #tabholder #pageholder>#p5.page>.holder>div>#photooptions #kh {
    padding-left: 0px;
    padding-bottom: 5px !important;
    padding-right: 0px;
    margin-right: 0px;
    margin-left: 0px;
  }

  #tabholder #pageholder>#p5.page>.holder>div>#photooptions #kh>img {
    width: 70px;
    max-width: 70px;
  }

  #ai-effects-dropdown {
    margin-top: 0px;
  }

  .ai-effects-help-container {
    display: none;
  }
  
  body:has(.kh-photo) #tabholder #pageholder>#p5.page>.holder>div>#photooptions #kh {
    width: 100%;
    max-width: 500px;
    min-width: auto;
  }
}

@media not screen and (min-width: 768px) {
  .single-tile-page>#margin>#view>div {
    flex-direction: column;
    width: 100%;
  }

  .single-tile-page>#margin>#view>div>#product {
    width: 60%;
  }

  .single-tile-page>#margin>#view>div>#item {
    width: 100%;
  }

  .single-tile-page>#margin>#productgrid>div {
    width: 100%;
  }

  .single-tile-page>#margin>#view #item {
    width: 100%;
  }
}

@media not screen and (min-width: 480px) {
  .single-tile-page>#margin>#view>div>#product {
    width: 100%;
  }
}

@media not screen and (min-width: 430px) {
  .single-tile-page>#margin>#view #item .btn.btn-success:has(i.fa-shopping-basket) {
    color: transparent;
    text-shadow: none;
    letter-spacing: -14px;
    padding: 10px 22px;
  }

  .single-tile-page>#margin>#view #item .btn.btn-success:has(i.fa-shopping-basket) i {
    color: #ffffff;
    text-shadow: 1px 1px rgba(0, 0, 0, .5);
    letter-spacing: normal;
  }
}

@media not screen and (min-width: 350px) {
  .single-tile-page>#margin>#view #item .btn.btn-success:has(i.fa-arrow-right) {
    color: transparent;
    text-shadow: none;
    letter-spacing: -14px;
    padding: 10px 22px;
  }

  .single-tile-page>#margin>#view #item .btn.btn-success:has(i.fa-arrow-right) i {
    color: #ffffff;
    text-shadow: 1px 1px rgba(0, 0, 0, .5);
    letter-spacing: normal;
  }
}

/* Shipping & Delivery Page Styles */
.shipping-page #verzendtabel {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  table-layout: fixed;
}

.shipping-page #verzendtabel td,
.shipping-page #verzendtabel th {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

.shipping-page #verzendtabel tr:first-child {
  background-color: var(--light-color);
  font-weight: bold;
}

.shipping-page #verzendtabel tr {
  transition: background-color var(--transition-duration) ease, color var(--transition-duration) ease;
}

.shipping-page #verzendtabel tr:hover {
  background-color: #f7f7f7;
}

/* Responsive styles for shipping tables */
@media not screen and (min-width: 768px) {
  .shipping-page #verzendtabel {
    display: block;
  }

  .shipping-page #verzendtabel,
  .shipping-page #verzendtabel tbody,
  .shipping-page #verzendtabel tr,
  .shipping-page #verzendtabel td {
    display: block;
    width: 100%;
  }

  .shipping-page #verzendtabel tr:first-child {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .shipping-page #verzendtabel tr {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .shipping-page tr td:first-child {
    background-color: var(--light-color);
  }

  .shipping-page #verzendtabel td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    white-space: normal;
    text-align: right;
    box-sizing: border-box;
    display: flex;
    width: 100%;
  }

  .shipping-page #verzendtabel td:last-child {
    border-bottom: none;
  }

  .shipping-page #verzendtabel td:before {
    width: 45%;
    padding-right: 10px;
    text-align: left;
    font-weight: bold;
    flex-grow: 100;
  }

  .shipping-page #verzendtabel td:before {
    content: attr(data-title);
  }

  /* Grid layout for the tables */
  .shipping-page #verzendtabel:not([width="600"]) tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .shipping-page #verzendtabel:not([width="600"]) tr:first-child {
    display: none;
  }

  .shipping-page #verzendtabel:not([width="600"]) tr {
    width: 100%;
    margin-bottom: 0;
  }

  .shipping-page #verzendtabel:not([width="600"]) tr td:first-child {
    background-color: var(--light-color);
  }
}

@media not screen and (min-width: 600px) {
  .shipping-page #verzendtabel:not([width="600"]) tbody {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media not screen and (min-width: 480px) {
  .shipping-page #verzendtabel:not([width="600"]) tbody {
    grid-template-columns: repeat(1, 1fr);
  }
}

/* temporary */
#productgrid {
  /* display: none; */
}

#checkout:has(#paymentoptions:checked) #sum {
  max-height: initial;
  overflow: initial;
}

#checkout:not(:has(#paymentoptions:checked)) ul#methods li.sel label span {
  width: calc(100% - 115px);
}

#checkout #sum>div.zig-zag-top>#korting>div {
    display: flex;
    width: 100%;
    column-gap: calc(var(--left-padding) * 0.5);
    align-items: flex-end;
    text-align: left;
    margin-bottom: 0px;
    position: relative;
}

#checkout #sum>div.zig-zag-top>#korting>div:not(:last-child) {
  margin-bottom: var(--row-gap);
}

/* # ontwerp - preview-mode - starts */
body #pageholder > div:not(#previewpage) {
  transition: height var(--transition-duration) ease, flex-grow var(--transition-duration) ease;
}

#tabholder #pageholder #previewpage>label {
  /* transition: max-width var(--transition-duration) ease; */
}

@media not screen and (min-width: 480px) {
  #tabholder #pageholder .holder>.navbut {
    width: calc(100% - 5px);
  }
  
  body.preview-mode #pageholder > div:not(#previewpage) {
    height: 0px !important;
    flex-grow: 0 !important;
    overflow: hidden;
  }

  body.preview-mode #pageholder > #previewpage {
    flex-grow: 100 !important;
  }

  body.preview-mode #tabholder #pageholder #previewpage>label {
    max-width: 100%;
    align-items: center;
  }
}
/* # ontwerp - preview-mode - ends */

.rate-limit-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
  margin-right: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.rate-limit-display.high {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
}

.rate-limit-display.medium {
  background: linear-gradient(135deg, #FF9800 0%, #f57c00 100%);
  color: white;
}

.rate-limit-display.low {
  background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

.rate-limit-icon {
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.rate-limit-text {
  letter-spacing: 0.5px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.effects-dropdown {
  width: 100%;
  margin-bottom: 0px;
  position: relative;
  clear: both;
}

.effects-dropdown .dropdown-selected {
  display: flex;
  align-items: center;
  padding: 5px;
  background-color: #fff;
  border: 2px solid #cacaca;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s ease, border-radius 0.3s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  min-height: 60px;
  max-height: 60px;
  box-sizing: border-box;
}

.effects-dropdown .dropdown-selected:hover {
  border-color: #275CAB;
}

.effects-dropdown .dropdown-selected.open {
  border-color: #275CAB;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.effects-dropdown .dropdown-selected.open.show-upward {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.effects-dropdown .effect-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border: 1px solid #e0e0e0;
  margin-right: 12px;
  flex-shrink: 0;
}

.effects-dropdown .effect-name {
  flex: 1;
  font-size: 14px;
  color: #333;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.effects-dropdown .dropdown-arrow {
  margin-left: 10px;
  color: #666;
  font-size: 12px;
  transition: transform 0.3s ease, color 0.2s ease;
}

.effects-dropdown .dropdown-selected.open .dropdown-arrow {
  transform: rotate(180deg);
  color: #275CAB;
}

.effects-dropdown .dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #fff;
  border: 2px solid #275CAB;
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  max-height: 0;
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, max-height 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.effects-dropdown .dropdown-list.show-upward {
  top: auto;
  bottom: 100%;
  border-top: 2px solid #275CAB;
  border-bottom: none;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.effects-dropdown .dropdown-list.open {
  opacity: 1;
  visibility: visible;
  max-height: 300px;
  overflow-y: auto;
}

.effects-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f0f0f0;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  min-height: 60px;
  box-sizing: border-box;
}

.effects-dropdown .dropdown-item:last-child {
  border-bottom: none;
}

.effects-dropdown .dropdown-item:hover {
  background-color: #f5f5f5;
}

.effects-dropdown .dropdown-item.selected {
  background-color: #e8f0fe;
  transform: none !important;
  transform-style: flat !important;
}

.effects-dropdown .dropdown-item.selected::after {
  content: none !important;
  display: none !important;
}

.effects-dropdown .dropdown-item.cached {
  background-color: #e8f5e9;
}

.effects-dropdown .dropdown-item.cached:hover {
  background-color: #c8e6c9;
}

.effects-dropdown .dropdown-item.selected.cached {
  background-color: #d4edda;
}

#tabholder #pageholder>#p5.page>.holder>div>#photooptions #kh {
  padding-bottom: 0px;
}

#photooptions.cropbox-visible #ai-effects-dropdown {
  display: none;
}

@media (max-width: 980px) {
  #ai-effects-dropdown .effect-thumbnail {
    width: 40px;
    height: 40px;
  }
  
  #ai-effects-dropdown .effect-name {
    font-size: 13px;
  }
}

.upload-progress-container {
  width: 100%;
  max-width: 400px;
  margin: 20px auto 0;
}

.upload-progress-bar {
  width: 100%;
  height: 30px;
  background-color: #f0f0f0;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  border-radius: 15px;
  transition: width 0.3s ease;
  width: 0%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: #333;
  line-height: 30px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.upload-progress-fill .upload-progress-text {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body:has(#cropbox img#canvasOverlay) #prevbox > img {
  pointer-events: none;
}

#cropbox img#canvasOverlay {
  max-width: initial !important;
  max-height: initial !important;
}

#cropbox div:has( > img#canvasOverlay) {
  border: 1px solid black;
}

#cropbox div:has( > img#canvasOverlay) > canvas {
  border: none !important;
}

#prevbox #foto-container {
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:100%;
  overflow:hidden;
  pointer-events:auto;
  z-index: 2;
  background-color: #ffffff;
  cursor: grab;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#prevbox #foto-container:active {
  cursor: grabbing;
}

#preview-zoom-icon {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: rgba(39, 92, 171, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: none;
}

#preview-zoom-icon:hover {
  background: rgba(39, 92, 171, 1);
  /* transform: scale(1.1); */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#preview-zoom-icon i {
  color: white;
  font-size: 20px;
  pointer-events: none;
}

body.preview-mode #preview-zoom-icon i:before {
  content: "\f010";
}

#prevbox #foto-container img,
#prevbox #foto {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
}

body:has(.kh-photo) #tabholder #pageholder>#p5.page>.holder>div>#photooptions #kh {
  width: 100%;
}

body:has(.kh-photo) #kh {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  width: 100%;
  overflow: hidden !important;
}

body:has(.kh-photo) #kh > div {
  position: relative;
  overflow: hidden;
  line-height: 0;
  border: var(--selection-border-size) solid var(--border-color);
  box-sizing: border-box;
  cursor: pointer;
  transition: border var(--transition-duration), transform calc(var(--transition-duration) * 2);
  flex: 1;
  aspect-ratio: 1;
  min-width: 0;
  min-height: initial;
}

body:has(.kh-photo) #kh > div.selected {
  border: var(--selection-border-size) solid var(--primary-color);
  transform: rotateY(360deg);
}

body:has(.kh-photo) #kh .kh-frame {
  position: relative;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: none;
}

body:has(.kh-photo) #kh .kh-photo {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

#tabholder #pageholder #previewpage #prevbox>img:not(#shadowlayer) {
  z-index: 3;
}

@media not screen and (min-width: 980px) {
  body:has(.kh-photo) #kh > div {
    flex: 1;
    aspect-ratio: 1;
    min-width: 0;
  }

  body:has(.kh-photo) #kh .kh-frame {
    width: 100%;
    height: 100%;
  }

  #tabholder #pageholder #previewpage>label {
    max-width: calc(100dvh - 590px);
  }

  body .transparency-controls .btn-danger {
    display: block;
  }

  #actions > div:has( > .btn-danger):not(.transparency-controls) {
    display: none;
  }
}

#pageholder #photooptions #actionEdit {
  display: none !important;
}

#pageholder #cropex {
  display: none;
}

#pageholder .zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  width: 100%;
}

#pageholder .zoom-controls label {
  white-space: nowrap;
}

#pageholder .zoom-controls .slider-wrapper {
  flex: 1;
  min-width: 72px;
}

#pageholder .zoom-controls .slider-wrapper input[type="range"] {
  width: 100%;
  max-width: 250px;
}

#pageholder .movement-buttons {
  display: flex;
  gap: 5px;
  align-items: center;
}

.movement-buttons > button {
  display: inline-block;
  width: 25px;
  height: 25px;
  margin: 0px;
  padding: 0px;
  cursor: pointer;
  font-size: 1em;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pageholder .transparency-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  width: 100%;
}

#pageholder .transparency-controls label {
  white-space: nowrap;
}

#pageholder .transparency-controls .slider-wrapper {
  flex: 1;
  min-width: 100px;
}

#pageholder .transparency-controls .slider-wrapper input[type="range"] {
  width: 100%;
  max-width: 250px;
}

#pageholder .transparency-controls .contrast-group {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

@media not screen and (min-width: 980px) {
  #pageholder .transparency-controls > label {
    display: none;
  }
}

#ontwerpForm #tabholder #pageholder #photooptions #actions {
  row-gap: var(--vertical-gap);
}

#tabholder #pageholder #previewpage {
  --width: min(50%, calc(100dvh - 120px - 50px - var(--margin-below-header) - 5px - var(--vertical-gap) - (var(--left-padding) * 2) - 45px));
}

#footnoteval {
  width: 60px;
}

#tabholder #p2 .holder>div:has(select) {
  gap: 10px;
}

body.iframe-mode #zoeken {
  padding: 0px;
}

#zoeken form input[type="submit"] {
  line-height: 2;
}

.rotation-dial-container {
    display: inline-block;
    margin: 0 0px;
}

.rotation-dial {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: grab;
    user-select: none;
}

.rotation-dial.dragging {
    cursor: grabbing;
}

body.rotation-active,
body.rotation-active * {
    cursor: grabbing !important;
}

.dial-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dial-track {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 4;
}

.dial-progress {
    fill: none;
    stroke: #4CAF50;
    stroke-width: 4;
    stroke-dasharray: 251.2;
    stroke-dashoffset: 251.2;
}

.dial-handle {
    fill: #4CAF50;
    cursor: grab;
    transition: r 0.2s ease;
}

.dial-handle:hover {
    r: 6;
}

.dial-handle:active {
    cursor: grabbing;
}

.dial-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 9px;
    font-weight: bold;
    color: #333;
    pointer-events: none;
}

select.tile-size {
    max-width: 90px;
}

#tiles-total-line > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media not screen and (min-width: 980px) {
  form#ontwerpForm {
    padding-left: 0px;
    padding-bottom: 0px !important;
    padding-right: 0px;
    box-sizing: border-box;
  }

  form#ontwerpForm #tabholder > div:nth-child(1) {
    padding-right: 0px;
    width: 100%;
    margin-left: 0px;
    margin-right: 0px;
    padding-left: 10px;
    box-sizing: border-box;
  }

  #tabholder .holder #oh {
    box-sizing: border-box;
    margin-right: 0px;
    width: 100%;
    margin-left: 0px;
    padding-left: 0px;
  }

  #tabholder:before {
    box-shadow: none;
  }

  body {
    --vertical-gap: 7.5px;
  }

  #tabholder #pageholder {
    padding-bottom: 10px;
  }

  #preview-zoom-icon {
    display: flex;
  }

  select.tile-size {
    padding: 5px 2px;
    max-width: 80px;
  }

  #checkout #basketpage .row.orderitem>div>div:has(input) input[type="number"] {
    padding: 10px 0px;
  }
}

.transparency-controls .btn-danger {
  display: none;
}

@media (max-height: 720px) and (max-width: 540px) {
  #tabholder #pageholder #previewpage>label {
      max-width: calc(100dvh - 440px);
  }

  .effects-dropdown .dropdown-selected {
    min-height: 55px;
    max-height: 55px;
  }

  .transparency-controls .btn-danger {
    display: block;
  }

  #actions > div:has( > .btn-danger):not(.transparency-controls) {
    display: none;
  }
}

@media (max-height: 600px) and (max-width: 1024px) {
  .transparency-controls .btn-danger {
    display: block;
  }

  #actions > div:has( > .btn-danger):not(.transparency-controls) {
    display: none;
  }

  .ai-effects-help-container {
    display: none;
  }
}

.tableau-grid {
  perspective: 700px;
}

.tableau-tile-wrap {
  position: relative;
  perspective: 700px;
  cursor: pointer;
}

.tableau-tile-wrap,
.tableau-tile-wrap * {
  transform-style: preserve-3d;
}

.tableau-tile {
  transition: transform 0.1s, box-shadow 0.2s;
  display: block;
}

.tableau-tile-wrap:hover .tableau-tile {
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
}

#previewpage .echtetegel {
  border: none !important;
}

@media not screen and (min-width: 480px) {
  #tabholder #pageholder #previewpage>label {
    max-width: calc(100dvh - 475px);
  }

  .transparency-controls .btn-danger {
    display: block;
  }

  #actions > div:has( > .btn-danger):not(.transparency-controls) {
    display: none;
  }
}

@media (max-width: 365px) {
  .zoom-controls label[for="scale"] {
    display: none;
  }
  #pageholder .transparency-controls .slider-wrapper input[type="range"] {
    max-width: 75px;
  }
  #pageholder .transparency-controls .slider-wrapper {
    min-width: 75px;
  }
}

#checkout #basketpage .row.orderitem a:has(img)>img {
  box-sizing: border-box;
}

#checkout #basketpage .row.orderitem .tableau-wrapper {
  position: relative;
  display: inline-block;
}

#checkout #basketpage .row.orderitem .tableau-container {
  position: relative;
  width: 60px;
  height: 60px;
}

#checkout #basketpage .row.orderitem .tableau-img {
  display: block;
  border: none;
  display: block;
  border: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);
}

#checkout #basketpage .row.orderitem .tableau-grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#checkout #basketpage .row.orderitem .tableau-grid {
  display: grid;
  column-gap: 1px;
}

#checkout #basketpage .row.orderitem .tableau-tile-link {
  margin: 0;
  padding: 0;
  line-height: 0;
}

#checkout #basketpage .row.orderitem .tableau-tile-img {
  display: block;
  margin: 0;
  padding: 0;
}

@media (min-width: 980px) {
  #checkout #basketpage .row.orderitem:nth-child(even) {
      margin-right: initial;
  }
  #checkout #basketpage .row.orderitem:nth-child(odd) {
    margin-left: initial;
  }
  #checkout #basketpage .row.orderitem {
    width: calc(100% - 20px);
    box-sizing: initial;
    margin-top: 0px;
  }
}

@media (min-width: 1150px) {
  #checkout #basketpage .row.orderitem:nth-child(even) {
      margin-right: calc(var(--left-padding) * 0.5);
  }
  #checkout #basketpage .row.orderitem {
    width: calc((100% * 0.5) - calc(var(--left-padding) * 0.5));
    box-sizing: border-box;
  }
}

dialog.dialog-auto-height {
  min-height: auto;
}

select.tile-size-tableau {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}