.me-smart-print-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.me-smart-print-panel[hidden] {
  display: none !important;
}

.smart-print-mount {
  min-height: 0;
  overflow: auto;
  padding: 22px 24px 32px;
}

.smart-print-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  color: #18342d;
}

.smart-print-hero,
.smart-print-card,
.smart-print-test-card {
  border: 1px solid rgba(102, 143, 131, 0.2);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 18px 42px rgba(45, 84, 73, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px) saturate(132%);
  -webkit-backdrop-filter: blur(24px) saturate(132%);
}

.smart-print-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 24px;
  border-radius: 22px;
}

.smart-print-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #0b8c65;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.smart-print-hero h4,
.smart-print-test-copy h5 {
  margin: 0;
  color: #15382f;
}

.smart-print-hero h4 {
  font-size: 23px;
}

.smart-print-hero p,
.smart-print-test-copy p,
.smart-print-local-note {
  margin: 8px 0 0;
  color: #647973;
  font-size: 13px;
  line-height: 1.7;
}

.smart-print-state {
  flex: none;
  min-width: 78px;
  padding: 7px 12px;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
  background: rgba(111, 134, 127, 0.1);
  color: #64736f;
}

.smart-print-state[data-tone="success"] { color: #087553; background: rgba(16, 174, 116, 0.11); }
.smart-print-state[data-tone="warning"] { color: #9a6714; background: rgba(227, 164, 55, 0.14); }
.smart-print-state[data-tone="error"] { color: #ad433b; background: rgba(219, 78, 68, 0.12); }

.smart-print-card,
.smart-print-test-card {
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: 20px;
}

.smart-print-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(92, 128, 117, 0.15);
}

.smart-print-card-head div span,
.smart-print-field > span {
  display: block;
  margin-bottom: 5px;
  color: #72867f;
  font-size: 12px;
}

.smart-print-card-head strong {
  display: block;
  font-size: 17px;
}

.smart-print-card-head > span {
  max-width: 330px;
  color: #687d76;
  font-size: 12px;
  line-height: 1.55;
  text-align: right;
}

.smart-print-field {
  display: block;
  margin-top: 18px;
}

.smart-print-field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(91, 132, 119, 0.25);
  border-radius: 11px;
  outline: none;
  background: rgba(255, 255, 255, 0.78);
  color: #17382f;
  font: inherit;
  cursor: pointer;
}

.smart-print-field select:focus-visible {
  border-color: rgba(6, 145, 101, 0.68);
  box-shadow: 0 0 0 3px rgba(20, 164, 116, 0.1);
}

.smart-print-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.smart-print-capability {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(105, 128, 121, 0.09);
  color: #75837f;
  font-size: 12px;
}

.smart-print-capability.is-ready {
  color: #087553;
  background: rgba(14, 154, 105, 0.1);
}

.smart-print-actions,
.smart-print-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.smart-print-confirm-actions[hidden] {
  display: none !important;
}

.smart-print-actions > div,
.smart-print-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-print-printer-selection {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(91, 132, 119, 0.18);
  border-radius: 11px;
  background: rgba(244, 249, 247, 0.74);
  color: #536e65;
  font-size: 12px;
}

.smart-print-printer-selection > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.smart-print-printer-selection strong {
  overflow: hidden;
  color: #24483e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-print-printer-selection > div > span {
  flex: none;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(10, 148, 104, 0.1);
  color: #087553;
}

.smart-print-printer-selection p { margin: 0; line-height: 1.55; }
.smart-print-printer-selection.is-compatible { border-color: rgba(10, 148, 104, 0.24); }
.smart-print-printer-selection.is-blocked {
  border-color: rgba(181, 112, 45, 0.24);
  background: rgba(255, 247, 234, 0.78);
  color: #82582d;
}
.smart-print-printer-selection.is-empty { color: #6d7e79; }

.smart-print-actions button,
.smart-print-confirm-actions button {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(78, 113, 102, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  color: #29453d;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.smart-print-actions button.smart-print-primary,
.smart-print-confirm-actions button.smart-print-primary {
  border-color: #0a9468;
  background: #0a9468;
  color: #fff;
}

.smart-print-actions button:disabled,
.smart-print-confirm-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.smart-print-test-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.smart-print-test-card.is-active {
  border-color: rgba(16, 151, 103, 0.34);
}

.smart-print-test-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  min-height: 118px;
  padding: 13px;
  border-radius: 15px;
  background: rgba(232, 239, 236, 0.72);
}

.smart-print-test-visual > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  aspect-ratio: 210 / 297;
  border: 1px solid rgba(74, 107, 97, 0.25);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 16px rgba(53, 84, 75, 0.12);
  color: #6c7d78;
  font-size: 11px;
}

.smart-print-test-visual > span.a5 { width: 38px; }
.smart-print-test-visual strong { margin-top: 3px; color: #0b7f5c; font-size: 12px; }
.smart-print-test-copy h5 { font-size: 17px; }

.smart-print-feedback {
  margin: 14px 2px 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.55;
}

.smart-print-feedback.is-error { color: #a93e37; background: rgba(220, 75, 65, 0.1); }
.smart-print-feedback.is-success { color: #087553; background: rgba(16, 167, 111, 0.1); }
.smart-print-feedback.is-warning { color: #936316; background: rgba(226, 164, 58, 0.12); }

@media (max-width: 720px) {
  .smart-print-mount { padding: 14px 12px 26px; }
  .smart-print-hero { padding: 20px 18px; }
  .smart-print-card,
  .smart-print-test-card { padding: 18px; }
  .smart-print-card-head { align-items: flex-start; flex-direction: column; }
  .smart-print-card-head > span { max-width: none; text-align: left; }
  .smart-print-test-card { grid-template-columns: 1fr; gap: 16px; }
  .smart-print-actions > div,
  .smart-print-confirm-actions { width: 100%; }
  .smart-print-actions button,
  .smart-print-confirm-actions button { flex: 1 1 auto; }
}
