/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* スマホ向け(モバイルファースト)の、最小限のスタイル */
:root {
  color-scheme: light dark;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
}

main {
  max-width: 32rem;
  margin: 0 auto;
}

h1 {
  font-size: 1.4rem;
}

h2 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

/* タップしやすい大きさにする */
button {
  min-height: 2.75rem;
  padding: 0 1rem;
  font-size: 1rem;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  font-weight: bold;
  cursor: pointer;
  list-style: none; /* display: flex にするとブラウザ標準の ▶ が消えるので、下で矢印を自前で描く */
}

summary::-webkit-details-marker {
  display: none;
}

/* 開閉のインジケーター: 閉じているときは「v」、開いているときは「^」 */
summary::after {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  margin-right: 0.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-25%) rotate(45deg);
  transition: transform 0.15s;
}

details[open] > summary::after {
  transform: translateY(25%) rotate(-135deg);
}

@media (prefers-reduced-motion: reduce) {
  summary::after {
    transition: none;
  }
}

.product-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.product-list form {
  margin: 0;
}

[role="alert"] {
  color: #b00020;
}

.logout {
  margin-top: 2rem;
}

nav {
  display: flex;
  gap: 1rem;
  max-width: 32rem;
  margin: 0 auto 1rem;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ゴミ出しカレンダー(今週) */
.week {
  margin: 0;
  padding: 0;
  list-style: none;
}

.week .day {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
}

.week time {
  min-width: 5.5rem;
}

.week .garbage-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.week .garbage-type {
  padding: 0 0.5rem;
  border: 1px solid currentColor;
  border-radius: 1rem;
}

.week .no-garbage {
  opacity: 0.5;
}

/* 今日は、赤く強調する */
.week .today {
  color: #c62828;
  font-weight: bold;
  border-left: 0.25rem solid #c62828;
  background: color-mix(in srgb, #c62828 8%, transparent);
}

.today-mark {
  padding: 0 0.5rem;
  border-radius: 1rem;
  color: #fff;
  background: #c62828;
  font-size: 0.8rem;
}

