/* ==================================================================
   OAUTH CONSENT — one card on the desk, nothing else on screen
   Tokens only; no hardcoded colours (see :root in styles.css).
   ================================================================== */

.consent-scrim {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  overflow-y: auto;
  background: var(--bg);
}

/* A manila folder lifted onto the desk: the tab, the warm stock, the shadow. */
.consent-card {
  position: relative;
  width: min(560px, 100%);
  margin: 40px 0;
  padding: 32px 34px 26px;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.consent-tab {
  position: absolute;
  top: -22px;
  left: 26px;
  padding: 5px 18px 7px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--manila-text);
  background: var(--manila);
  border: 1px solid var(--manila-edge);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

.consent-header h1 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.consent-subtitle {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-dim);
}

.consent-verified {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 12px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-dim);
  border-radius: 999px;
}

/* The unfamiliar-app warning is a sticky note, not a red alert bar: it is a
   caution the founder should read, not an error they have made. */
.consent-sticky {
  display: block;
  margin-top: 16px;
  padding: 14px 16px;
  font-family: var(--hand);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--sticky);
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-0.5deg);
}

.consent-identity {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--text-muted);
}

.consent-linkbtn,
.consent-link {
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  background: none;
  border: none;
  cursor: pointer;
}

.consent-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.consent-section h2 {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.consent-label {
  display: block;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.consent-select {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.consent-help {
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
}

.consent-reads {
  margin: 12px 0 0;
  padding-left: 18px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.consent-reads li { margin-bottom: 6px; }

.consent-write {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}

.consent-write:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.consent-write-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.consent-write-hint {
  margin: 6px 0 0 26px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

.consent-deadend {
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-dim);
}

.consent-footer {
  margin-top: 26px;
  padding-top: 18px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

.consent-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.consent-primary,
.consent-secondary {
  padding: 11px 22px;
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 140ms var(--spring), box-shadow 140ms var(--ease);
}

/* The leather button on the desk. */
.consent-primary {
  color: var(--accent-contrast);
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow-sm);
}

.consent-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.consent-primary:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.consent-secondary {
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
}

.consent-secondary:hover:not(:disabled) { transform: translateY(-1px); }

.consent-error {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--red);
  text-align: right;
}

.consent-card-error h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
}

.consent-card-error p {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
}

@media (max-width: 560px) {
  .consent-card { padding: 26px 20px 20px; }
  .consent-header h1 { font-size: 21px; }
  .consent-actions { flex-direction: column-reverse; }
  .consent-primary,
  .consent-secondary { width: 100%; }
}
