/* Plist Generator — form extras */

.field-error {
  font-size: 0.82rem;
  color: #c44;
  margin-top: 0.15rem;
}

@media (prefers-color-scheme: dark) {
  .field-error { color: #f08888; }
}

.text-input.is-invalid {
  box-shadow: inset 0 0 0 1px #c44;
}

.result-box {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  box-shadow: inset 0 1px 0 0 var(--line);
  animation: rise 0.7s var(--ease-out) both;
  width: 100%;
  min-width: 0;
}

.result-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 550;
  letter-spacing: -0.025em;
  margin-bottom: 0.55rem;
}

.result-box .hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
  max-width: 48ch;
}

.share-box {
  display: grid;
  gap: 1rem;
}

.share-url {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
  word-break: break-all;
  padding: 1rem 1.1rem;
  background: var(--glow);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--fg);
}

.code-line {
  margin-top: 0.65rem !important;
  font-family: var(--mono);
  font-size: 0.78rem !important;
  word-break: break-all;
  color: var(--fg) !important;
  max-width: none !important;
}

.p12-hero {
  max-width: 720px;
}


.p12-hero {
  min-height: calc(100dvh - var(--nav-h) - 6rem);
  display: grid;
  align-content: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-top: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 720px;
  min-width: 0;
}

.p12-hero h1 {
  font-size: clamp(2.2rem, 6.5vw, 4.2rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 14ch;
  animation: rise 0.85s var(--ease-out) 0.12s both;
}

.form-stack {
  display: grid;
  gap: 1.5rem;
  animation: rise 0.9s var(--ease-out) 0.24s both;
  width: 100%;
  min-width: 0;
}

.field-block {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.field-block label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-block .hint {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.req {
  color: var(--fg);
  opacity: 0.55;
  margin-left: 0.15rem;
}

.dropzone {
  position: relative;
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.35rem 1.25rem;
  background: var(--glow);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
  min-width: 0;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.is-drag {
  background: var(--dim);
  transform: translateY(-1px);
}

.dropzone.is-filled {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.dropzone .dz-title {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  word-break: break-all;
  max-width: 100%;
}

.dropzone .dz-sub {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.text-input {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--fg);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  outline: none;
  border-radius: 0;
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.text-input:focus {
  box-shadow: inset 0 0 0 1px var(--fg);
  background: var(--glow);
}

.text-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.pass-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
}

.pass-row .text-input {
  min-width: 0;
}

.icon-btn {
  width: 52px;
  min-height: 52px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--muted);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.icon-btn:hover {
  color: var(--fg);
  background: var(--glow);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.note-box {
  padding: 1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
}

.status-panel {
  min-height: calc(100dvh - var(--nav-h) - 8rem);
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 1.25rem;
  max-width: 420px;
  margin: 0 auto;
  animation: rise 0.7s var(--ease-out) both;
}

.status-panel h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 550;
  letter-spacing: -0.03em;
}

.status-panel p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36ch;
}

.status-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px var(--line);
  margin-bottom: 0.5rem;
}

.status-mark svg {
  width: 28px;
  height: 28px;
}

.status-mark.is-ok {
  background: var(--fg);
  color: var(--bg);
  box-shadow: none;
}

.spin {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.view[data-view="form"].is-active,
.view[data-view="working"].is-active,
.view[data-view="done"].is-active,
.view[data-view="error"].is-active {
  display: block;
}

@media (max-width: 520px) {
  .p12-hero h1 {
    max-width: none;
  }
}
