/* nimiq.cool — claim + unstake action composition (issue #10).
   Split out of app.css to keep each file under the 800-line house limit. Layered
   on top of @nimiq/style (legacy, html{font-size:8px}) — all custom rules in PX so
   the 8px-root rem trap never doubles a value. Reuses the same Nimiq design tokens
   (var(--ink), --grey-card, --hairline, --nq-green-text) defined in app.css. */

/* ---- actions: claim + unstake (#10) ---- */

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hairline);
}

.actions__block {
  background: var(--grey-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.actions__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.actions__sub {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-60);
  text-wrap: pretty;
}

/* Push each block's primary control to the bottom so the two columns align. */
.actions__claim,
.unstake__submit {
  margin-top: auto;
}

/* The claim button carries the live claimable figure inline. */
.actions__claim {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: auto 0 0;
}

.actions__claim[disabled] {
  opacity: 0.55;
  cursor: progress;
  box-shadow: none;
  transform: none;
}

.actions__claim-amt {
  font-family: "Fira Mono", monospace;
  font-weight: 500;
}

.actions__claim-amt .currency {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 3px;
}

/* unstake form */

.unstake__label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-60);
}

.unstake__amount-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

/* .nq-input draws its inset box-shadow border (rule 1) — only size + Fira Mono. */
.unstake__amount {
  width: 100%;
  height: 52px;
  padding: 0 60px 0 16px;
  font-family: "Fira Mono", monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
}

.unstake__amount::-webkit-outer-spin-button,
.unstake__amount::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.unstake__amount {
  appearance: textfield;
  -moz-appearance: textfield;
}

.unstake__amount::placeholder {
  color: var(--ink-40);
}

.unstake__ticker {
  position: absolute;
  right: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-40);
  pointer-events: none;
}

/* .nq-button-s is the small secondary capsule (rgba navy tint) — left-align it. */
.unstake__max {
  align-self: flex-start;
  margin: 12px 0 16px;
}

.unstake__submit {
  display: block;
  width: 100%;
  min-width: 0;
  margin: auto 0 0;
}

.unstake__submit[disabled] {
  opacity: 0.55;
  cursor: progress;
  box-shadow: none;
  transform: none;
}

/* unstake pending spinner */

.unstake__pending {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.unstake__pending[hidden] {
  display: none;
}

.unstake__spin {
  color: var(--nq-light-blue);
  flex: none;
}

.unstake__pending-text {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-60);
}

/* action result alerts — sit flush inside the card (neutralise registry bleed). */
.action__alert {
  margin: 20px 0 0;
  transform: none;
  width: 100%;
}

.action__alert[hidden] {
  display: none;
}

.action__alert p:last-of-type {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

/* honest cooldown disclosure inside the unstake-success alert */

.cooldown {
  margin-top: 16px;
}

.cooldown__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.cooldown__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-60);
}

.cooldown__eta {
  font-family: "Fira Mono", monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
}

.cooldown__date {
  font-family: "Fira Mono", monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}

.cooldown__honest {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-60);
  text-wrap: pretty;
}

/* ============================ RESPONSIVE ============================ */

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