/* =========================================================
   QR Studio · custom styles
   Location: assets/css/style.css
   ========================================================= */

html { scroll-behavior: smooth; }

/* Selection */
::selection { background: #C00063; color: #fff; }

/* Type chips (types grid) */
.type-chip {
  display: flex; align-items: center; gap: .5rem;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 1.25rem;
  font-weight: 600; font-size: .85rem; color: #111827;
  transition: all .25s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px -8px rgba(2,0,102,0.15);
}
.type-chip i { color: #C00063; transition: transform .25s ease; }
.type-chip:hover { border-color: #020066; transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(2,0,102,0.30); }
.type-chip:hover i { transform: scale(1.15); }
.type-chip.active { background:#020066; color:#fff; border-color:#020066; }
.type-chip.active i { color:#fff; }

/* Frame chip */
.frame-chip {
  padding: .55rem .5rem; border: 1px solid #E5E7EB;
  border-radius: 1rem; background: #fff; font-weight: 600;
  transition: all .2s ease;
}
.frame-chip:hover { border-color: #020066; }
.frame-chip.active { background: #020066; color: #fff; border-color: #020066; }

/* Download buttons */
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid #E5E7EB; border-radius: 1rem;
  padding: .8rem 1rem; font-weight: 600;
  background: #fff; color: #020066;
  transition: all .2s ease;
}
.dl-btn:hover { background: #020066; color: #fff; border-color: #020066; }
.dl-btn:active { transform: scale(.98); }

/* Form fields */
.field-label { font-size: .62rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #6B7280; }
.field-input, .field-textarea, .field-select {
  width: 100%; margin-top: .5rem;
  background: #fff;
  border: 1px solid #E5E7EB; border-radius: 1.1rem;
  padding: .9rem 1rem;
  font-size: .95rem; color: #111827;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-input:focus, .field-textarea:focus, .field-select:focus {
  outline: none; border-color: #020066;
  box-shadow: 0 0 0 4px rgba(2,0,102,0.08);
}
.field-textarea { min-height: 110px; resize: vertical; }
.field-help { display:block; margin-top: .35rem; font-size: .72rem; color: #6B7280; }

/* Frame variants around QR preview */
#qrFrame.frame-none   { background: #F8F9FC; border-color: #E5E7EB; }
#qrFrame.frame-scan   { background: #020066; border-color: #020066; }
#qrFrame.frame-scan::before {
  content: 'SCAN ME'; display: block; text-align:center; color:#fff; font-weight:800;
  letter-spacing:.35em; font-size:.7rem; margin-bottom: .5rem;
}
#qrFrame.frame-round  { border-radius: 2.5rem; background: linear-gradient(135deg,#F8F9FC,#fff); }
#qrFrame.frame-ribbon { background: linear-gradient(135deg,#C00063 0%, #020066 100%); border-color: transparent; }
#qrFrame.frame-ribbon::after {
  content: 'TAP · SCAN · GO'; display:block; text-align:center; color:#fff;
  font-weight:800; letter-spacing:.35em; font-size:.7rem; margin-top:.5rem;
}

/* History card */
.history-card {
  background:#fff; border:1px solid #E5E7EB; border-radius: 1.25rem;
  padding: .75rem; transition: all .2s ease; position:relative;
}
.history-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(2,0,102,0.25); border-color:#020066; }
.history-card img { width:100%; aspect-ratio:1/1; object-fit:contain; background:#F8F9FC; border-radius:.9rem; }
.history-card .meta { display:flex; align-items:center; justify-content:space-between; margin-top:.5rem; font-size:.72rem; color:#6B7280; }
.history-card .del  { color:#C00063; opacity:.7; transition: opacity .2s; }
.history-card .del:hover { opacity:1; }

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, #eef 25%, #f8f9fc 37%, #eef 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
/* ==============================
   QR Preview Container
============================== */

#qrFrame{
    display:flex;
    justify-content:center;
    align-items:center;

    width:100%;
    min-height:20px;

    overflow:hidden;
}

#qrCanvas{
    width:100%;
    max-width:320px;
    aspect-ratio:1;
    display:flex;
    justify-content:center;
    align-items:center;
}

#qrCanvas canvas,
#qrCanvas svg{

    width:100% !important;
    height:100% !important;

    max-width:320px !important;
    max-height:320px !important;

    object-fit:contain;
    display:block;
}
.qr-type-label {
  display: flex;          /* was inline-flex */
  width: fit-content;      /* so it stays badge-sized, not full-width */
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  background: rgba(192, 0, 99, .08);
  color: var(--gbp-secondary-color);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 auto 8px;
}

.qr-type-title {
    margin: 0;
    text-align: center;
    font-family: inherit; /* replace if you have a specific display font */
    font-size: 40px;
    line-height: 1.2;
    font-weight: 900;
    color: #020066;
}
@media (max-width: 767px) {
    .qr-type-title {
        font-size: 30px;
    }
}
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Toast */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(30px);
  background:#020066; color:#fff; padding:.9rem 1.25rem; border-radius:1rem; font-weight:600;
  box-shadow: 0 20px 40px -20px rgba(2,0,102,0.5);
  opacity:0; pointer-events:none; transition: all .3s ease; z-index: 999;
}
#toast.show { opacity:1; transform: translateX(-50%) translateY(0); }
#toast.err  { background:#C00063; }

/* Staggered entrance for type chips */
@media (prefers-reduced-motion: no-preference) {
  .type-chip { animation: chipIn .5s ease both; }
  #typeGrid .type-chip:nth-child(1) { animation-delay:.02s }
  #typeGrid .type-chip:nth-child(2) { animation-delay:.04s }
  #typeGrid .type-chip:nth-child(3) { animation-delay:.06s }
  #typeGrid .type-chip:nth-child(4) { animation-delay:.08s }
  #typeGrid .type-chip:nth-child(5) { animation-delay:.10s }
  #typeGrid .type-chip:nth-child(6) { animation-delay:.12s }
  #typeGrid .type-chip:nth-child(7) { animation-delay:.14s }
  #typeGrid .type-chip:nth-child(8) { animation-delay:.16s }
  #typeGrid .type-chip:nth-child(n+9) { animation-delay:.18s }
  @keyframes chipIn { from { opacity:0; transform: translateY(8px);} to { opacity:1; transform:none;} }
}
/* =========================================================
   QR Type Navigation Redesign - MATCHING BRAND STYLES
   ========================================================= */

#typeGrid {
  width: 100%;
  display: block;
  margin-bottom: 2rem;
}

#typeGrid .qr-nav-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 1.25rem; /* Matches your .type-chip radius */
  padding: 0.5rem;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 4px 12px -8px rgba(2,0,102,0.15); /* Matches your custom shadow */
}

#typeGrid .qr-type-tabs {
  display: flex;
  align-items: center;
  gap: 4.75rem; /* fixed: was 4.5rem, blew out the row width on all screens */
  flex: 1;
  min-width: 0; /* fixed: lets the row actually scroll instead of stretching its flex parent */
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

#typeGrid .qr-type-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

#typeGrid .qr-tab {
  padding: 0.35rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  /* padding: 0.5rem 1rem 0.5rem 0.5rem; */
  border: 1px solid transparent;
  border-radius: 1rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease; /* Matches your chip transition */
  white-space: nowrap;
  color: #111827;
  font-weight: 600;
  min-height: 40px;
  font-size: 11.23px;
  margin: 0;
  flex-shrink: 0; /* fixed: keeps each tab from being squeezed/wrapped in the scroll row */
}

#typeGrid .qr-tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #E5E7EB;
  border-radius: 0.85rem;
  background: #ffffff;
  color: #C00063; /* Your Magenta */
  transition: all 0.25s ease;
  flex-shrink: 0;
}

/* Hover effects matching your original chips */
#typeGrid .qr-tab:hover {
  background: #F8F9FC;
  transform: translateY(-2px);
}
#typeGrid .qr-tab:hover .qr-tab-icon {
  border-color: #020066; /* Your Navy */
  transform: scale(1.15); /* Matches your icon scale */
}

/* Active State matching your brand */
#typeGrid .qr-tab.active {
  background: #020066;
  color: #ffffff;
}

#typeGrid .qr-tab.active .qr-tab-icon {
  background: transparent;
  border-color: transparent;
  color: #ffffff;
}

/* Dropdown styling */
#typeGrid .qr-dropdown {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 0.5rem;
  border-left: 1px solid #E5E7EB;
}

#typeGrid .qr-dropdown-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #E5E7EB;
  border-radius: 50%;
  background: #ffffff;
  color: #020066;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

#typeGrid .qr-dropdown-toggle:hover {
  border-color: #020066;
  background: #F8F9FC;
  transform: scale(1.05);
}

#typeGrid .qr-dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.75rem);
  background: #ffffff;
  border: 1px solid #E5E7EB;
  border-radius: 1.25rem;
  box-shadow: 0 20px 40px -20px rgba(2,0,102,0.25); /* Matches your history card hover shadow */
  width: 240px;
  max-width: calc(100vw - 2rem); /* fixed: prevents the menu overflowing the viewport on narrow screens */
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

#typeGrid .qr-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#typeGrid .qr-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  color: #111827;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  width: 100%;
}

#typeGrid .qr-dropdown-item i {
  color: #C00063;
  width: 20px;
  text-align: center;
  transition: transform 0.25s ease;
}

#typeGrid .qr-dropdown-item:hover {
  background: #F8F9FC;
  color: #020066;
}

#typeGrid .qr-dropdown-item:hover i {
  transform: scale(1.15);
}

@media (max-width: 640px) {
  /* fixed: on small screens let the whole nav bar wrap instead of forcing one unreadable scroll line */
  #typeGrid .qr-nav-container { flex-wrap: wrap; }
  #typeGrid .qr-type-tabs { min-width: 100%; order: 2; }
  #typeGrid .qr-dropdown { margin-left: 0; order: 1; padding-left: 0; border-left: none; }
}


.style-grid{
    display:flex;
    gap:12px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    -ms-overflow-style:none;
    padding-bottom:5px;
    min-width: 0; /* fixed: was missing — without this the flex item can't shrink and overflow-x never engages */
    width: 100%;  /* fixed: anchors it to the parent instead of intrinsic content width */
}

.style-grid::-webkit-scrollbar{
    display:none;
}

.style-card{
    width:58px;
    height:58px;

    flex-shrink:0;

    border:1.5px solid #e5e7eb;
    border-radius:12px;

    background:#fff;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;
    transition:.25s;

    padding:6px;
}

.style-card img{
    width:36px;
    height:36px;
    object-fit:contain;
    display:block;
}

.style-card:hover{
    border-color:#d10072;
}

.style-card.active{
    border:2px solid #d10072;
    background:#fff3f9;
}

.logo-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 5px;
    min-width: 0; /* fixed: same overflow fix as .style-grid */
    width: 100%;  /* fixed */
}

.logo-item {
    width: 70px;
    height: 70px;
    flex: 0 0 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px;
    border: none;              /* ✅ removed border */
    outline: none;             /* ✅ remove focus outline */
    background: transparent;   /* ✅ no box background */
    cursor: pointer;
    transition: 0.2s ease;
}

.logo-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-item i {
    font-size: 28px;
}
/* .logo-item.active {
    border: 2px solid #e50072;
} */

.logo-item.active {
    background: #d1007317;   /* subtle highlight */
    border-radius: 52px;   
}
.logo-slider .logo-item {
    background: transparent;
    border: none;
}

.logo-slider .logo-item.active {
    background: #d1007313;
}
.logo-slider::-webkit-scrollbar {
    height: 6px;
}

.logo-slider::-webkit-scrollbar-track {
    background: transparent;
}

.logo-slider::-webkit-scrollbar-thumb {
    background: rgba(122, 119, 119, 0.15);
    border-radius: 20px;
}

.logo-slider::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 243, 243, 0.3);
}

.logo-slider {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.frame-chip {
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.frame-chip:hover {
  border: 2px solid #d10072;
  background: #fff3f9;
}

button.frame-chip.active,
button.frame-chip.active:hover {
  border: 2px solid #fedc00;
  background: #7b003e;
  transform: none;
}

/* =========================================================
   Tailwind CDN replacement
   Plain CSS equivalents for every utility class used in
   index.php, written by hand (no build step, no CDN).
   Brand tokens carried over from the old tailwind.config:
     navy    #020066   magenta #C00063
     ink     #111827   muted   #6B7280
     line    #E5E7EB   cloud   #F8F9FC
     font-display: Fraunces   font-sans: DM Sans   font-mono: JetBrains Mono
     shadow-card: 0 30px 60px -30px rgba(2,0,102,0.20)
     shadow-soft: 0 10px 30px -12px rgba(2,0,102,0.15)
     shadow-glow: 0 20px 60px -20px rgba(192,0,99,0.45)
     rounded-3xl: 1.75rem
   ========================================================= */

/* --- base / reset bits Tailwind's preflight used to give us --- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* --- layout / display --- */
.block { display: block; }
.hidden { display: none; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* fixed: base grid now always has an explicit 1fr track so children never fall back to shrink-to-fit content width */
}
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* --- flexbox --- */
.flex-1 { flex: 1 1 0%; min-width: 0; } /* fixed: added min-width:0 so flex children can actually shrink/scroll */
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.shrink-0 { flex-shrink: 0; }

/* --- grid --- */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* --- gap --- */
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* --- sizing --- */
.w-full { width: 100%; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-6  { width: 1.5rem; }
.w-5  { width: 1.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-6  { height: 1.5rem; }
.h-5  { height: 1.25rem; }
.h-px { height: 1px; }
.w-\[69px\] { width: 69px; }
.h-\[69px\] { height: 69px; }
.max-w-7xl { max-width: 80rem; }

/* --- spacing: margin --- */
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-8 { margin-top: 2rem; }
.my-5 { margin-top: 1.25rem; margin-bottom: 1.25rem; }

/* --- spacing: padding --- */
.p-2   { padding: .5rem; }
.p-2\.5 { padding: .625rem; }
.p-4   { padding: 1rem; }
.p-6   { padding: 1.5rem; }
.p-8   { padding: 2rem; }
.px-4  { padding-left: 1rem; padding-right: 1rem; }
/* .px-6  { padding-left: 1.5rem; padding-right: 1.5rem; } */
.py-1  { padding-top: .25rem; padding-bottom: .25rem; }
.py-3  { padding-top: .75rem; padding-bottom: .75rem; }
.pt-20 { padding-top: 5rem; }
/* .pb-1  { padding-bottom: .25rem; } */
.pl-3  { padding-left: .75rem; }
.pl-4  { padding-left: 1rem; }
.pr-12 { padding-right: 3rem; }

/* --- borders --- */
.border { border-width: 1px; border-style: solid; border-color: currentColor; }
.border-0 { border-width: 0; }
.border-line { border-color: #E5E7EB; }
.border-gray-200 { border-color: #E5E7EB; }
.rounded-xl  { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.75rem; }
.rounded-full { border-radius: 9999px; }

/* --- backgrounds --- */
.bg-white { background-color: #ffffff; }
/* .bg-cloud { background-color: #F8F9FC; } */
.bg-transparent { background-color: transparent; }
.bg-gray-200 { background-color: #E5E7EB; }

/* --- shadows --- */
.shadow-card { box-shadow: 0 30px 60px -30px rgba(2,0,102,0.20); }
.shadow-soft { box-shadow: 0 10px 30px -12px rgba(2,0,102,0.15); }
.shadow-sm   { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }

/* --- typography --- */
.font-display { font-family: 'Yantramanav', sans-serif }
.font-sans    { font-family: 'poppins', sans-serif; }
.font-mono    { font-family: 'Open Sans', monospace; }
.font-medium  { font-weight: 500; }
.font-semibold{ font-weight: 600; }
.font-black   { font-weight: 700; }
.text-xs   { font-size: .65rem; line-height: 1rem; }
.text-sm   { font-size: .875rem; line-height: 1.25rem; }
.text-xl   { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl  { font-size: 20px; line-height: 2rem; }
.text-3xl  { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl  { font-size: 2.25rem; line-height: 2.5rem; }
.text-\[11px\] { font-size: 11px; }
.text-\[15px\] { font-size: 15px; }
.uppercase { text-transform: uppercase; }
.tracking-wider    { letter-spacing: .05em; }
.tracking-\[0\.24em\] { letter-spacing: .14em; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* --- colors: text --- */
.text-ink    { color: #111827; }
.text-muted  { color: #6B7280; }
.text-navy   { color: #020066; }
.text-magenta{ color: #C00063; }
.text-white  { color: #ffffff; }
.text-gray-400 { color: #9CA3AF; }
.text-gray-500 { color: #6B7280; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1F2937; }
.text-\[\#0b1450\] { color: #0b1450; }

/* --- misc utilities --- */
.cursor-pointer { cursor: pointer; }
.list-none { list-style: none; }
.outline-none { outline: none;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}
.appearance-none { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.pointer-events-none { pointer-events: none; }
.grayscale { filter: grayscale(1); }
.object-contain { object-fit: contain; }
.overflow-x-auto { overflow-x: auto; min-width: 0; } /* fixed: min-width:0 added so this actually scrolls instead of stretching its flex/grid parent */
.right-4 { right: 1rem; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* --- transitions --- */
.transition { transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease; }
.transition-all { transition: all .2s ease; }
.transition-transform { transition: transform .2s ease; }
.duration-200 { transition-duration: .2s; }

/* --- accent color for range/checkbox inputs --- */
.accent-magenta { accent-color: #C00063; }

/* --- hover / focus states --- */
.hover\:border-navy:hover   { border-color: #020066; }
.hover\:text-magenta:hover  { color: #C00063; }
.hover\:border-pink-400:hover { border-color: #f472b6; }
.focus\:outline-none:focus  { outline: none; }
.focus\:border-pink-500:focus { border-color: #ec4899; }
.focus\:ring-4:focus,
.focus\:ring-pink-100:focus {
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.18);
}

/* --- <details>/<summary> "group-open" rotate --- */
details.group[open] .group-open\:rotate-180 { transform: rotate(180deg); }

/* --- responsive utilities --- */
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:col-span-2  { grid-column: span 2 / span 2; }
}

@media (min-width: 768px) {
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:text-4xl    { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:block       { display: block; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .lg\:px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
  .lg\:p-10  { padding: 2.5rem; }
  .lg\:p-8   { padding: 2rem; }
  .lg\:py-2  { padding-bottom: .8rem; }
  .lg\:sticky { position: sticky; }
  .lg\:top-24 { top: 6rem; }
  .lg\:self-start { align-self: flex-start; }
}

@media (min-width: 1280px) {
  .xl\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .xl\:grid-cols-\[1\.2fr_0\.8fr\] { grid-template-columns: 1.2fr 0.8fr; }
  .xl\:gap-6 { gap: 1.5rem; }
}

/* fixed: the xl 2-column layout needs min-width:0 on its tracks or the left/right
   panels won't shrink below their content's natural width once the viewport
   narrows back below xl (was causing horizontal page overflow on tablet) */
@media (min-width: 1280px) {
  .xl\:grid-cols-\[1\.2fr_0\.8fr\] > * { min-width: 0; }
}

/* ====================================================
                  qr generator backbox
======================================================== */

.qr-page {
    background: #eff2f9;
    min-height: 100vh;
    padding: 20px 0;
}

.qr-generator-box {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
    background: #f5f4f7f8;
    border: 1px solid #e5e7ef;
    border-radius: 24px;
    padding: 28px 10px;
    box-sizing: border-box;
}

.qr-heading {
    text-align: center;
    margin-bottom: 28px;
}
.qr-subtitle {
    text-align: center;
    margin-bottom: 28px;
    color: #6f7185;
    max-width: 650px;
    margin: 0 auto;
    font-size: 16px;
}
/* .qr-type-label {
    margin: 0 0 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #d41472;
} */

.qr-type-title {
    margin: 0;
    text-align: center;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #020066;
}

.qr-type-selector {
    width: 100%;
    margin-bottom: 36px;
}

.qr-builder {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); /* fixed: was minmax(360px, 0.8fr) — the hard 360px floor forced horizontal overflow below ~900-1000px wide viewports before the stack breakpoint kicked in */
    gap: 20px;
    align-items: start;
}

.qr-config,
.qr-preview {
    background: #ffffff;
    border: 1px solid #e5e7ef;
    border-radius: 22px;
    min-width: 0; /* fixed: added so these panels can shrink instead of forcing page-level horizontal scroll */
}

@media (max-width: 900px) {
    .qr-generator-box {
        width: calc(100% - 32px);
        padding: 28px;
    }

    .qr-builder {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* fixed: tighten box padding further on phones so inner cards have more room */
    .qr-generator-box { padding: 16px 0; }
}
/* ===================================
     right side preview card
================================ */

.qr-preview-card {
    background-color: #ffffff;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 30px 60px -30px rgba(2, 0, 102, 0.20);
    padding: 32px;
}

@media (max-width: 480px) {
    /* fixed: reduce heavy padding on very small screens */
    .qr-preview-card { padding: 18px; }
}




/* =========================================
   ECC SELECT - RESPONSIVE
   ========================================= */

.ecc-select {
    /* Remove native browser styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Responsive sizing */
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;

    height: 56px;

    /* Spacing */
    padding: 0 48px 0 16px;

    /* Border */
    border: 1px solid #e5e7eb;
    border-radius: 16px;

    /* Background */
    background-color: #ffffff;

    /* Text */
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: #1f2937;

    /* Shadow */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);

    /* Interaction */
    cursor: pointer;
    outline: none;

    /* Prevent sizing problems */
    box-sizing: border-box;

    /* Animation */
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

/* fixed: the wrapping <div class="relative"> around the select + chevron icon
   needs to be block-level and full width, otherwise on some grid contexts
   it shrinks to content width and the select pops out of its column */
.ecc-select-wrap,
label > .relative:has(> .ecc-select) {
    display: block;
    width: 100%;
    min-width: 0;
}


/* =========================================
   HOVER
   ========================================= */

.ecc-select:hover {
    border-color: #f472b6;
}


/* =========================================
   FOCUS
   ========================================= */

.ecc-select:focus {
    outline: none;
    border-color: #ec4899;

    box-shadow:
        0 0 0 4px rgba(236, 72, 153, 0.12);
}


/* =========================================
   ACTIVE
   ========================================= */

.ecc-select:active {
    border-color: #ec4899;
}


/* =========================================
   OPTIONS
   ========================================= */

.ecc-select option {
    background-color: #ffffff;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
}


/* =========================================
   TABLET
   769px - 1024px
   ========================================= */

@media (max-width: 1024px) {

    .ecc-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        height: 54px;

        padding: 0 44px 0 15px;

        font-size: 15px;
    }

}


/* =========================================
   MOBILE
   481px - 768px
   ========================================= */

@media (max-width: 768px) {

    .ecc-select {
        display: block;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        height: 52px;

        padding: 0 42px 0 14px;

        border-radius: 14px;

        font-size: 14px;
    }

    .ecc-select option {
        font-size: 14px;
    }

}


/* =========================================
   SMALL MOBILE
   <= 480px
   ========================================= */

@media (max-width: 480px) {

    .ecc-select {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        height: 50px;

        padding: 0 40px 0 13px;

        border-radius: 13px;

        font-size: 14px;
    }

    .ecc-select option {
        font-size: 14px;
    }

}


/* =========================================
   VERY SMALL MOBILE
   <= 360px
   ========================================= */

@media (max-width: 360px) {

    .ecc-select {
        width: 100%;
        height: 48px;

        padding: 0 36px 0 12px;

        border-radius: 12px;

        font-size: 13px;
    }

    .ecc-select option {
        font-size: 13px;
    }

}

/* =========================================
   RANGE SLIDER (Size) - RESPONSIVE
   ========================================= */

input[type="range"]#qrSize {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* fixed: the label wrapping the slider must also be constrained, otherwise
   the slider's parent can be pushed wide by a sibling (e.g. the style-grid)
   sharing the same implicit grid row on narrow screens */
label:has(> input#qrSize) {
  display: block;
  width: 100%;
  min-width: 0;
}

/* ============================================================
   DESKTOP PROCESS GRID
   ============================================================ */

.process-grid-desktop {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}


/* ============================================================
   MOBILE VERSION HIDDEN BY DEFAULT
   ============================================================ */

.process-grid-mobile {
    display: none;
}
/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    /* Hide desktop */
    .process-grid-desktop {
        display: none;
    }

    /* Show mobile */
    .process-grid-mobile {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .process-swiper {
        width: 100%;
        overflow: visible;
    }

    .process-swiper .swiper-wrapper {
        display: flex;
    }

    .process-swiper .swiper-slide {
        width: 86%;
        flex-shrink: 0;
    }

    .process-swiper .process-card {
        width: 100%;
    }

}
@media (min-width: 480px) and (max-width: 767px) {

    .process-swiper .swiper-slide {
        width: 75%;
    }

}