/* ==========================================================================
   TABLE OF CONTENTS
   ==========================================================================
   1. VARIABLES & TOKENS (:root)
   2. RESET & BASE STYLES (HTML, Body, Resets)
   3. TYPOGRAPHY & FONTS (@font-face, Headings)
   4. LAYOUT & STRUCTURE (Header, Footer, Main Containers)
   5. COMPONENTS (Buttons, Cards, Canvas Loader, Modals)
   6. UTILITIES & HELPERS (Single-purpose classes)
   7. ANIMATIONS & KEYFRAMES (@keyframes)
   8. MEDIA QUERIES (@media responsive)
   ========================================================================== */

/*  ======================================
    1. VARIABLES & TOKENS (:root)
    ====================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background-color: #fcf7ed;
  --text-color: #353535;
  --global-font: "Quicksand", sans-serif;
  --fuente-base: "Segoe UI", system-ui, sans-serif;
  --btn-color: #98c3a4;
  --btn-color-hover: #7bb28b;
}

/*  ======================================
    2. RESET & BASE STYLES (HTML, Body, Resets)
    ====================================== */
body,
html {
  font-family: var(--global-font);
  background-color: var(--background-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
}

/*  ======================================
    3. TYPOGRAPHY & FONTS (@font-face, Headings)
    ====================================== */

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DayCareRegular";
  src: url("../assets/fonts/DayCare-Regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand_Bold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("../assets/fonts/Quicksand_Book.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/*  ======================================
    4. LAYOUT & STRUCTURE (Header, Footer, Main Containers)
    ====================================== */

main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.credits {
  padding: 12px 0;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-color);
  letter-spacing: 1px;
}

.credits p a {
  font-size: 0.8rem;
  color: #3d2c0a;
}

/*  ======================================
    5. COMPONENTS (Buttons, Cards, Canvas Loader, Modals)
    ====================================== */

button {
  font-family: var(--global-font);
  font-weight: 600;
  overflow: hidden;
}

.modal-card-info {
  position: fixed;
  top: 50%;
  left: 50%;
  margin: 0;
  border: none;
  border-radius: 16px;
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 0;
  max-width: 92%;
  width: 470px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: #98c3a4 transparent;
}

.modal-card-info[open] {
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-card-info.is-closing {
  animation: fadeOut 0.2s ease-in forwards;
}

.modal-card-info.is-closing::backdrop {
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  transition: all 0.2s ease-in;
}

.modal-content-info {
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  overflow-y: auto;
}

.modal-content-info h2 {
  font-size: 1.35rem;
  font-weight: bold;
  line-height: 1.2;
  font-family: "Poppins", sans-serif;
}

h2:focus {
  outline: none;
}

.modal-content-info > h2 > span,
.queue-modal-content > h2 > span {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: "DayCareRegular", sans-serif;
  color: #98c3a4;
}

.queue-modal-content > h2 > span {
  font-size: 1.8rem;
}

.modal-content-info-subtitle {
  font-size: 0.95rem;
  opacity: 0.9;
  padding-left: 1rem;
}

.instructions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
  padding: 0;
}

.instructions-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #fbeddc;
  padding: 20px;
  border-radius: 24px;
  opacity: 0.9;
}

.instruction-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
}

.instruction-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.instruction-text strong {
  font-size: 16px;
  font-family: "Poppins", sans-serif;
}

.instruction-text p {
  font-size: 14px;
  font-weight: normal;
  line-height: 1.2rem;
}

.modal-examples-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin-top: 12px;
}

.modal-examples {
  display: flex;
  gap: 16px;
  width: 100%;
}

.example-box {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.img-frame {
  margin-top: 14px;
  padding-top: 5px;
  padding-block: 0px;
  border-radius: 16px;
  width: 100%;
  box-sizing: border-box;
}

.img-frame img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}

.example-badge {
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 105px;
  height: 32px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
}

.example-box.good .img-frame {
  background-color: #eef5f0;
  border: 3px solid #d4e5d8;
}

.example-box.good .example-badge {
  background-color: #d4e6d9;
  color: #5b9c74;
}

.badge-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.example-box.bad .img-frame {
  background-color: #f6eedc;
  border: 3px solid #f6eedc;
}

.example-box.bad .example-badge {
  background-color: #fbe4d8;
  color: #c23b3b;
}

.icon-cross {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  background-color: #c23b3b;
  color: white;
  border-radius: 50%;
  font-size: 10px;
}

.advice-banner {
  background-color: #fbeddc;
  padding: 14px 24px;
  border-radius: 30px;
  text-align: left;
  line-height: 1.2;
  color: #2d2d2d;
}

.advice-banner strong {
  color: #8cb99d;
  font-size: 0.9rem;
  font-weight: 800;
}

.advice-banner p {
  font-weight: 400;
  color: var(--text-color);
  font-size: 0.8rem;
}

.btn-understood {
  background-color: var(--btn-color);
  color: #ffffff;
  border: none;
  outline: none;
  padding: 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
  width: 100%;
  margin-top: 8px;
}

.btn-understood:hover {
  transform: scale(1.02);
  background-color: var(--btn-color-hover);
}

.btn-understood:active {
  transform: scale(0.85);
  background-color: var(--btn-color-hover);
}

.modal-card-info::backdrop {
  background-color: rgba(22, 16, 4, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content-info::-webkit-scrollbar {
  width: 16px;
}

.modal-content-info::-webkit-scrollbar-button:vertical:start:decrement {
  display: block;
  height: 50px;
  background-color: transparent;
}

.modal-content-info::-webkit-scrollbar-button:vertical:end:increment {
  display: block;
  height: 50px;
  background-color: transparent;
}

.modal-content-info::-webkit-scrollbar-track {
  background: transparent;
  margin-top: 55px;
  margin-bottom: 55px;
}

.modal-content-info::-webkit-scrollbar-thumb {
  background-color: #b0b0b0;
  border-radius: 10px;
  border: 4px solid transparent;
  background-clip: padding-box;
  border-top: 20px solid transparent;
  border-bottom: 20px solid transparent;
  border-left: 4px solid transparent;
  border-right: 7px solid transparent;
}

.modal-content-info::-webkit-scrollbar-thumb:hover {
  background-color: #98c3a4;
}

.welcome {
  width: 100%;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.logo-header {
  width: 100%;
  padding: 25px 0;
  display: flex;
  justify-content: center;
  position: relative;
  top: 0;
  margin-bottom: 40px;
  box-sizing: border-box;
}

.welcome-logo {
  max-width: 130px;
  height: auto;
  display: inline-block;
}

.welcome-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  padding: 0 30px;
  box-sizing: border-box;
  text-align: center;
  width: 100%;
  max-width: 650px;
  line-height: 1.2;
}

.welcome-content h1 {
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}

.welcome-content > h1 > span {
  font-family: "DayCareRegular", sans-serif;
  color: #98c3a4;
  font-size: 2.2rem;
}

.paw-line {
  max-width: 150px;
  height: 20px;
  margin-top: 15px;
  margin-bottom: 25px;
}

.paw-line img {
  width: 100%;
  height: auto;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.drop-zone {
  width: 55%;
  height: 226px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%2398c3a4' stroke-width='3' stroke-dasharray='7%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
  background-color: rgba(255, 255, 255, 0.4);
  transition: all 0.25s ease;
  margin: 0 auto;
  text-align: center;
  box-sizing: border-box;
}

.drop-zone-text {
  line-height: 1.1;
  font-size: 1rem;
  color: #3d2c0a;
  margin-bottom: 12px;
  font-weight: 600;
}

.drop-zone-span {
  font-weight: 300;
}

.drop-zone-icon {
  margin-bottom: 8px;
  width: 80px;
  height: 80px;
}

.drop-zone-icon img {
  width: 100%;
  height: 100%;
}

.drop-zone.drag-over {
  border-color: #2e7d32;
  background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='16' ry='16' stroke='%2398c3a4' stroke-width='3' stroke-dasharray='7%2c 10' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
  background-color: rgba(212, 230, 217, 0.6);
  transform: scale(1.02);
}

.btn-selectFile {
  background-color: var(--btn-color);
  color: white;
  padding: 10px 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.1s ease,
    background-color 0.1s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.btn-selectFile img {
  width: 20px;
  height: 20px;
  pointer-events: none;
  filter: invert(100%) brightness(200%);
}

.btn-selectFile span {
  font-size: 0.9rem;
}

.btn-selectFile p {
  height: 20px;
  width: fit-content;
}

.btn-selectFile:active {
  background-color: var(--btn-color-hover);
  transform: scale(0.89);
}

#fileInput,
#btn-changeFile-mobile input[type="file"] {
  display: none;
}

.badgesTesterContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 20px;
}

.btn-changeFile,
#openBadgeModal,
#downloadBtn {
  background-color: var(--btn-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  justify-content: center;
  align-items: center;
  width: 200px;
  font-size: unset;
  display: flex;
  white-space: nowrap;
}

.btn-changeFile span {
  text-align: center;
}

.btn-changeFile img {
  filter: brightness(0) invert(1);
}

.btn-changeFile:hover,
.btn-selectFile:hover,
#openBadgeModal:hover,
#closeBadgeModal:hover,
#downloadBtn:hover {
  background-color: var(--btn-color-hover);
  transform: scale(1.02);
}

.btn-changeFile input[type="file"] {
  display: none;
}

.movement-and-zoom-controls {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-bottom: 10px;
}

.movement-controls {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
}

.movement-controls button {
  width: 21%;
  height: 35px;
  font-size: 18px;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid rgba(61, 44, 10, 0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: all 0.2s ease;
  background-color: #f2d3b9;
  border-color: #f2d3b9;
  color: #3c210b;
}

.movement-controls-mobile {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 50%;
  height: 26px;
}

.movement-controls-mobile button {
  width: 100%;
  height: 26px;
  font-size: 18px;
  cursor: pointer;
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid rgba(61, 44, 10, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: all 0.2s ease;
  background-color: #fbeddc;
  border-color: #fbeddc;
  color: #3c210b;
}

.zoomControls {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #f2d3b9;
  width: 35%;
  height: 35px;
  border-radius: 10px;
}

.zoomControls .zoomInBtn,
.zoomControls .zoomOutBtn {
  padding: 0;
}

.zoomControls button {
  width: 35%;
}

label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

canvas {
  max-width: 550px;
  width: 100%;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

/* =========================
   DESKTOP LAYOUT
========================= */

#pageTitle {
  padding-bottom: 10px;
  font-size: 2.8rem;
  font-weight: 700;
  font-family: "DayCareRegular", sans-serif;
  color: #98c3a4;
}

.canvas-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-radius: 25px;
}

.badgesTesterContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.separator {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 70px;
}

/* SIDEBAR */

.desktop-sidebar {
  width: 500px;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.desktop-sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.desktop-sidebar h2 {
  font-size: 1.2rem;
  font-weight: 600;
  font-family: "Poppins";
}

.desktop-sidebar h3 {
  font-family: "Poppins";
  font-weight: 500;
  background: #fff8ef;
  font-size: 17px;
}

.desktop-theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* .collection-btn, */
.desktop-theme-btn {
  border: none;
  background: #f2eadf;
  color: #3d2c0a;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.collection-btn {
  border: none;
  font-weight: 500;
  background: #fff8ef;
  font-size: 17px;
}

.desktop-theme-btn:hover {
  background: #e4c48e;
}

/* .collection-btn.active, */
.desktop-theme-btn.active {
  background: #f2d3b9;
  color: black;
}

.desktop-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-height: 85%;
  overflow-y: auto;
  padding: 5px;
  background-color: white;
  border-radius: 15px;
}

.desktop-badge-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 10px;
}

.badge-card {
  position: relative;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  background: #f8f4ee;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-tag {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 50%;
  left: 50%;
  align-content: center;
  transform: translate(-50%, -50%);
  background: rgba(248, 244, 238, 0.5);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  border-color: var(--btn-color);
}

.badge-tag-text {
  color: #353535;
  text-align: center;
  font-size: medium;
}

.badge-card.active .badge-tag {
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.badge-card.hide-tag .badge-tag {
  opacity: 0;
}

.badge-card:hover,
.badge-card.active {
  transform: scale(1.03);
  border-color: var(--btn-color);
}

/* =========================
   MODAL
========================= */

.main-modal,
.modal {
  position: fixed;
  inset: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 999;
}

.main-modal {
  background: rgba(0, 0, 0, 0.65);
}

.modal-content {
  background-color: white;

  width: 90%;
  max-width: 500px;

  padding: 24px;
  border-radius: 16px;

  display: flex;
  flex-direction: column;
  gap: 20px;

  align-items: center;

  max-height: 80vh;
}

.modal-content h2 {
  font-size: 1.5rem;
}

.badge-grid {
  width: 100%;

  display: flex;
  flex-wrap: wrap;

  justify-content: center;

  gap: 16px;

  overflow-y: auto;
  max-height: 60vh;

  padding: 5px;
}

.badge-option {
  width: 45%;
  aspect-ratio: 1 / 1;

  object-fit: contain;

  border: 2px solid transparent;
  border-radius: 12px;

  cursor: pointer;

  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}

.badge-option:hover {
  transform: scale(1.05);
  border-color: #da9f27;
}

#closeBadgeModal,
#closeThemeModal {
  background-color: #da9f27;

  color: #161004;

  border: none;
  border-radius: 8px;

  padding: 12px 18px;

  font-weight: 600;

  cursor: pointer;
}

.theme-card {
  width: 120px;

  display: flex;
  flex-direction: column;
  gap: 10px;

  align-items: center;

  cursor: pointer;

  flex-shrink: 0;
}

.modal-large {
  max-width: 600px;
}

.theme-card img {
  width: 100%;
  aspect-ratio: 1 / 1;

  object-fit: cover;

  border-radius: 12px;

  margin-top: 0;
  border: none;
}

.canvas-area {
  position: relative;
  display: inline-block;
}

.canvas-area-header {
  color: black;
  padding: 10px;
  border-radius: 25px 25px 0px 0px;
  display: flex;
  align-items: center;
  z-index: 10;
  width: 100%;
  justify-content: space-between;
  display: flex;
  justify-content: center;
}

.canvas-area-footer {
  color: black;
  padding: 10px 16px;
  border-radius: 0px 0px 25px 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
  width: 100%;
  justify-content: space-between;
  border-top: 0px;
  gap: 5px;
}

.canvas-area-header-mobile,
.canvas-area-footer-mobile {
  background: #fff8ef;
  color: black;
  padding: 10px 16px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  z-index: 10;
  height: 45px;
  justify-content: space-between;
}

.btn-icon,
.btn-icon-info,
.action-btn-footer,
.mobile-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 33%;
  background-color: #fff8ef;
  border: none;
  height: 30px;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--global-font);
  font-weight: 600;
  color: var(--text-color);
  font-size: 12px;
  overflow: hidden;
  /* text-align: center; */
}

.zoomFeedback {
  align-items: flex-start;
  height: 35px;
  border: none;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--global-font);
  font-weight: 600;
  color: var(--text-color);
  font-size: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f2d3b9;
}

.canvas-footer-info {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.canvas-footer-info .openModalBtn {
  width: 10%;
}

.mobile-action-btn-footer,
.action-btn-footer {
  background-color: #f2d3b9;
  align-items: center;
  height: 26px;
  width: 10%;
}

.action-btn-footer {
  height: 35px;
}

#openModalBtn {
  width: 10%;
  height: 26px;
}

#chooseBadgeBtn-mobile {
  background-color: #98c3a4;
  color: #fff8ef;
}

.canvas-area-header-mobile,
.canvas-area-footer-mobile {
  display: none;
  border: 1px solid rgba(61, 44, 10, 0.2);
}

.btn-changeFile-mobile {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50%;
  border-radius: 10px;
  font-family: var(--global-font);
  font-weight: 600;
  font-size: unset;
}

.btn-icon img {
  display: flex;
}

.btn-icon img,
.btn-icon-info img,
.action-btn-footer img,
.mobile-action-btn img,
#downloadBtn img,
.btn-changeFile img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: flex;
  flex-shrink: 0;
  align-items: flex-start;
  justify-content: center;
  scale: 1;
}

#rightImageScale {
  margin-left: 10px;
}

.btn-icon-info-desktop {
  background: #fff8ef;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
  justify-content: center;
  align-items: center;
  font-size: unset;
  display: flex;
}

.btn-icon-info-desktop:hover {
  transform: scale(1.1);
}

.btn-icon-info-desktop img {
  width: 26px;
  height: 26px;
}

#downloadBtn img {
  margin-right: 8px;
  filter: brightness(0) invert(1);
}

.btn-icon:hover,
.btn-icon-info:hover,
.mobile-action-btn:hover {
  transform: scale(1.05);
}

.btn-icon:focus,
.btn-icon-info:focus,
.mobile-action-btn:focus {
  outline: none;
}

.modal-success-card {
  border: none;
  background-color: #fbeddc;
  border-radius: 24px;
  padding: 35px;
  max-width: 620px;
  width: 90%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal-success-card[open] {
  animation: fadeIn 0.3s ease-out forwards;
}

.modal-success-card.is-closing {
  animation: fadeOut 0.2s ease-in forwards;
}

.modal-success-card:focus-visible {
  outline: none;
}

.modal-success-card::backdrop {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

.modal-success-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.success-image-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.dog-success-img {
  width: 150px;
  height: auto;
  display: block;
  object-fit: contain;
}

.success-info-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.success-info-right h2 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  font-size: 1.3rem;
}

.success-info-right p {
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  font-family: "Quicksand", sans-serif;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

/* Fila de los botones */
.success-buttons-row {
  display: flex;
  gap: 14px;
}

.btn-icon-png {
  width: 18px;
  height: 18px;
  object-fit: contain;
  margin-right: 8px;
  display: inline-block;
  filter: invert(100%) brightness(200%);
}

.btn-success-action {
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  width: 100%;
  background-color: var(--btn-color);
  color: #ffffff;
  border: 1px solid #e5dfd3;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.btn-success-action:hover {
  background-color: var(--btn-color-hover);
  transform: scale(1.05);
}

.btn-success-action:active {
  background-color: var(--btn-color-hover);
  transform: scale(0.89);
}

.btn-success-action:visited {
  outline: none !important;
  box-shadow: none !important;
}

.queue-modal {
  border: none;
  padding: 0;
  background: transparent;
  margin: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  position: fixed;
  outline: none;
  max-width: 92%;
  width: 470px;
}

.queue-modal:focus-visible {
  outline: none;
}

.queue-modal::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(7px);
}

.queue-modal-content {
  background: #fbeddc;
  border-radius: 28px;
  padding: 40px 28px;
  color: var(--text-color);
  text-align: center;
  animation: queueAppear 0.35s ease;
}

.queue-spinner {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  border: 4px solid rgba(255, 255, 255, 0.08);
  border-top: 4px solid white;
  margin: 0 auto 24px;
  animation: spin 1s linear infinite;
}

.queue-modal h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.queue-description {
  color: var(--text-color);
  line-height: 1.5;
  margin-bottom: 28px;
}

.queue-position-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.queue-position-wrapper span {
  color: var(--text-color);
  font-size: 0.95rem;
}

.queue-position {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4e6d9, #ffffff);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
}

.queue-small {
  color: var(--text-color);
  font-size: 0.9rem;
}

.app-locked {
  overflow: hidden;
}

.app-locked main {
  pointer-events: none;
  user-select: none;
  filter: blur(4px);
  opacity: 0.8;
}

.session-expired-modal {
  border: none;
  padding: 0;
  background: transparent;
  margin: 0;
  position: fixed;
  inset: 0;
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
  z-index: 2147483647; /* máximo práctico */
}

.session-expired-modal::backdrop {
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.session-expired-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: min(90vw, 500px);

  background: #fbeddc;
  border-radius: 24px;

  padding: 32px;
  text-align: center;

  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
}

.session-expired-content h2 {
  font-family: "Poppins", sans-serif;
  margin-bottom: 16px;
  font-size: 2rem;
}

.session-expired-content p {
  margin-bottom: 24px;
  line-height: 1.5;
  font-size: 1rem;
}

.session-expired-btn {
  width: 100%;

  border: none;
  border-radius: 12px;

  padding: 14px;

  cursor: pointer;

  background: var(--btn-color);
  color: white;

  font-weight: 600;
  font-size: 1rem;

  transition: all 0.2s ease;

  display: flex;
  justify-content: center;
}

.session-expired-btn:hover {
  background: var(--btn-color-hover);
}

.session-expired-btn:active {
  transform: scale(0.95);
}

/*  ======================================
    6. UTILITIES & HELPERS (Single-purpose classes)
    ====================================== */
.is-hidden {
  display: none !important;
}


/*  ======================================
    7. ANIMATIONS & KEYFRAMES (@keyframes)
    ====================================== */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
}

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

@keyframes queueAppear {
  from {
    transform: translateY(20px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}


/*  ======================================
    8. MEDIA QUERIES (@media responsive)
    ====================================== */

@media (max-width: 900px) {
  .movement-controls {
    display: none;
  }

  .container {
    padding: 0px;
  }

  .zoomControls .zoomInBtn,
  .zoomControls .zoomOutBtn {
    padding: 0px;
  }

  canvas {
    position: relative;
    top: 0px;
    right: 0px;
    border: 0;
    aspect-ratio: 1;
    max-width: 400px;
    width: 100%;
    border-radius: 0;
    display: block;
    margin-top: 45px;
  }

  #pageTitle {
    display: none;
  }

  .separator {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .desktop-sidebar {
    width: 100%;
    max-width: 550px;
    gap: 5px;
    border-radius: 0px;
    height: fit-content;
  }

  .desktop-sidebar-header {
    display: flex;
    flex-direction: column;
    padding-left: 5vw;
    height: fit-content;
  }

  .action-buttons {
    display: none;
  }

  .desktop-badge-grid {
    grid-template-columns: repeat(3, 1fr);
    /* max-height: 33vh; */
    background-color: white;
    border-radius: 20px;
    height: fit-content;
    overflow-x: hidden;
  }

  .canvas-area-header,
  .canvas-area-footer,
  .btn-icon {
    display: none;
  }

  .canvas-area-header-mobile,
  .canvas-area-footer-mobile {
    display: flex;
    width: 100%;
    position: static;
  }

  .canvas-area-header-mobile {
    position: fixed;
    gap: 3px;
  }

  .zoomFeedback {
    height: 26px;
  }

  .instruction-text strong {
    font-size: 14px;
  }

  .instruction-text p {
    font-size: 12px;
    line-height: 1rem;
  }

  .modal-success-content {
    flex-direction: column;
    text-align: center;
  }

  .success-buttons-row {
    flex-direction: column;
    width: 100%;
  }

  .zoomControls,
  .zoomControls button {
    height: 26px;
    background-color: #fbeddc;
  }

  .btn-selectFile {
    -webkit-tap-highlight-color: transparent;
    transition:
      transform 0.2s ease,
      background-color 0.2s ease;
  }

  .btn-selectFile:active {
    transform: scale(0.89);
  }

  .credits {
    font-size: 0.7rem;
    letter-spacing: 0px;
    position: fixed !important;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--background-color);
    padding: 12px 0;
    touch-action: none;
  }

  .credits.is-static {
    position: static !important;
    padding: 10px 0;
  }

  .credits p a {
    font-size: 0.8rem;
  }

  .mobile-action-btn-footer {
    background-color: #fbeddc;
  }

  .badge-tag-text {
    font-size: x-small;
  }

  .success-info-right h2 {
    font-size: 1rem;
  }

  .success-info-right p {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .welcome {
    margin-top: 0 !important;
    padding-top: 0 !important;
    overflow: hidden;
    touch-action: none;
    height: 100dvh;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
  }

  .logo-header {
    box-shadow: 0 3px 4px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid #eaeaea;
    padding-top: 2.2rem;
    padding-bottom: 1.5rem;
    margin-bottom: 40px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    background-color: var(--background-color);
  }

  .logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
  }

  .logo-link:hover .welcome-logo {
    opacity: 0.9;
    transform: scale(1.02);
    transition: all 0.2s ease;
  }

  .welcome-content {
    padding: 110px 30px 30px 30px;
    justify-content: center;
  }

  .drop-zone {
    width: 85%;
  }
}
