/* MX Fantasy — shared action buttons (rp = race picks style) */
@import url("mx_icons.css");

.rp-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.2rem;
  min-height: 2.75rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.12s, filter 0.12s, opacity 0.15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.rp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.rp-btn:active:not(:disabled),
.rp-btn.is-pressed:not(:disabled) {
  transform: scale(0.97) translateY(1px);
  filter: brightness(0.9);
}

.rp-btn.is-busy {
  opacity: 0.75;
  pointer-events: none;
  filter: brightness(0.92);
  cursor: wait;
}

.rp-btn--sm {
  padding: 0.5rem 0.95rem;
  min-height: 2.25rem;
  font-size: 0.8rem;
}

.rp-btn--primary {
  background: #243044;
  color: #f1f5f9;
  border-color: #3d4f66;
  box-shadow: none;
}

/* Homepage hero: picks CTA states */
@keyframes mx-picks-cta-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(251, 191, 36, 0);
    transform: scale(1.03);
  }
}

.mx-picks-cta {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 0.7rem 1.15rem;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.mx-picks-cta--need {
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-color: rgba(251, 191, 36, 0.55);
  animation: mx-picks-cta-pulse 1.7s ease-in-out infinite;
}

.mx-picks-cta--need:hover {
  background: linear-gradient(135deg, #fcd34d, #fb923c);
}

.mx-picks-cta--done {
  color: #fff;
  background: linear-gradient(135deg, #059669, #047857);
  border-color: rgba(52, 211, 153, 0.45);
  animation: none;
}

.mx-picks-cta--done:hover {
  background: linear-gradient(135deg, #10b981, #059669);
}

.mx-picks-cta--done-race {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: rgba(96, 165, 250, 0.4);
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .mx-picks-cta--need {
    animation: none;
  }
}

.rp-btn--primary:hover:not(:disabled) {
  background: #334155;
  border-color: #64748b;
  color: #fff;
  transform: translateY(-1px);
}

.rp-btn--secondary {
  background: transparent;
  color: #e2e8f0;
  border-color: #475569;
  box-shadow: none;
}

.rp-btn--secondary:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.55);
  border-color: #64748b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}

.rp-btn--accent {
  background: #243044;
  color: #f1f5f9;
  border-color: #3d4f66;
  box-shadow: none;
}

.rp-btn--accent:hover:not(:disabled) {
  background: #334155;
  border-color: #64748b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}

.rp-btn--warm {
  background: #243044;
  color: #f1f5f9;
  border-color: #3d4f66;
  box-shadow: none;
}

.rp-btn--warm:hover:not(:disabled) {
  background: #334155;
  border-color: #64748b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: none;
}

.rp-btn--danger {
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
}

.rp-btn--danger:hover:not(:disabled) {
  background: rgba(153, 27, 27, 0.5);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fff;
}

.rp-btn--ghost-danger {
  background: transparent;
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
  padding: 0.4rem 0.75rem;
  min-height: auto;
  font-size: 0.8rem;
}

.rp-btn--ghost-danger:hover:not(:disabled) {
  background: rgba(127, 29, 29, 0.22);
  border-color: rgba(248, 113, 113, 0.4);
}

.rp-btn--link {
  background: transparent;
  color: #cbd5e1;
  border-color: transparent;
  padding: 0.35rem 0.5rem;
  min-height: auto;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.rp-btn--link:hover:not(:disabled) {
  color: #f1f5f9;
  background: rgba(51, 65, 85, 0.35);
  text-decoration: none;
}

.rp-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.rp-btn-row--end {
  justify-content: flex-end;
}

/* Full-width card / menu links on homepage */
.rp-btn--block {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1.15rem;
  font-size: 0.92rem;
  justify-content: center;
}

/* Tab navigation (homepage) */
.tab-btn.rp-tab-btn,
.rp-tab-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 0.3rem;
  padding: 0.5rem 0.8rem;
  min-height: 2.25rem;
  border-radius: 0.45rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid #3d4f66;
  background: #1a2436;
  color: #cbd5e1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
  .tab-btn.rp-tab-btn,
  .rp-tab-btn {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    min-height: 2.35rem;
  }
}

.tab-btn.rp-tab-btn:hover:not(:disabled):not(.active),
.rp-tab-btn:hover:not(:disabled):not(.active) {
  background: #243044;
  border-color: #54657d;
  color: #f1f5f9;
}

.tab-btn.rp-tab-btn.active,
.rp-tab-btn.active {
  background: #334155;
  color: #fff;
  border-color: #64748b;
  box-shadow: none;
}

.tab-btn.rp-tab-btn:disabled,
.rp-tab-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Homepage tabs: 4×2 grid on mobile (no horizontal scroll) */
@media (max-width: 639px) {
  #tab-scroll-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    overflow: visible;
  }

  #tab-scroll-container > .tab-btn,
  #tab-scroll-container > a.tab-btn {
    width: 100%;
    min-width: 0;
    padding: 0.45rem 0.2rem;
    font-size: 0.68rem;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    min-height: 2.55rem;
  }
}

.rp-btn--gold {
  background: rgba(161, 98, 7, 0.4);
  color: #fef3c7;
  border-color: rgba(251, 191, 36, 0.45);
}

.rp-btn--gold:hover:not(:disabled) {
  background: rgba(180, 83, 9, 0.55);
  border-color: rgba(253, 224, 71, 0.5);
  color: #fff;
}

.rp-btn--facebook {
  background: #1877f2;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  border-radius: 0.65rem;
  padding: 0.65rem 1.15rem;
}

.rp-btn--facebook:hover:not(:disabled) {
  background: #166fe5;
  transform: translateY(-1px);
}

.rp-btn-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
