/* Pico.css variable overrides */
:host,:root {
  --pico-font-size: 80%;
  --pico-line-height: 1.2;
  --pico-font-weight: 400;
  --pico-typography-spacing-vertical: 0.65rem;
}

/* Dark header and footer styling */
nav a:hover {
  text-decoration: none;
}

footer {
  text-align: right;
}

/* Alert/Message styling */
[role="alert"] {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  border-left: 4px solid;
}

[role="alert"].error,
[role="alert"].errorlist {
  background-color: #fee;
  color: #c33;
  border-left-color: #c33;
}

[role="alert"].warning {
  background-color: #ffeaa7;
  color: #9d6100;
  border-left-color: #ff9800;
}

[role="alert"].success {
  background-color: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}

[role="alert"].info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left-color: #17a2b8;
}

/* Responsive grid for shift cards using card size variable */
.grid {
  display: grid;
}

/* Ensure shift cards fill their grid cell */
.shift-card {
  display: flex;
  flex-direction: column;
}

/* Button styling for shift selection */
.shift-buttons {
  display: flex;
}

.shift-buttons form {
  flex: 0 0 59px;
}

.shift-buttons form button {
  margin: 0 !important;
  padding: 0.5rem 0.25rem;
  opacity: 0.6;
}

.shift-buttons form button[aria-pressed="true"] {
  opacity: 1;
  font-weight: bold;
}

/* Responsive breakpoints for different screen sizes */
@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1025px) and (max-width: 1440px) {
  .grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 1441px) {
  .grid {
    grid-template-columns: repeat(9, 1fr);
  }
}
