/* Minimal Tailwind CSS - Essential classes for Match Tracker PWA */

/* Reset and base styles */
*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

/* Body override — defer to styles.css design tokens */
body.bg-gray-900 {
  background-color: transparent !important;
  color: inherit !important;
}

/* Background colors — remapped to the pitch palette so existing markup picks up the new theme */
.bg-gray-900 { background-color: var(--pitch-900) !important; }
.bg-gray-800 { background-color: var(--pitch-800) !important; }
.bg-gray-700 { background-color: var(--pitch-700) !important; }
.bg-gray-600 { background-color: var(--touchline) !important; }
.bg-blue-600 { background-color: var(--primary) !important; }
.bg-blue-700 { background-color: var(--primary-press) !important; }
.bg-green-600 { background-color: var(--primary) !important; }
.bg-green-700 { background-color: var(--primary-press) !important; }
.bg-yellow-600 { background-color: var(--scoreboard-amber) !important; }
.bg-black { background-color: rgb(0 0 0) !important; }

/* Text colors — remapped to the pitch palette */
.text-gray-100 { color: var(--floodlight); }
.text-gray-200 { color: var(--floodlight); }
.text-gray-300 { color: var(--chalk); }
.text-gray-400 { color: var(--mist); }
.text-blue-500 { color: var(--scoreboard-glow); }
.text-blue-400 { color: var(--scoreboard-amber); }
.text-green-400 { color: var(--primary); }
.text-red-400 { color: var(--card-red); }
.text-yellow-400 { color: var(--scoreboard-amber); }
.text-white { color: var(--floodlight); }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Hover colors */
.hover\:text-blue-400:hover { color: var(--scoreboard-glow); }
.hover\:text-gray-100:hover { color: var(--floodlight); }
.hover\:bg-blue-700:hover { background-color: var(--primary-press) !important; }
.hover\:bg-green-700:hover { background-color: var(--primary-press) !important; }
.hover\:bg-gray-700:hover { background-color: var(--pitch-700) !important; }
.hover\:bg-gray-600:hover { background-color: var(--touchline) !important; }

/* Border colors */
.border-gray-700 { border-color: var(--touchline); }
.border-gray-600 { border-color: var(--touchline); }

/* Layout */
.flex { display: flex; }
.hidden { display: none; }
.grid { display: grid; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }

/* Grid */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Gap */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

/* Spacing */
.space-x-1 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.25rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

/* Margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mr-3 { margin-right: 0.75rem; }
.ml-auto { margin-left: auto; }
.ml-6 { margin-left: 1.5rem; }

/* Padding */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.pr-12 { padding-right: 3rem; }
.pr-16 { padding-right: 4rem; }
.pr-20 { padding-right: 5rem; }

/* Width and height */
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-11\/12 { width: 91.666667%; }
.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-64 { height: 16rem; }
.min-h-screen { min-height: 100vh; }
.min-h-16 { min-height: 4rem; }
.min-h-20 { min-height: 5rem; }
.min-h-\[3\.5rem\] { min-height: 3.5rem; }

/* Max width */
.max-w-4xl { max-width: 56rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.max-w-lg { max-width: 32rem; }
.max-w-md { max-width: 28rem; }
.max-w-sm { max-width: 24rem; }

/* Max height */
.max-h-\[80vh\] { max-height: 80vh; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; }
.left-1\/2 { left: 50%; }
.top-2 { top: 0.5rem; }
.top-4 { top: 1rem; }
.bottom-2 { bottom: 0.5rem; }
.left-4 { left: 1rem; }
.right-2 { right: 0.5rem; }
.right-4 { right: 1rem; }
.right-12 { right: 3rem; }
.right-14 { right: 3.5rem; }
.right-16 { right: 4rem; }

/* Transform */
.transform { transform: var(--tw-transform); }
.-translate-x-1\/2 { --tw-translate-x: -50%; transform: var(--tw-transform); }

/* Border */
.border { border-width: 1px; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }
.tracking-wide { letter-spacing: 0.025em; }
.text-center { text-align: center; }

/* Shadows */
.shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

/* Hover shadows */
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }

/* Opacity */
.bg-opacity-50 { background-color: rgb(0 0 0 / 0.5); }

/* Overflow */
.overflow-y-auto { overflow-y: auto; }

/* Z-index */
.z-50 { z-index: 50; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }

/* Hover transforms */
.hover\:scale-105:hover { transform: scale(1.05); }

/* Pointer events */
.pointer-events-none { pointer-events: none; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Icon button reset - remove default button styling only for buttons with images */
button img {
  /* Ensure images in buttons don't have any spacing */
  display: block;
}

button:has(img) {
  background: none !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

button:has(img):focus {
  outline: none !important;
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

button:has(img):hover {
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

button:has(img):active {
  background: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Allow margin classes to work on buttons */
button.mr-3 {
  margin-right: 0.75rem !important;
}