/* ui/DailyOps — the Daily Ops panel. Contract: ./DailyOps.spec.md */

.qc-ops { display: flex; flex-direction: column; gap: 10px; color: var(--qc-text); }
.qc-ops__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.qc-ops__title {
  margin: 0; font-family: var(--qc-font-display); font-weight: 600; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.qc-ops__refresh { font-family: var(--qc-font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--qc-text-dim); }
.qc-ops__missions { display: flex; flex-direction: column; gap: 10px; }
.qc-ops[data-variant="station"] { box-sizing: border-box; width: 100%; max-width: 1100px; margin-inline: auto; padding: 20px 16px 24px; }
.qc-ops[data-variant="station"] .qc-ops__missions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.qc-ops__mission {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  border-radius: 10px; background: var(--qc-glass); border: 1px solid var(--qc-line);
}
.qc-ops__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qc-ops__slot { font-family: var(--qc-font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.16em; color: var(--qc-text-faint); }
.qc-ops__reward, .qc-ops__claimed {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--qc-font-mono); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--qc-quanta);
}
.qc-ops__claimed { color: var(--qc-text-dim); text-transform: uppercase; }
.qc-ops__icon { flex: none; width: 12px; height: 12px; background: currentColor; }
.qc-ops__icon[data-icon="check"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E") center / contain no-repeat; }
.qc-ops__icon[data-icon="reroll"] { width: 14px; height: 14px; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7'/%3E%3Cpath d='M20 4v4h-4'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7'/%3E%3Cpath d='M20 4v4h-4'/%3E%3C/svg%3E") center / contain no-repeat; }
.qc-ops__text { margin: 0; font-size: 14px; line-height: 1.35; }
.qc-ops__bar { position: relative; flex: 1; height: 4px; border-radius: 2px; background: var(--qc-space-2); overflow: hidden; }
.qc-ops__fill {
  position: absolute; inset: 0 auto 0 0; border-radius: 2px;
  background: var(--qc-ops-fill, var(--qc-accent)); box-shadow: 0 0 8px var(--qc-ops-fill, var(--qc-accent));
  transition: width 500ms var(--qc-ease-out);
}
.qc-ops__count { min-width: 36px; text-align: right; font-family: var(--qc-font-mono); font-variant-numeric: tabular-nums; font-size: 12px; color: var(--qc-text-dim); }

.qc-ops__mission[data-state="complete"] {
  border-color: var(--qc-quanta);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--qc-quanta) 30%, transparent), 0 0 22px color-mix(in srgb, var(--qc-quanta) 22%, transparent);
}
.qc-ops__mission[data-state="complete"] .qc-ops__fill { background: var(--qc-quanta); box-shadow: 0 0 10px var(--qc-quanta); }
.qc-ops__mission[data-state="complete"] .qc-ops__count { color: var(--qc-quanta); }
.qc-ops__mission[data-state="claimed"] { opacity: 0.62; }
.qc-ops__mission[data-state="claimed"] .qc-ops__text { color: var(--qc-text-dim); }
.qc-ops__mission[data-state="claimed"] .qc-ops__fill { background: var(--qc-text-faint); box-shadow: none; }

.qc-ops__claim, .qc-ops__reroll, .qc-ops__line { min-height: 44px; }
/* The mockup's `.btn.claim`: the Theme's primary, lit in the currency colour
   (its glow, border and corner brackets), at the card's full width. */
.qc-ops .qc-ops__claim {
  --qc-action: var(--qc-quanta);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 0; width: 100%; height: 44px; min-height: 44px; padding: 0 16px; margin-top: 8px;
  font-family: var(--qc-font-display); font-weight: 600; font-size: 14px; line-height: 1;
  letter-spacing: 0.12em; text-indent: 0.12em; text-transform: uppercase; white-space: nowrap;
}
.qc-ops__claims { display: flex; gap: 8px; margin-top: 8px; }
.qc-ops__claims .qc-ops__claim { flex: 1; width: auto; margin-top: 0; }
.qc-ops__claim-double {
  flex: none; min-width: 64px; height: 44px; padding: 0 12px; border-radius: var(--qc-radius-sm); cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--qc-quanta) 55%, transparent);
  background: color-mix(in srgb, var(--qc-quanta) 8%, var(--qc-space-2)); color: var(--qc-quanta);
  font-family: var(--qc-font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.08em;
}
.qc-ops__claim-double:disabled { opacity: 0.5; cursor: default; }
.qc-ops .qc-ops__reroll {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; max-width: 100%; padding: 0 16px; border-radius: 22px; border: 1px solid var(--qc-line-strong); background: none;
  font-family: var(--qc-font-display); font-weight: 600; font-size: 13px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; color: var(--qc-text-dim);
}
.qc-ops .qc-ops__reroll:hover { color: var(--qc-text); }

.qc-ops__bonus {
  display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; margin-top: 4px;
  border-top: 1px solid var(--qc-line); font-size: 12px;
}
.qc-ops__grow { flex: 1; height: 1px; background: linear-gradient(90deg, var(--qc-line), transparent); }
.qc-ops__pips { display: inline-flex; gap: 10px; }
.qc-ops__bonus .qc-ops__slot { letter-spacing: 0.12em; }
.qc-ops__pip { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--qc-line-strong); }
.qc-ops__pip[data-on="true"] { background: var(--qc-quanta); border-color: var(--qc-quanta); box-shadow: 0 0 8px var(--qc-quanta); }
.qc-ops__bonus[data-state="ready"] { color: var(--qc-quanta); }
.qc-ops__bonus[data-state="claimed"] { opacity: 0.62; }

.qc-ops__line {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 0 16px;
  background: color-mix(in srgb, var(--qc-space-1) 70%, transparent); border: 0; border-bottom: 1px solid var(--qc-line);
  color: var(--qc-text); font: inherit; font-size: 12px; cursor: pointer;
}
.qc-ops__line .qc-ops__title { font-size: 13px; }
.qc-ops__line .qc-ops__pips { gap: 4px; }
.qc-ops__line .qc-ops__pip { width: 6px; height: 6px; box-shadow: 0 0 6px var(--qc-quanta); }
.qc-ops__line .qc-ops__pip[data-on="false"] { box-shadow: none; }
.qc-ops__more { margin-left: auto; color: var(--qc-text-faint); }

/* ——— the reroll confirm: a centred modal, a bottom sheet on a phone ——— */
.qc-ops-sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; }
.qc-ops-sheet__scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--qc-space-0) 70%, transparent); animation: qc-ops-fade 220ms var(--qc-ease-out); }
.qc-ops-sheet__panel {
  position: relative; width: min(420px, calc(100vw - 32px)); max-height: 90vh; overflow: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 26px 24px 22px;
  border-radius: var(--qc-radius); border: 1px solid var(--qc-line); background: var(--qc-glass); backdrop-filter: blur(8px);
  color: var(--qc-text); animation: qc-ops-rise 220ms var(--qc-ease-out); transition: transform 160ms var(--qc-ease-out);
}
.qc-ops-sheet__handle { display: none; }
.qc-ops-sheet__title {
  margin: 0; padding-right: 36px; font-family: var(--qc-font-display); font-weight: 600; font-size: 16px;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.qc-ops-sheet__text { margin: 0; font-size: 15px; line-height: 1.4; }
.qc-ops-sheet__loss { margin: 0; font-size: 13px; line-height: 1.5; color: var(--qc-text-dim); }
.qc-ops-sheet__actions { display: flex; gap: 12px; margin-top: 8px; }
.qc-ops-sheet__button { flex: 1 1 0; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; white-space: normal; overflow-wrap: break-word; text-align: center; }
.qc-ops-sheet__close {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px;
  border: 0; background: none; color: var(--qc-text-dim); font-size: 16px; cursor: pointer;
}
@keyframes qc-ops-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes qc-ops-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 599px) {
  .qc-ops[data-variant="station"] .qc-ops__claim { min-height: 56px; }
  .qc-ops-sheet { place-items: end stretch; }
  .qc-ops-sheet__panel {
    width: 100%; border-radius: var(--qc-radius) var(--qc-radius) 0 0;
    padding: 8px 20px calc(22px + env(safe-area-inset-bottom));
  }
  .qc-ops-sheet__handle { display: flex; justify-content: center; padding: 6px 0 10px; touch-action: none; cursor: grab; }
  .qc-ops-sheet__handle i { width: 36px; height: 4px; border-radius: 2px; background: var(--qc-line-strong); }
  .qc-ops-sheet__actions { flex-direction: column-reverse; }
  .qc-ops-sheet__button { min-height: 56px; }
  @keyframes qc-ops-rise { from { transform: translateY(100%); } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  .qc-ops-sheet__panel, .qc-ops-sheet__scrim { animation: none; transition: none; }
}
