/* Modern CSS Reset for phpMyGTD */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin and padding */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation on mobile */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: var(--line-height, 1.5);
  font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: var(--font-size-md, 1rem);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
}

/* Remove list styles */
ul,
ol {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6,
button, input, label {
  line-height: 1.2;
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/* Links inherit color by default */
a {
  color: var(--color-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:visited {
  color: var(--color-link-visited);
}

/* Make images easier to work with */
img,
picture,
svg {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Form elements base styling */
input,
select,
textarea {
  background-color: var(--color-bg-input);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) var(--space-sm);
  color: var(--color-text-primary);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
}

/* Button reset */
button {
  cursor: pointer;
  background: none;
  border: none;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Table reset */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove textarea resize handle on touch devices */
@media (pointer: coarse) {
  textarea {
    resize: vertical;
  }
}
