/* SwitchCrew 2.0 — mobile action pages (mark availability / accept-decline) */

.sc-action-page {
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(227, 28, 37, 0.14), transparent 55%),
    var(--sc-bg);
  color: var(--sc-text);
  font-family: var(--sc-font);
}

.sc-action {
  max-width: 440px;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 3rem;
}

.sc-action-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 1.75rem;
}

.sc-action-brand img {
  height: 28px;
  width: auto;
}

.sc-action-brand-name {
  font-family: var(--sc-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.sc-action-brand-name span {
  color: var(--sc-red);
}

.sc-action-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sc-text-faint);
  margin-bottom: 0.55rem;
}

.sc-action-title {
  font-family: var(--sc-display);
  font-size: clamp(1.7rem, 6vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.45rem;
}

.sc-action-meta {
  color: var(--sc-text-muted);
  font-size: 0.98rem;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.sc-action-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--sc-border);
  background: var(--sc-bg-soft);
  color: var(--sc-text-muted);
  font-size: 0.82rem;
  margin: 0.85rem 0 1.1rem;
}

.sc-action-change {
  margin: 0 0 1.15rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--sc-red) 28%, var(--sc-border));
  background: color-mix(in srgb, var(--sc-red) 7%, var(--sc-bg-elevated));
}

.sc-action-change-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-red);
  margin-bottom: 0.25rem;
}

.sc-action-change-headline {
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 0.65rem;
}

.sc-action-change-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.sc-action-change-list li {
  display: grid;
  gap: 0.15rem;
}

.sc-action-change-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--sc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sc-action-change-values {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

.sc-action-change-was {
  color: var(--sc-text-muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.sc-action-change-arrow {
  color: var(--sc-text-faint);
  font-weight: 600;
}

.sc-action-change-now {
  font-weight: 700;
  color: var(--sc-text);
}

.sc-action-change-note {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--sc-text-muted);
}

.sc-action-card {
  background: var(--sc-bg-elevated);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.sc-action-grid {
  display: grid;
  gap: 0.75rem;
}

.sc-action-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 14px;
  min-height: 64px;
  padding: 0.95rem 1.1rem;
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
  width: 100%;
}

.sc-action-btn:active {
  transform: scale(0.98);
}

.sc-action-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sc-action-btn-primary {
  background: var(--sc-red);
  color: #fff;
  box-shadow: 0 10px 28px var(--sc-red-glow);
}

.sc-action-btn-primary:hover {
  background: var(--sc-red-dark);
}

.sc-action-btn-ghost {
  background: var(--sc-bg-soft);
  color: var(--sc-text);
  border-color: var(--sc-border);
}

.sc-action-btn-danger {
  background: color-mix(in srgb, var(--sc-red) 12%, var(--sc-bg-elevated));
  color: var(--sc-red);
  border-color: color-mix(in srgb, var(--sc-red) 35%, var(--sc-border));
}

.sc-action-note {
  font-size: 0.85rem;
  color: var(--sc-text-faint);
  margin-top: 1.25rem;
}

.sc-action-input {
  width: 100%;
  border: 1px solid var(--sc-border);
  background: var(--sc-bg);
  color: var(--sc-text);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  margin: 0.65rem 0 0.85rem;
}

.sc-action-input:focus {
  outline: none;
  border-color: var(--sc-red);
  box-shadow: 0 0 0 3px var(--sc-red-glow);
}

.sc-action-decline {
  display: none;
  margin-top: 0.25rem;
}

.sc-action-decline.is-open {
  display: block;
  animation: sc-action-rise 280ms ease both;
}

.sc-mark-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.sc-mark-item {
  background: var(--sc-bg-elevated);
  border: 1px solid var(--sc-border);
  border-radius: var(--sc-radius);
  padding: 0.95rem 1rem;
  display: grid;
  gap: 0.75rem;
  transition: opacity 220ms ease, transform 220ms ease;
}

.sc-mark-item.is-saving {
  opacity: 0.65;
  pointer-events: none;
}

.sc-mark-item.is-done {
  animation: sc-action-rise 280ms ease both;
}

.sc-mark-item-title {
  font-weight: 650;
  font-size: 1.02rem;
  line-height: 1.25;
}

.sc-mark-item-meta {
  color: var(--sc-text-muted);
  font-size: 0.88rem;
  margin-top: 0.2rem;
}

.sc-mark-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.sc-mark-mini {
  appearance: none;
  border: 1px solid var(--sc-border);
  border-radius: 12px;
  min-height: 46px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  background: var(--sc-bg-soft);
  color: var(--sc-text);
}

.sc-mark-mini-yes {
  background: var(--sc-red);
  border-color: var(--sc-red);
  color: #fff;
}

.sc-mark-mini-no {
  background: var(--sc-bg-soft);
}

.sc-mark-item-done {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--sc-text-muted);
}

.sc-mark-item-done.is-yes {
  color: var(--sc-red);
}

.sc-mark-item.is-done .sc-mark-item-actions {
  display: none;
}

.sc-mark-item.is-done .sc-mark-item-done,
.sc-mark-item-done:not([hidden]) {
  display: flex;
}

.sc-mark-change {
  appearance: none;
  border: 1px solid var(--sc-border);
  background: var(--sc-bg);
  color: var(--sc-text);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.sc-mark-item.is-flash {
  animation: sc-mark-pulse 480ms ease;
}

@keyframes sc-mark-pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  40% { transform: scale(1.015); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sc-red) 22%, transparent); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
}

.d-none,
[hidden] {
  display: none !important;
}

/* Success celebration */
.sc-action-success {
  text-align: center;
  padding: 1.5rem 0.5rem 0.5rem;
}

.sc-action-burst {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--sc-red) 12%, var(--sc-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--sc-red) 28%, var(--sc-border));
  position: relative;
  animation: sc-action-pop 520ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sc-action-burst::before,
.sc-action-burst::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--sc-red) 35%, transparent);
  animation: sc-action-ring 700ms ease-out both;
}

.sc-action-burst::after {
  inset: -18px;
  animation-delay: 90ms;
  opacity: 0.55;
}

.sc-action-check {
  width: 36px;
  height: 36px;
  stroke: var(--sc-red);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: sc-action-draw 480ms 180ms ease forwards;
}

.sc-action-x {
  width: 36px;
  height: 36px;
  stroke: var(--sc-text-muted);
  stroke-width: 3;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sc-action-x line {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: sc-action-draw 360ms 160ms ease forwards;
}

.sc-action-x line:last-child {
  animation-delay: 260ms;
}

.sc-action-burst.is-negative {
  background: color-mix(in srgb, var(--sc-text-muted) 14%, var(--sc-bg-elevated));
  border-color: color-mix(in srgb, var(--sc-text-muted) 35%, var(--sc-border));
}

.sc-action-burst.is-negative::before,
.sc-action-burst.is-negative::after {
  border-color: color-mix(in srgb, var(--sc-text-muted) 40%, transparent);
}

.sc-action-success.is-negative h2 {
  color: var(--sc-text);
}

.sc-action-success h2 {
  font-family: var(--sc-display);
  font-size: 1.85rem;
  margin: 0 0 0.4rem;
  animation: sc-action-rise 420ms 120ms ease both;
}

.sc-action-success p {
  color: var(--sc-text-muted);
  margin: 0 0 1.35rem;
  animation: sc-action-rise 420ms 180ms ease both;
}

.sc-action-error {
  background: color-mix(in srgb, var(--sc-red) 10%, var(--sc-bg-elevated));
  border: 1px solid color-mix(in srgb, var(--sc-red) 30%, var(--sc-border));
  color: var(--sc-text);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

@keyframes sc-action-pop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes sc-action-ring {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes sc-action-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes sc-action-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.sc-action-textarea {
  width: 100%;
  border: 1px solid var(--sc-border);
  border-radius: 12px;
  background: var(--sc-bg-elevated, var(--sc-bg));
  color: var(--sc-text);
  padding: 0.75rem 0.85rem;
  font: inherit;
  resize: vertical;
  min-height: 5rem;
}
.sc-mark-item-note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--sc-text-muted);
  font-style: italic;
}
.sc-note-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 1rem;
  background: rgba(0,0,0,0.45);
}
.sc-note-sheet[hidden] { display: none !important; }
.sc-note-sheet-card {
  width: min(100%, 440px);
  background: var(--sc-bg-elevated, var(--sc-bg));
  border: 1px solid var(--sc-border);
  border-radius: 18px 18px 14px 14px;
  padding: 1.15rem;
  box-shadow: 0 -12px 40px rgba(0,0,0,0.25);
}
.sc-note-sheet-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

/* Poll quick page */
.sc-poll-question {
  animation: sc-action-rise 420ms ease both;
}

.sc-poll-form {
  margin-top: 0.35rem;
}

.sc-poll-options {
  display: grid;
  gap: 0.7rem;
}

.sc-poll-option {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  min-height: 68px;
  padding: 0.95rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--sc-border);
  background: var(--sc-bg-elevated);
  color: var(--sc-text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--sc-shadow);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  animation: sc-poll-in 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.sc-poll-option:hover {
  border-color: color-mix(in srgb, var(--sc-red) 40%, var(--sc-border));
  transform: translateY(-1px);
}

.sc-poll-option:active,
.sc-poll-option.is-picking {
  transform: scale(0.98);
}

.sc-poll-option.is-selected {
  border-color: color-mix(in srgb, var(--sc-red) 55%, var(--sc-border));
  background: color-mix(in srgb, var(--sc-red) 9%, var(--sc-bg-elevated));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--sc-red) 18%, transparent);
}

.sc-poll-option:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sc-poll-option-index {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sc-red);
  background: color-mix(in srgb, var(--sc-red) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc-red) 28%, transparent);
}

.sc-poll-option-label {
  font-size: 1.05rem;
  line-height: 1.3;
}

.sc-poll-description {
  white-space: normal;
  margin-bottom: 1rem;
  animation: sc-action-rise 420ms 60ms ease both;
}

.sc-poll-other {
  display: none;
  margin-top: 0.85rem;
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--sc-red) 28%, var(--sc-border));
  background: color-mix(in srgb, var(--sc-red) 6%, var(--sc-bg-elevated));
}

.sc-poll-other.is-open {
  display: block;
  animation: sc-action-rise 280ms ease both;
}

.sc-poll-other .sc-action-note {
  margin-top: 0;
}

.sc-poll-other .sc-action-btn {
  margin-top: 0.35rem;
}

@keyframes sc-poll-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .sc-action-btn,
  .sc-action-burst,
  .sc-action-burst::before,
  .sc-action-burst::after,
  .sc-action-check,
  .sc-action-success h2,
  .sc-action-success p,
  .sc-action-decline.is-open,
  .sc-poll-question,
  .sc-poll-option {
    animation: none !important;
    transition: none !important;
  }
  .sc-action-check,
  .sc-action-x line {
    animation: none !important;
    transition: none !important;
  }
  .sc-action-check,
  .sc-action-x line { stroke-dashoffset: 0; }
}
