/* PWS QR Generator - Public */

/* Theme-proofing: many themes aggressively style buttons/inputs. We scope resets to the widget only. */
.pwsqr, .pwsqr *{box-sizing:border-box;}
.pwsqr{color:var(--pwsqr-text);}
.pwsqr button, .pwsqr input, .pwsqr textarea{font: inherit; line-height:1.25;}
.pwsqr button{appearance:none; -webkit-appearance:none; background:none;}
/* QR icon fallback (Dashicons doesn't include a qrcode glyph) */
.pwsqr .dashicons.dashicons-qrcode{
  width:20px;
  height:20px;
  display:inline-block;
  background-color: currentColor;
  -webkit-mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3%203h8v8H3V3zm2%202v4h4V5H5zm10-2h8v8h-8V3zm2%202v4h4V5h-4zM3%2013h8v8H3v-8zm2%202v4h4v-4H5zm10%200h2v2h-2v-2zm2%202h2v2h-2v-2zm-2%202h2v2h-2v-2zm4-4h2v2h-2v-2zm0%204h2v2h-2v-2z%22%2F%3E%3C%2Fsvg%3E') no-repeat center / contain;
  mask: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20d%3D%22M3%203h8v8H3V3zm2%202v4h4V5H5zm10-2h8v8h-8V3zm2%202v4h4V5h-4zM3%2013h8v8H3v-8zm2%202v4h4v-4H5zm10%200h2v2h-2v-2zm2%202h2v2h-2v-2zm-2%202h2v2h-2v-2zm4-4h2v2h-2v-2zm0%204h2v2h-2v-2z%22%2F%3E%3C%2Fsvg%3E') no-repeat center / contain;
}
.pwsqr .dashicons.dashicons-qrcode:before{content:"";}


.pwsqr__shell{
  width:100%;
  max-width: var(--pwsqr-container-max);
  margin: 0 auto;
  background: transparent;
}

/* If container max is 'none', keep it full width */
.pwsqr__shell{max-width: var(--pwsqr-container-max);}

.pwsqr__types{
  display:grid !important;
  /* Type selector: 10 items per row on wide screens, responsive down */
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 12px;
  width:100%;
  margin: 0 0 18px 0;
}

/* Make the top row behave like an icon bar: compact, no descriptions */
.pwsqr__types .pwsqr__tile{align-items:center !important; text-align:center; padding: 10px !important; min-height: 74px;}
.pwsqr__types .pwsqr__tileIcon{margin: 0 auto; width: 32px; height: 32px; border-radius: 10px !important;}
.pwsqr__types .pwsqr__tileTitle{width:100%; text-align:center; font-size: 12px;}
.pwsqr__types .pwsqr__tileDesc{display:none !important;}

.pwsqr__main{
  display:grid !important;
  grid-template-columns: 3fr 2fr; /* 60/40 */
  gap: 18px;
  width:100%;
}

.pwsqr__col{min-width:0;}

.pwsqr__card{
  background: var(--pwsqr-bg) !important;
  border: 1px solid var(--pwsqr-border) !important;
  border-radius: var(--pwsqr-radius) !important;
  box-shadow: var(--pwsqr-shadow) !important;
  padding: 18px !important;
}

.pwsqr__previewCard{position:sticky; top: 18px;}

.pwsqr__cardHead{margin-bottom: 14px;}
.pwsqr__h3{margin:0 0 6px 0; font-size: 18px; line-height: 1.2;}
.pwsqr__muted{margin:0; color: var(--pwsqr-muted); font-size: 13px;}

.pwsqr__divider{height:1px; background: var(--pwsqr-border); margin: 16px 0;}

.pwsqr__sectionTitle{font-weight:600; font-size:13px; margin-bottom:10px;}

.pwsqr__tile{
  text-align:left;
  border: 1px solid var(--pwsqr-border) !important;
  background: var(--pwsqr-bg) !important;
  border-radius: calc(var(--pwsqr-radius) - 4px) !important;
  padding: 12px !important;
  cursor:pointer;
  transition: transform .08s ease, border-color .12s ease, background-color .12s ease;
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  gap: 6px !important;
  min-height: 78px;
  color: var(--pwsqr-text) !important;
  box-shadow: none !important;
  text-decoration:none !important;
}

.pwsqr__tile:hover{transform: translateY(-1px);}

.pwsqr__tile.is-active{
  border-color: var(--pwsqr-primary) !important;
  background: #fff !important;
}

.pwsqr__tileIcon{color: var(--pwsqr-primary) !important; display:inline-flex; align-items:center; justify-content:center; width: 34px; height: 34px; border-radius: 10px !important; background: var(--pwsqr-surface) !important;}
.pwsqr__tileIcon svg{display:block; width:22px; height:22px;}
.pwsqr__tileTitle{display:block; font-weight:700 !important; font-size: 14px;}
.pwsqr__tileDesc{display:block; color: var(--pwsqr-muted) !important; font-size: 12px; line-height: 1.25;}

.pwsqr__sizes{display:grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 12px;}
.pwsqr__size{min-height: 70px; text-align:center; align-items:center;}
.pwsqr__size .pwsqr__tileIcon{margin: 0 auto;}
.pwsqr__size .pwsqr__tileTitle{text-align:center; width:100%;}
.pwsqr__size .pwsqr__tileDesc{text-align:center; width:100%;}

.pwsqr__label{display:block; font-size:12px; font-weight:600; margin: 0 0 6px 0;}
.pwsqr__input, .pwsqr__textarea{
  width:100%;
  border: 1px solid var(--pwsqr-border) !important;
  border-radius: 12px !important;
  padding: 11px 12px !important;
  background: var(--pwsqr-bg) !important;
  color: var(--pwsqr-text) !important;
  outline: none;
  box-sizing:border-box;
}
.pwsqr__textarea{min-height: 110px; resize: vertical;}
.pwsqr__input:focus, .pwsqr__textarea:focus{border-color: var(--pwsqr-primary) !important; box-shadow: 0 0 0 3px rgba(0,0,0,.06) !important;}

.pwsqr__field{margin-bottom: 12px;}
.pwsqr__help{margin: 6px 0 0 0; color: var(--pwsqr-muted); font-size: 12px;}

.pwsqr__preview{
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--pwsqr-surface);
  border: 1px dashed var(--pwsqr-border);
  border-radius: 16px;
  padding: 18px;
  min-height: 280px;
}

.pwsqr__qr canvas, .pwsqr__qr img{display:block; max-width:100%; height:auto; border-radius: 12px; background:#fff;}

.pwsqr__actions{display:flex; gap: 12px; margin-top: 14px; flex-wrap: wrap;}

.pwsqr__btn{
  appearance:none;
  border: 1px solid var(--pwsqr-primary) !important;
  background: var(--pwsqr-primary) !important;
  color: var(--pwsqr-primary-text) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  font-weight: 700;
  cursor:pointer;
  transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
  box-shadow:none !important;
  text-decoration:none !important;
}
.pwsqr__btn[disabled]{opacity:.55; cursor:not-allowed; transform:none !important;}
.pwsqr__btn[disabled]:hover{background: var(--pwsqr-primary) !important; border-color: var(--pwsqr-primary) !important; transform:none !important;}
.pwsqr__btn:hover{background: var(--pwsqr-primary-hover) !important; border-color: var(--pwsqr-primary-hover) !important; transform: translateY(-1px);}
.pwsqr__btn:active{transform: translateY(0);}

.pwsqr__btn--ghost{
  background: transparent !important;
  color: var(--pwsqr-text) !important;
  border-color: var(--pwsqr-border) !important;
}
.pwsqr__btn--ghost:hover{background: var(--pwsqr-surface) !important; border-color: var(--pwsqr-border) !important;}

.pwsqr__note{margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--pwsqr-surface); border: 1px solid var(--pwsqr-border); font-size: 12px;}

/* Responsive */
@media (max-width: 1400px){
  .pwsqr__types{grid-template-columns: repeat(5, minmax(0,1fr));}
  .pwsqr__sizes{grid-template-columns: repeat(4, minmax(0,1fr));}
}

@media (max-width: 840px){
  .pwsqr__main{grid-template-columns: 1fr;}
  .pwsqr__previewCard{position:static;}
  .pwsqr__types{grid-template-columns: repeat(3, minmax(0,1fr));}
  .pwsqr__sizes{grid-template-columns: repeat(3, minmax(0,1fr));}
}

@media (max-width: 520px){
  .pwsqr__types{grid-template-columns: repeat(2, minmax(0,1fr));}
  .pwsqr__sizes{grid-template-columns: repeat(2, minmax(0,1fr));}
}

@media (max-width: 360px){
  .pwsqr__types{grid-template-columns: 1fr;}
}
