/* General Styling */
:root {
  --primary-bg: #000000;
  --secondary-bg: #1c1c1e;
  --tertiary-bg: #2c2c2e;
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --accent-blue: #0a84ff;
  --accent-red: #ff3b30;
  --accent-orange: #ff9500;
  --accent-green: #03ff85;
  --accent-gray: #8e8e93;
  --accent-bg-blue: #77bbff;
  --accent-bg-red: #fe857e;
  --accent-bg-orange: #fdd59d;
  --accent-bg-green: #8cffc7;
}

html {
  background-color: var(--primary-bg) !important;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  min-height: 100svh;
  min-height: 100vh;
}

html,
body {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  height: 100%;
  min-height: 100%;
}

main {
  -webkit-overflow-scrolling: touch;
}

.accent-orange {
  color: #ff9500 !important;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--primary-bg);
}

.hidden {
  display: none !important;
}

/* Global Loading */
.global-loading {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.global-blur {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

button {
  background: none;
  border: none;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 1rem;
  min-height: 44px; /* Target size */
}

button:active {
  opacity: 0.85;
}

input,
textarea,
select {
  background-color: var(--tertiary-bg);
  border: 1px solid #444;
  border-radius: 8px;
  color: var(--text-primary);
  padding: 10px;
  width: 100%;
  font-size: 1rem;
  line-height: 1.25;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url(assets/keyboard_arrow_down.png);
  background-repeat: no-repeat;
  background-position: right calc(10px + 4px) center;
  padding-right: 40px;
}

input[type="datetime-local"] {
  background-color: var(--tertiary-bg);
  border: 1px solid #444;
  color: var(--text-primary);
}

input[type="datetime-local"]:focus {
  border-color: var(--accent-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.2);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

input[type="datetime"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

/* Search Highlight Styles */
.search-highlight {
  background-color: var(--accent-orange);
  color: var(--primary-bg);
  padding: 1px 2px;
  border-radius: 2px;
  font-weight: 600;
}
