/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  font-size: 14px;
  line-height: 1.43;
  color: rgba(0, 0, 0, 0.87);
  background-color: #fafafa;
  font-weight: 400;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Form field spacing - now handled by theme */
.MuiFormControl-root.MuiTextField-root {
  margin-bottom: 16px;
}

/* Form control positioning */
.MuiFormControl-root {
  position: relative;
  margin-bottom: 16px;
}

.MuiInputBase-root {
  position: relative;
  z-index: 1;
}

.MuiInputLabel-root {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transform-origin: top left;
  transition: transform 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms;
}

.MuiInputLabel-shrink {
  transform: translate(14px, -9px) scale(0.75);
}

/* Form control label spacing */
.MuiFormControlLabel-root {
  margin-left: 0;
  margin-right: 0;
}

/* Button spacing */
.MuiButton-root {
  margin-bottom: 8px;
}

/* Helper text */
.MuiFormHelperText-root {
  margin-top: 3px;
  margin-left: 14px;
  margin-right: 14px;
}

/* Text field variants */
.MuiOutlinedInput-root {
  position: relative;
}

.MuiOutlinedInput-notchedOutline {
  border-color: rgba(0, 0, 0, 0.23);
}

.MuiOutlinedInput-input {
  padding: 16.5px 14px;
  font-size: 16px;
  line-height: 1.4375em;
}

/* Mobile viewport optimizations */
@media (max-width: 600px) {
  .MuiContainer-root {
    padding-left: 16px;
    padding-right: 16px;
  }

  .MuiTextField-root {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .MuiOutlinedInput-input {
    font-size: 16px;
  }
}

/* Checkbox positioning */
.MuiCheckbox-root {
  padding: 9px;
}

/* Typography */
.MuiTypography-root {
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: 0.00938em;
}

/* Links */
.MuiLink-root {
  text-decoration: none;
  color: #1976d2;
}

.MuiLink-root:hover {
  text-decoration: underline;
}
