/* Modal de entrega — visual da KeyWorld */

.dialog .dialog-panel {
  background: rgb(var(--background) / 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45) !important;
  overflow: hidden;
  contain: layout paint;
  transform: translateZ(0);
}

.dialog .dialog-panel-inner {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dialog .dialog-panel-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.dialog .dialog-close-btn {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: rgba(255, 255, 255, 0.04);
}

.dialog .dialog-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---------- cartão da chave ---------- */

.delivery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.delivery__keycard {
  padding: 1rem 1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 80% at 0% 0%, hsl(var(--primary) / 0.16), transparent 55%),
    rgba(255, 255, 255, 0.03);
}

.delivery__keycard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.delivery__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--primary));
}

.delivery__eyebrow svg {
  width: 0.85rem;
  height: 0.85rem;
}

.delivery__status {
  font-size: 0.7rem;
  font-weight: 600;
  color: #4ade80;
}

.dialog-panel .license-key-box,
.delivery .license-key-box {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 0.75rem !important;
  background: rgba(8, 9, 12, 0.55) !important;
  box-shadow: none !important;
  overflow: hidden;
}

.dialog-panel .license-key-inner {
  background: transparent !important;
}

.license-key-row,
[data-license-group] .license-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
}

[data-license-group] .license-key {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f4f6fb;
}

.license-key-copy-btn {
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 2rem !important;
  width: auto !important;
  min-width: 5.6rem;
  padding: 0 0.7rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
  background: #f7f7f8 !important;
  color: #111113 !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.license-key-copy-btn:hover {
  filter: brightness(0.96);
}

.license-key-copy-btn:disabled {
  opacity: 1 !important;
  filter: none;
  cursor: default;
}

.license-key-copy-btn[data-is-copied="true"] {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: rgba(4, 120, 87, 0.22) !important;
  filter: none;
}

.license-key-copy-btn .license-key-copy-svg {
  display: block;
  width: 13px;
  height: 13px;
  pointer-events: none;
  flex-shrink: 0;
}

.license-key-copy-btn [data-copied-icon] {
  display: none;
}

.license-key-copy-btn[data-is-copied="true"] [data-copy-icon] {
  display: none;
}

.license-key-copy-btn[data-is-copied="true"] [data-copied-icon] {
  display: block;
}

/* ---------- guia de ativação ---------- */

.delivery__guide {
  padding: 0.2rem 0 0.1rem;
  border: 0;
  background: transparent;
}

.delivery-message-content:not(.is-ready) {
  opacity: 0.28;
}

.delivery-message-content.is-ready {
  opacity: 1;
  transition: opacity 0.35s ease;
}

.kw-guide {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.kw-guide__hero {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  padding: 0;
}

.kw-guide__badge {
  display: inline-flex;
  align-items: center;
  height: 1.5rem;
  padding: 0 0.65rem;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.14);
  border: 1px solid hsl(var(--primary) / 0.28);
  color: var(--brand-soft);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kw-guide__hero h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.kw-guide__hero p {
  display: none;
}

.kw-guide__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.kw-guide__step,
.kw-guide__diag {
  animation: kwGuideIn 0.45s ease both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

@keyframes kwGuideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.kw-guide__step {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.8rem 0.85rem 0.85rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 90% at 0% 0%, hsl(var(--primary) / 0.16), transparent 52%),
    rgba(255, 255, 255, 0.03);
}

.kw-guide__step-num {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: hsl(var(--primary) / 0.22);
  box-shadow: inset 0 0 0 1px hsl(var(--primary) / 0.28);
  color: var(--brand-soft);
  font-size: 0.84rem;
  font-weight: 800;
}

.kw-guide__step-body h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
}

.kw-guide__step-body p {
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.68);
}

.kw-guide__step-body p:last-child {
  margin-bottom: 0;
}

.kw-guide__kbd {
  display: inline;
  padding: 0.12em 0.38em;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 9, 12, 0.7);
  color: #fff;
  font-family: inherit;
  font-size: 0.92em;
  font-weight: 700;
  line-height: inherit;
  white-space: nowrap;
}

.kw-guide__plus {
  margin: 0 0.12rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.kw-guide__actions {
  list-style: none !important;
  margin: 0.55rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.kw-guide__action {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 9, 12, 0.42);
}

.kw-guide__action-num {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.2);
  color: var(--brand-soft);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.kw-guide__action-text {
  margin: 0 !important;
  flex: 1;
  min-width: 0;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  color: rgba(255, 255, 255, 0.86) !important;
}

.kw-guide__cmd {
  margin-top: 0.5rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(var(--brand-rgb), 0.24);
  background: #0b0c10;
  box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), 0.06);
  overflow: hidden;
}

.kw-guide__cmd + .kw-guide__cmd {
  margin-top: 0.55rem;
}

.kw-guide__cmd-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem 0;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.48);
}

.kw-guide__cmd-tag {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.2);
  color: var(--brand-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kw-guide__cmd-tag--alt {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

.kw-guide__cmd-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.7rem 0.6rem;
}

.kw-guide__cmd-row code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: #e8edf7;
  word-break: break-all;
}

.kw-guide__copy,
.delivery-cmd__copy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.9rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.5rem;
  background: #f7f7f8;
  color: #111113;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.kw-guide__copy:hover,
.delivery-cmd__copy:hover {
  transform: translateY(-1px);
}

.kw-guide__copy[data-is-copied="true"],
.delivery-cmd__copy[data-is-copied="true"],
.kw-guide__copy:disabled,
.delivery-cmd__copy:disabled {
  background: #ecfdf5;
  color: #047857;
  transform: none;
  cursor: default;
}

.kw-guide__alert {
  margin-top: 0.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
  font-size: 0.78rem;
  line-height: 1.5;
}

.kw-guide__alert strong {
  color: #facc15;
}

.kw-guide__diag {
  padding: 0;
  border-radius: 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.kw-guide__diag-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  list-style: none;
}

.kw-guide__diag-head::-webkit-details-marker {
  display: none;
}

.kw-guide__diag-head::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-left: auto;
  border-right: 1.6px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1.6px solid rgba(255, 255, 255, 0.42);
  transform: rotate(45deg);
}

.kw-guide__diag[open] .kw-guide__diag-head::after {
  transform: translateY(2px) rotate(-135deg);
}

.kw-guide__diag-list {
  padding: 0 0.85rem 0.85rem;
}

.kw-guide__diag-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.7rem;
  background: rgba(251, 191, 36, 0.14);
  color: #facc15;
  font-size: 0.95rem;
  font-weight: 800;
}

.kw-guide__diag-head h3 {
  margin: 0.1rem 0 0.2rem;
  font-size: 0.92rem;
  font-weight: 750;
  color: #fff;
}

.kw-guide__diag-head p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.55);
}

.kw-guide__error {
  border-radius: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 9, 12, 0.35);
  overflow: hidden;
}

.kw-guide__error + .kw-guide__error {
  margin-top: 0.5rem;
}

.kw-guide__error summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  list-style: none;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.kw-guide__error summary::-webkit-details-marker {
  display: none;
}

.kw-guide__error summary::after {
  content: '';
  width: 0.42rem;
  height: 0.42rem;
  margin-left: auto;
  border-right: 1.6px solid rgba(255, 255, 255, 0.42);
  border-bottom: 1.6px solid rgba(255, 255, 255, 0.42);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.kw-guide__error[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.kw-guide__error-code {
  flex-shrink: 0;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  background: rgba(248, 113, 113, 0.14);
  color: #fca5a5;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kw-guide__error-body {
  padding: 0 0.85rem 0.85rem;
}

.kw-guide__error-body p {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.66);
}

.kw-guide__causes-label {
  margin: 0.55rem 0 0.3rem !important;
  font-size: 0.68rem !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45) !important;
}

.kw-guide__error-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.kw-guide__error-body li {
  position: relative;
  margin: 0 0 0.35rem;
  padding-left: 0.85rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
}

.kw-guide__error-body li::before {
  content: '';
  position: absolute;
  top: 0.5rem;
  left: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: hsl(var(--primary));
}

.delivery .centralcart-content,
.dialog-panel .centralcart-content {
  color: rgb(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.6;
}

.delivery .centralcart-content h1,
.delivery .centralcart-content h2,
.dialog-panel .centralcart-content h1,
.dialog-panel .centralcart-content h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.delivery .centralcart-content h3,
.delivery .centralcart-content h4,
.dialog-panel .centralcart-content h3,
.dialog-panel .centralcart-content h4 {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.delivery .centralcart-content p,
.dialog-panel .centralcart-content p {
  margin: 0 0 0.7rem;
}

.delivery .centralcart-content strong,
.dialog-panel .centralcart-content strong,
.delivery .centralcart-content b,
.dialog-panel .centralcart-content b {
  color: #fff;
  font-weight: 700;
}

.delivery-cmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin: 0.45rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(var(--brand-rgb), 0.22);
  background: #0b0c10;
  color: #e8edf7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
}

.delivery__download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.delivery-step-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0 0.4rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.delivery-step-title__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  background: hsl(var(--primary) / 0.2);
  color: var(--brand-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .kw-guide__step {
    gap: 0.7rem;
    padding: 0.85rem 0.8rem 0.9rem;
  }

  .kw-guide__cmd-row {
    flex-wrap: wrap;
  }

  .kw-guide__copy {
    margin-left: auto;
  }
}
