/* React Build Book: starter styles.
   Paste all of this into src/index.css. Change anything you like. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f8;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1b2540;
}

.app h1,
.app h2,
.app h3 {
  margin: 0 0 8px;
  line-height: 1.2;
}

.app p {
  margin: 0 0 8px;
}

/* ---------- Page skeleton ---------- */

.header {
  padding-bottom: 16px;
  border-bottom: 2px solid #d6e0ec;
}

.header h1 {
  font-size: 2rem;
}

.header p {
  color: #5b6b84;
}

.main {
  display: grid;
  gap: 24px;
  padding: 24px 0;
}

.footer {
  padding-top: 16px;
  border-top: 2px solid #d6e0ec;
  color: #5b6b84;
  font-size: 0.9rem;
}

.placeholder {
  padding: 32px;
  border: 2px dashed #b8c6d8;
  border-radius: 12px;
  text-align: center;
  color: #5b6b84;
}

/* ---------- Layout helpers ---------- */

.card {
  padding: 20px;
  background: #fff;
  border: 1px solid #d6e0ec;
  border-radius: 12px;
  box-shadow: 0 2px 0 #d6e0ec;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.stack {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.muted {
  color: #5b6b84;
}

/* ---------- Buttons and inputs ---------- */

.btn {
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: #1c62cc;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 3px 0 #124593;
  cursor: pointer;
}

.btn:hover {
  background: #2470e0;
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #124593;
}

.btn-secondary {
  color: #1b2540;
  background: #fff;
  border: 1px solid #c5d2e2;
  box-shadow: 0 3px 0 #c5d2e2;
}

.btn-secondary:hover {
  background: #f4f7fb;
}

.btn-secondary:active {
  box-shadow: 0 1px 0 #c5d2e2;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.875rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 2px solid #c5d2e2;
  border-radius: 8px;
}

.btn:focus-visible,
.chip:focus-visible,
.input:focus-visible {
  outline: 3px solid #f5be16;
  outline-offset: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  padding: 2px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: #33415c;
  background: #e4ecf5;
  border-radius: 999px;
}

.badge-online {
  color: #17663e;
  background: #dff3e7;
}

.chip {
  padding: 6px 14px;
  font: inherit;
  color: #1b2540;
  text-transform: capitalize;
  background: #fff;
  border: 2px solid #c5d2e2;
  border-radius: 999px;
  cursor: pointer;
}

.chip.active {
  color: #fff;
  background: #1b2540;
  border-color: #1b2540;
}

.error {
  padding: 12px 16px;
  color: #a12a1f;
  background: #fdecea;
  border-radius: 8px;
}

/* ---------- Profiles ---------- */

.profile-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.avatar {
  width: 80px;
  height: 80px;
  margin-bottom: 8px;
  border-radius: 50%;
}

/* ---------- Jokes ---------- */

.setup {
  font-size: 1.1rem;
  font-weight: 600;
}

.punchline {
  font-weight: 600;
  color: #1c62cc;
}

.liked {
  color: #c62f22;
  background: #fdecea;
  border-color: #f3b8b1;
}

/* ---------- Weather ---------- */

.big {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
}

/* ---------- Campus store ---------- */

.store {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (min-width: 720px) {
  .store {
    grid-template-columns: 1fr 280px;
  }

  .store > aside {
    position: sticky;
    top: 16px;
  }
}

.emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.cart-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cart-total {
  margin-top: 12px;
  padding-top: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  border-top: 2px solid #d6e0ec;
}

/* ---------- Quotes ---------- */

.quote {
  margin: 0 0 16px;
}

.quote p {
  font-size: 1.35rem;
  font-weight: 600;
}

.quote footer {
  color: #5b6b84;
}

.quote footer::before {
  content: "— ";
}
