:root {
  --primary: #343F3E;
  --primary-color: #ffffff;
  --primary2: #B15E6C;
  --secondary: #ffffff;
  --secondary-color: #000000;
}
.slice-form {
  padding: 20px;
}
.slice-form, .slice-form *, .slice-form *:before, .slice-form *:after {
  box-sizing: border-box;
}
.slice-form.sl-dragging,
.slice-form.sl-dragging * {
  user-select: none !important;
}
.slice-holder {
  position: relative;
  width: 100%;
  min-height: 200px;
  overflow: hidden;
  transition: opacity 0.5s;
  opacity: 0;
  pointer-events: none;
}
.slice-form.sl-loaded-image .slice-holder {
  opacity: 1;
  pointer-events: auto;
}
.slice-holder .sl-image {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.slice-holder .sl-image .sl-selected-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-image: linear-gradient(45deg, #808080 25%, transparent 25%), linear-gradient(-45deg, #808080 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #808080 75%), linear-gradient(-45deg, transparent 75%, #808080 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}
.slice-holder .sl-image .sl-selected-image > img {
  position: relative;
  width: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  opacity: 0;
}
.slice-holder .sl-image .sl-selected-image > img.sl-image-drag {
  position: absolute;
  left: 0%;
  top: 0%;
  width: 120%;
  height: 120%;
  opacity: 1;
  pointer-events: auto;
  cursor: grab;
}
.slice-form.sl-dragging .slice-holder .sl-image .sl-selected-image > img.sl-image-drag {
  cursor: grabbing;
}
.slice-holder .sl-dummy {
  display: none;
}
.slice-holder .sl-selection {
  position: absolute;
  left: calc(50% - 100px);
  top: calc(50% - 100px);
  z-index: 1;
  width: 40%;
  height: 40%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.slice-holder .sl-selection.sl-show {
  opacity: 1;
  pointer-events: auto;
}
.slice-holder .sl-selection > svg {
  width: 100%;
  height: 100%;
  left: 0%;
  top: 0%;
  position: absolute;
  pointer-events: none;
}
.slice-holder .sl-selection > svg rect {
  stroke: #000000;
  stroke-width: 1;
}
.slice-holder .sl-selection > svg rect.sl-ants {
  stroke: #ffffff;
  stroke-dasharray: 5;
  stroke-dashoffset: 5;
  animation: sl-holder-selection-1 500s infinite linear;
}
@keyframes sl-holder-selection-1 {
  0% { stroke-dashoffset: 5; }
  100% { stroke-dashoffset: -5000; }
}
.slice-holder .sl-selection .sl-grid {
  position: absolute;
  left: 5px;
  top: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  background-image:
    repeating-linear-gradient(rgba(108, 153, 227, 1) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(90deg, rgba(108, 153, 227, 1) 0 1px, transparent 1px 100%);
  background-size: calc(33.33% + 1px) calc(33.33% + 1px);
  background-position: -1px -1px;
  cursor: move;
  background-color: rgba(108, 153, 227, 0.2);
}
.slice-holder .sl-selection .sl-points {
  position: absolute;
  left: 5px;
  top: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  pointer-events: none;
}
.slice-holder .sl-selection .sl-points > svg {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: auto;
}
.slice-holder .sl-selection .sl-points > svg circle:nth-child(1) {
  stroke: #ffffff;
  stroke-width: 1;
  fill: #6C99E3;
}
.slice-holder .sl-selection .sl-points > svg circle:nth-child(2) {
  stroke: #000000;
  stroke-width: 1;
  stroke-dasharray: 3;
  stroke-dashoffset: 3;
  animation: sl-holder-selection-2 500s infinite linear;
}
@keyframes sl-holder-selection-2 {
  0% { stroke-dashoffset: 3; }
  100% { stroke-dashoffset: 5000; }
}
.slice-holder .sl-selection .sl-points > .sl-nw { left: 0%; top: 0%; transform: translateX(-50%) translateY(-50%); cursor: nwse-resize; display: none; }
.slice-holder .sl-selection .sl-points > .sl-n { left: 50%; top: 0%; transform: translateX(-50%) translateY(-50%); cursor: ns-resize; display:none; }
.slice-holder .sl-selection .sl-points > .sl-ne { left: 100%; top: 0%; transform: translateX(-50%) translateY(-50%); cursor: nesw-resize; display: none; }
.slice-holder .sl-selection .sl-points > .sl-e { left: 100%; top: 50%; transform: translateX(-50%) translateY(-50%); cursor: ew-resize; display: none; }
.slice-holder .sl-selection .sl-points > .sl-se { left: 100%; top: 100%; transform: translateX(-50%) translateY(-50%); cursor: nwse-resize; }
.slice-holder .sl-selection .sl-points > .sl-s { left: 50%; top: 100%; transform: translateX(-50%) translateY(-50%); cursor: ns-resize; display: none; }
.slice-holder .sl-selection .sl-points > .sl-sw { left: 0%; top: 100%; transform: translateX(-50%) translateY(-50%); cursor: nesw-resize; display: none; }
.slice-holder .sl-selection .sl-points > .sl-w { left: 0%; top: 50%; transform: translateX(-50%) translateY(-50%); cursor: ew-resize; display: none; }
.slice-holder .sl-top-bar {
  width: 100%;
  padding: 5px;
  display: flex;
  align-items: center;
  column-gap: 10px;
}
.slice-holder .sl-top-bar .sl-title {
  font-size: 1.5em;
  text-transform: uppercase;
  padding-right: 20px;
}
.slice-holder .sl-top-bar .sl-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
}
.slice-holder .sl-top-bar .sl-move {
  display: flex;
  align-items: center;
  gap: 5px;
}
.slice-holder .sl-top-bar .sl-zoom input[type="text"] {
  text-align: center;
  padding: 2px;
  font-size: 0.9em;
}
.slice-holder .sl-top-bar .sl-zoom a.sl-button {
  padding: 0px;
  border-radius: 2px;
  margin-right: 0px;
}
.slice-holder .sl-top-bar a.sl-button {
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slice-holder .sl-top-bar a.sl-button img {
  width: calc(100% - 5px);
  height: calc(100% - 5px);
  display: block;
}
.slice-holder .sl-preview {
  width: 15%;
  margin-top: 10px;
  margin-bottom: 10px;
  margin-left: 10px;
  min-width: 100px;
  border: 2px solid var(--primary2);
}
.slice-holder .sl-preview > canvas {
  width: 100%;
  display: block;
}
.slice-form .sl-section {
  
}
.slice-form .sl-title {
  font-size: 2em;
  font-weight: bold;
  cursor: pointer;
  padding-top: 10px;
  padding-bottom: 10px;
  display: block;
}
.slice-form .sl-content {
  max-height: 0px;
  pointer-events: none;
  transition: max-height 0.5s;
}
.slice-form .sl-content:hover,
.slice-form .sl-content:focus {
  overflow: inherit;
}
.slice-form .sl-content > div {
  padding-top: 20px;
  padding-bottom: 20px;
}
.slice-form .sl-section input[type="radio"] {
  display: none;
}
.slice-form .sl-section input[type="radio"]:checked ~ .sl-content {
  pointer-events: auto;
  max-height: 200vh;
}
.slice-form .sl-buttons {
  padding-top: 20px;
}
.slice-form .sl-buttons .sl-button {
  display: inline-block;
}
.slice-form .sl-button {
  
}
.slice-form .sl-button:hover,
.slice-form .sl-button:focus {
  
}
.slice-form input {
  color: inherit;
  font-size: inherit;
}
.slice-form input.sl-file {
  display: none;
}
.slice-form label.sl-file {
  display: inline-flex;
  min-width: 100px;
  min-height: 100px;
  cursor: pointer;
  border: 3px dashed var(--primary2);
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--secondary-color);
  position: relative;
  border-radius: 10px;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}
.slice-form label.sl-file.sl-filled {
  min-width: auto;
  min-height: auto;
}
.slice-form label.sl-file:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border: 3px dashed var(--primary2);
  border-radius: 8px;
  z-index: -1;
  display: none;
}
.slice-form label.sl-file.sl-filled:before {
  display: none;
}
.slice-form label.sl-file > img {
  display: block;
  left: 0%;
  top: 0%;
  max-height: 100px;
}
.slice-form .sl-row {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
}
.slice-form .sl-row > label {
  display: block;
  min-width: 150px;
}
.slice-form .sl-input-full {
  width: 150px;
}
.slice-form .sl-input-half {
  width: 67px;
}
.slice-form select,
.slice-form input[type="text"],
.slice-form input[type="number"] {
  border: 1px solid var(--primary);
  outline: none;
  padding: 5px;
  transition: border 0.4s;
}
.slice-form select:focus,
.slice-form select:hover,
.slice-form input[type="text"]:focus,
.slice-form input[type="text"]:hover,
.slice-form input[type="number"]:focus,
.slice-form input[type="number"]:hover {
  border: 1px solid var(--primary2);
}
.slice-form::selection,
.slice-form *::selection {
  /* background-color: var(--primary2); */
  /* color: var(--primary-color); */
}
.slice-form input:read-only {
  opacity: 0.5;
}
.slice-form .sl-button.sl-inactive {
  opacity: 0.5;
  pointer-events: none;
}
.slice-form.sl-has-image .sl-image-error {
  display: none;
}
/* preview */
.slice-form .sl-tile-preview {
  width: 100%;
  margin-bottom: 20px;
}
.slice-form .sl-tile-preview-size {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.slice-form .sl-tile-preview .sl-tile-row {
  width: 100%;
  max-width: 100%;
  display: none;
  position: relative;
}
.slice-form .sl-tile-preview .sl-tile-row:hover,
.slice-form .sl-tile-preview .sl-tile-row:focus {
  z-index: 1;
}
.slice-form .sl-tile-preview .sl-tile-row.sl-visible {
  display: flex;
}
.slice-form .sl-tile-preview .sl-tile {
  flex-grow: 100;
  display: none;
  margin: 1px;
  margin-left: 0px;
  margin-top: 0px;
  cursor: pointer;
  transition: box-shadow 0.3s;
  position: relative;
  perspective: 700px;
}
.slice-form .sl-tile, .slice-form .sl-tile * {
  transform-style: preserve-3d;
}
.slice-form .sl-tile-preview .sl-tile:hover,
.slice-form .sl-tile-preview .sl-tile:focus {
  z-index: 1;
}
.slice-form .sl-tile-preview .sl-tile.sl-visible:last-child {
  margin-right: 0px;
}
.slice-form .sl-tile-preview .sl-tile-row.sl-visible:last-child .sl-tile {
  margin-bottom: 0px;
}
.slice-form .sl-tile-preview .sl-tile.sl-visible {
  display: block;
}
.slice-form .sl-tile-preview .sl-tile .sl-tile-size {
  position: relative;
  width: 100%;
  padding-top: 100%;
  transition: transform 0.1s, box-shadow 0.2s;
}
.slice-form .sl-tile-preview .sl-tile:hover .sl-tile-size,
.slice-form .sl-tile-preview .sl-tile:focus .sl-tile-size {
  box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, 0.5);
}
.slice-form .sl-tile-preview .sl-tile canvas {
  position: absolute;
  left: 0%;
  top: 0%;
  width: 100%;
  height: 100%;
}
.slice-form .sl-tile-preview .sl-dummy {
  display: none;
}

/*
  - optional
  - for demo only
  - please remove if not required
*/
body {
  margin: 0px;
  font-size: 14px;
  font-family: Roboto, sans-serif;
  font-weight: 400;
  background-color: var(--secondary);
  color: var(--secondary-color);
}
body, html {
  overflow-x: hidden;
}
form > * {
/*  display: none;*/
}
form > .slice-holder {
  display: block;
}

/* Tab Navigation Styles */
.sl-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.sl-tab-link {
  padding: 12px 15px;
  margin-right: 5px;
  background-color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-radius: 4px;
  user-select: none;
  text-align: center;
}

.sl-tab-link:hover {
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.sl-tab-link.sl-active {
  background-color: #3366cc;
  color: white;
  opacity: 1;
  border-color: #3366cc;
  box-shadow: 0 3px 6px rgba(51,102,204,0.3);
}

.sl-section input[type="radio"]:checked~.sl-title {
  display: none;
}

.sl-columns {
  display: flex;
  column-gap: 20px;
}
.sl-columns .sl-left-column {
  width: 60%;
}
.sl-columns .sl-right-column {
  width: 40%;
  overflow-y: auto;
  box-sizing: border-box;
  overflow-x: hidden;
}


#slider .slice-form .sl-section:has(input[type="radio"]:checked) {
  z-index: 1;
}

#slider .sl-section:has(#sl-section-1) .sl-file {
    background-color: #eee;
}

dialog#dialog {
  border: none;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-width: 500px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

dialog#dialog[showing] {
  opacity: 1;
  transform: scale(1);
}

dialog#dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

dialog#dialog form {
  margin: 0;
}

dialog#dialog form p {
  margin: 0 0 20px 0;
  text-align: center;
  line-height: 1.6;
}

dialog#dialog .button-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

dialog#dialog img {
  max-width: 100%;
  height: auto;
}

@media not all and (min-width: 980px) {
  #slider .slice-form {
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
  }
  #slider .slice-form .sl-columns {
    box-shadow: none;
  }
  #slider .slice-form .sl-columns .sl-left-column {
    height: 313px;
    flex-grow: initial;
    width: 100%;
    min-height: 313px;
  }
  #slider .slice-form .sl-columns .sl-right-column {
    max-height: initial;
    flex-grow: 100;
  }
  #slider .sl-tabs-nav {
    padding-left: 10px;
  }
}

.upload-progress-container {
  width: calc(100% + 40px);
  max-width: 600px;
  height: 24px;
  background-color: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin: 10px -20px;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #5cb85c 0%, #4cae4c 100%);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 12px;
}

#progressText, #sliceProgressText {
  font-size: 16px;
  font-weight: bold;
  color: #343F3E;
  margin-top: 5px;
}