@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&display=swap');

body#desenhos {
  background-color: #4D4D4B;
}

.gallery-item {
  position: relative;
}

.gallery-item img {
  width: 100%;
  display: block;
  mix-blend-mode: multiply;
}

#progress-label-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    width: 140px;
    right: 10px;
    bottom: 60px;
    text-align: center;
}

#progress-label-tooltip:after {

    content: "";
    width: 10px;
    height: 10px;
    position: absolute;
    bottom: -4px;
    right: 10px;
    background: #333;
    transform: rotate(45deg);
}

#progress-label-tooltip.visible {
  opacity: 1;
  pointer-events: auto;
}


#progress-label {
    position: absolute;
    bottom: 20px;
    right: 10px;
    background-color: #000;
    color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border-radius: 100%;
}

#progress-pct {


    position: absolute;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    font-size: 13px;

}

#progress-bar-wrap {

  position: absolute;
  left: 0;
  width: 100%;
  bottom: 0;
}

.gallery-item .preview-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  display: block;
}


.fullscreen-loader {
position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgb(0 0 0 / 95%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: sans-serif;
    font-size: 1.2rem;
    color: #fff;
}


.fullscreen-loader.active {
  display: flex;
}

.loader-spinner {
  border: 6px solid #eee;
  border-top: 6px solid #444;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spinLoader 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spinLoader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


#svg-container {
  position: relative;
}

#svg-overlay svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
    border: 2px dashed #333;
}

#draw-canvas {
  z-index: 2;
  mix-blend-mode: multiply;
  height: 100%;
  width: 100%;
  top: 0 !important;
}
#panzoom-container {
  position: relative;
}

.modal-app {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: white;
  padding: 30px;
  border-radius: 5px;
  max-width: 90%;
  text-align: center;
  position: relative;
}
.modal-content h2 {
  margin-bottom: 10px;
}
.modal-content p {
  margin-bottom: 20px;
}
.modal-content .botao-app {
  background: #a2b80b;
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}
.modal-content button {
  position: absolute;
  top: 10px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  color: #333;
  cursor: pointer;
}

#tituloPostModal {

  color: #FF5722;
}
.menu-toggle-btn {
  background: transparent;
  border: none;
  outline: none;
  margin-left: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 44px;
  z-index: 1201;
}
.menu-toggle-btn img, .menu-toggle-btn svg {
  width: 25px;
  height: 25px;
}

.menu-modal-bg {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgb(0 0 0 / 77%);
  justify-content: center; align-items: center;
  animation: fadeIn .25s;
}
.menu-modal-bg.active { display: flex; }

.menu-modal-box {
    background: #a2b80b;
    border-radius: 10px;
    padding: 36px 26px 28px 26px;
    min-width: 320px;
    max-width: 95vw;
    box-shadow: 0 8px 36px 0 rgba(50, 50, 70, .17);
    position: relative;
    animation: modalIn .28s cubic-bezier(.22,1,.36,1);
    font-family: inherit;
}
.menu-modal-close {
position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    background-color: purple;
    border-radius: 100%;
    color: #fff;
    display: flex
;
    align-items: center;
    justify-content: center;
}
.menu-modal-close img, .menu-modal-close svg {
  width: 28px; height: 28px;
  opacity: .7; transition: opacity .15s;
}

.menu-modal-close svg {

  width: 22px;
  height: 22px;
}
.menu-modal-close:hover img,
.menu-modal-close:focus img { opacity: 1; }

.menu-modal-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.menu-modal-list li {
    font-size: 1.22rem;
    font-weight: 500;
    color: #222;
    transition: color .15s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-modal-list li a {
    color: #fff;
    text-decoration: none;
    background-color: purple;
    border-radius: 8px;
    padding: 5px;
    text-transform: uppercase;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 12px;
}
.menu-modal-list li:hover a { color: #a2b80b }

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes modalIn {
  from { transform: translateY(-32px) scale(.96); opacity: 0;}
  to { transform: translateY(0) scale(1); opacity: 1;}
}

.items-gallery {
  display: flex;
  padding: 10px;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 2;
    position: relative;
}

.copyright {

  text-align: center;
    display: inline-block;
    width: 100%;
    margin-top: 10px;
}

.loading-item {

    position: absolute;
    left: 0;
    top: 0;
    z-index: 9999999999;
    height: 100%;
    inset: 0;
    background-color: #fff;
    justify-content: center;
    align-items: center;
    display: flex;
    width: 100%;

}

.loading-item svg {

  width: 50px;
  height: 50px;
}

.gallery-item {
    cursor: pointer;
    border: 2px solid #ddd;
    padding: 5px;
    border-radius: 8px;
    background: white;
    transition: transform 0.2s ease;
    width: 115px;
    height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.gallery-item.edited:after {

  background-color: #1717177a;
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  content: "";
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  height: auto;
  display: block;
}

#svg-editor {
  display: none;
  background: #eeeeee url("../src/images/repeat.png");
  border-bottom: 2px solid #eee;
  position: relative;
  width: 290px;
  margin: 0 auto;
  padding-top: 110px;
  justify-content: center;
}

.color-swatch.active {
  border: 3px solid #000;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

#svg-container {
  position: relative;
  text-align: center;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 290px;
    margin: 0 auto;
    height: 100%;
}


#svg-container:active {
  cursor: grabbing;
}

.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.custom-modal.active {
  display: flex;
}

.modal-box {
  background: white;
  padding: 25px 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  max-width: 300px;
  width: 90%;
  font-family: sans-serif;
}

#draggable {
  position: fixed;
  z-index: 999;
  touch-action: none; /* importante para evitar travamentos */
}

.drag-btn {
  touch-action: none; /* fundamental para corrigir eventos touch */
  pointer-events: auto;
  user-select: none;
}

.mais-desenhos {
    font-size: 9px;
    text-align: left;
    position: relative;
    text-indent: 5px;
}

.modal-box p {
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

#confirm-clear-yes {
  background-color: #e74c3c;
  color: white;
}

#confirm-clear-no {
  background-color: #bdc3c7;
  color: #333;
}

.label-edited {
  position: absolute;
  bottom: 10px;
  background-color: #ff9800;
  color: #fff;
  padding: 3px 10px;
  font-size: 11px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 9;
  text-transform: uppercase;
}

.label-completed {

  position: absolute;
  bottom: 10px;
  background-color: #4caf50;
  color: #fff;
  padding: 3px 10px;
  font-size: 11px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 9;
  text-transform: uppercase;
}

.label-done {
  position: absolute;
  top: 5px;
  left: 5px;
  background: #00b894;
  color: #fff;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 8px;
  z-index: 5;
  pointer-events: none;
}


.modal-actions button:hover {
  opacity: 0.9;
}


#panzoom-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
}



#panzoom-container svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: auto;
  touch-action: none;
  user-select: none;
  cursor: grab;
  height: 100%;
  width: 100%;
}

#brush-size-label {

  display: none;
}

#toggleDrawMode.active #brush-size-label {

  display: block;
}



.tooltip-sizes {
    background: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    display: none;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
    justify-content: center;
    align-items: center;
}

#toggleDrawMode.active .tooltip-sizes {

  display: flex;
}

.tooltip-sizes.hidden {

  display: none;
}

.size-option {
  border-radius: 50%;
  background: #333;
  opacity: 0.5;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid #333;
}

.size-option:hover,
.size-option.active {
  opacity: 1;
  border-color: #2186d3;
}

.size-option[data-size="4"] {
  width: 4px;
  height: 4px;
}

.size-option[data-size="8"] {
  width: 8px;
  height: 8px;
}

.size-option[data-size="12"] {
  width: 12px;
  height: 12px;
}

.size-option[data-size="16"] {
  width: 16px;
  height: 16px;
}

.size-option[data-size="20"] {
  width: 20px;
  height: 20px;
}

.size-option[data-size="24"] {
  width: 24px;
  height: 24px;
}


.color-swatch.eraser {
  background: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  padding: 2px;
  width: 28px;
  height: 28px;
}

.color-swatch.eraser.active {

  box-shadow: none;
  filter: opacity(0.5);
}

#svg-container svg {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 400px;
  border: 3px dotted #b6b6b6;
}


#svg-container.loading {
  opacity: 0.3;
  pointer-events: none;
}

#svg-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#svg-loader.active {
  display: flex;
  pointer-events: all;
  opacity: 1;
}

#svg-loader .spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #ccc;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#color-picker {
  width: 24px;
  top: -3px;
  position: relative;
}

.color-palette {
  display: grid;
  align-items: center;
  gap: 10px;
  padding: 10px;
  overflow-x: auto;
  background: #f0f0f0;
  border-bottom: 1px solid #ccc;
  grid-template-columns: 30px auto;
}

.color-swatch {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  border-radius: 50%;
  border: 2px solid #333;
  cursor: pointer;
  flex-shrink: 0;
}

.scroll-colors {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 0;
  flex-wrap: nowrap;
}

/* Webkit scroll */
.scroll-colors::-webkit-scrollbar {
  height: 6px;
}
.scroll-colors::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-colors::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.svg-controls {
background: #fff;
    padding: 10px;
    z-index: 10;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 45px;
    border: 1px solid #3333339e;
    box-shadow: 6px 7px 8px #673ab775;
    top: 131px;
}

.svg-controls button {
  border: none;
  background-color: transparent;
  cursor: pointer;
  position: relative;
}

.svg-controls button img {
  width: 30px;
}

body.category .group-controls {

  display: none;
}

.group-controls {
  position: fixed;
  top: 64px;
  z-index: 9;
  left: 0;
  right: 0;
  width: 290px;
  height: 65px;
  margin: 0 auto;
}

#custom-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: #fff;
  padding: 16px 24px;
  border-radius: 10px;
  z-index: 9999;
  font-size: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-width: 90vw;
}

#custom-modal.show {

  display: block;
}

#pulse-indicator {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.6s ease;
}

.title-main-desenhos {
  text-align: center;
}

.lista-desenhos {
  margin-top: 65px;
}

.acf-gallery {
  padding: 40px;
  background: #f5f5f5;
}

.acf-gallery.acf-gallery-top {

  padding-top: 135px;
}

.header-desenhos {
  background-color: #a2b80b;
  padding: 10px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

.header-desenhos .center {

  width: 290px;
}

.items-desenhos {
  display: flex;
  gap: 10px;
  padding: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.loading-page {

    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100dvh;
    background-color: #fff;
    z-index: 99999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.group-loading {

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
}

.loading-page img {

  width: 100px;
}

.items-desenhos .item-desenho {
  padding: 10px;
  border-radius: 5px;
  text-align: center;
  text-decoration: none;
}

.items-desenhos .item-desenho a {
  color: #fff;
  text-decoration: none;
}

.items-desenhos .item-desenho a .thumb img {

  height: auto;
}

.items-desenhos .item-desenho a .titulo {
  margin-top: 5px;
  font-size: 14px;
  width: 100%;
    display: inline-block;
}

.item-gallery {
  width: 100px;
}

.group-header-desenhos {

  display: flex;
  align-items: center;
  justify-content: space-between;
}

#footer-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  color: #fff;
  z-index: 9999;
  transition: bottom 0.3s ease;
  height: 70px;
}

#footer-banner .banner-inner {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 10px;
  box-shadow: -1px -2px 6px 0px #3333338f;
  background-color: #fff;
  text-decoration: none;
  height: 100%;
}

#footer-banner .banner-text {
  display: grid;
  gap: 10px;
  grid-template-columns: 50px auto;
  align-items: center;
}

.group-banner h2 {
  color: #333;
  font-size: 12px;
}

#toggle-banner {
  background: url(../src/images/icon-arrow.svg);
  border: none;
  background-color: #fff;
  font-size: 18px;
  cursor: pointer;
  transform: rotate(0deg);
  position: absolute;
  right: 16px;
  top: -20px;
  width: 30px;
  height: 20px;
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}

#footer-banner.collapsed {
  bottom: -70px;
}

#footer-banner.collapsed #toggle-banner {
  transform: rotate(180deg);
}

#footer-banner .link {
  color: #2162a1;
  font-size: 12px;
}

#footer-banner .group-link {
  display: flex;
  align-items: center;
  gap: 5px;
}

.svg-controls {

  cursor: move;
}

.circle {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
    -webkit-transition: -webkit-transform .4s 0s;
    -moz-transition: -moz-transform .4s 0s;
    transition: transform .4s 0s;
    width: 7px;
    height: 7px;
    border-radius: 100%;
    background-color: #4CAF50;
    display: inline-block;
    position: absolute;
    top: 0px;
    right: 5px;
}

.circle:after {

    -webkit-animation: cd-pulse 2s infinite;
    -moz-animation: cd-pulse 2s infinite;
    animation: cd-pulse 2s infinite;
    -webkit-animation-delay: .5s;
    -moz-animation-delay: .5s;
    animation-delay: .5s;
    position: absolute;
    content: "";
    width: 7px;
    height: 7px;
    left: 0;
    border-radius: 100%;
}

@-webkit-keyframes cd-pulse {
    0% {
        box-shadow: 0 0 0 0 #4CAF50;
    }

    100% {
        box-shadow: 0 0 0 7px transparent;
    }
}

@-moz-keyframes cd-pulse {
    0% {
        box-shadow: 0 0 0 0 #4CAF50;
    }

    100% {
        box-shadow: 0 0 0 7px transparent;
    }
}

@keyframes cd-pulse {
    0% {
        box-shadow: 0 0 0 0 #4CAF50;
    }

    100% {
        box-shadow: 0 0 0 7px transparent;
    }
}

.phone {
  height: 50px;
  width: 100px;
  border: 3px solid #000;
  border-radius: 10px;
  animation: rotate 1.5s ease-in-out infinite alternate;
  /* display: none; */
}

@keyframes rotate {
  0% {
    transform: rotate(0deg)
  }
  50% {
    transform: rotate(-90deg)
  }
  100% {
    transform: rotate(-90deg)
  }
}

#orientation-warning {
position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #a2b80b;
    display: flex;
    align-items: center;
    justify-content: center;
        height: 100dvh;
}
.orientation-warning-box {
  border-radius: 24px;
  max-width: 90vw;
  text-align: center;
  font-size: 1.18rem;
  color: #222;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
}
#orientation-warning b {
  color: #fff;
  border: 1px dashed #fff;
  padding: 0 10px;
}

.orientation-warning-box p {

  color: #000;
  margin-top: 35px;
}

.color-explosion {
  position: absolute;
  pointer-events: none;
  width: 0;
  height: 0;
  z-index: 9999;
}

.explosion-particle {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: red;
  border: 2px solid white;
  box-shadow: 0 0 6px white;
  animation: explode 1.2s ease-out forwards;
  opacity: 0.95;
}


@keyframes explode {
  to {
    transform: translate(var(--x), var(--y)) scale(0.6);
    opacity: 0;
  }
}


@media screen and (max-width: 900px) {

  #svg-container {

    width: 700px;
  }

  #svg-editor {
    width: 100%;
  }

  .header-desenhos .center,
  .group-controls {

    width: 100%;
  }

  .svg-controls {

    top: 109px;
  }

  .group-header-desenhos {

    gap: 35px;
  }

  .header-desenhos {

    padding: 0px 10px;
    margin-bottom: 0;
}

  .acf-gallery {

    padding-top: 30px;
  }

  .gallery-item {

    flex-shrink: 0;
  }

  .group-controls {
    top: 42px;
  }

  .colorful-title {
    width: 300px;
  }

  .items-desenhos {
    padding: 10px;
  }

  .lista-desenhos {

    margin-top: 45px;
  }
}


@media screen and (max-width: 620px) {

  .menu-modal-box {
      min-width: 95%;
  }

  #svg-container {

    width: 100%;
  }
}



@media screen and (max-width: 360px) {

  .items-desenhos .item-desenho {
      width: 145px;
  }

  .gallery-item {

    width: 100px;
    height: 145px;
  }

}

@media screen and (max-width: 320px) {
    .items-desenhos .item-desenho {
        width: 125px;
    }
}