/* ============================================================
   Awards — trophy wall (reuses the reading-journal scrapbook look)
   Depends on books.css for .journal, .entries, .entry, .modal__*,
   .cozy-form and the journal form skin — this file only adds the
   award-specific pieces (filter tabs, place/kind badges, blank
   tiles, notes textarea) and extends the shared bits to c-awards.
   ============================================================ */

/* Same architectural background + paper veil as the books/wallets pages. */
body.c-awards {
  background-color: #ece0c6;
  background-image:
    linear-gradient(180deg, rgba(238, 228, 205, 0.85) 0%, rgba(238, 228, 205, 0.71) 26%, rgba(238, 228, 205, 0.71) 100%),
    url("/background2.png");
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: cover, cover;
  background-attachment: fixed, fixed;
}
body.c-awards .site-footer {
  color: var(--j-ink-soft);
  text-shadow: 0 0 8px rgba(240, 231, 209, 0.92), 0 1px 2px rgba(240, 231, 209, 0.85);
}

/* ---------- Filter tabs (усі / медалі / кубки / …) ---------- */
.award-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 720px;
  margin: 22px auto 4px;
}
.award-filter {
  font-family: "Kalam", ui-rounded, "Segoe UI", sans-serif;
  font-size: 1.02rem;
  color: #4a4235;
  background: rgba(241, 233, 214, 0.72);
  border: 1.5px solid rgba(138, 125, 99, 0.5);
  border-radius: 999px;
  padding: 5px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease),
              color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.award-filter i { font-size: 0.92em; opacity: 0.85; }
.award-filter:hover {
  transform: translateY(-1px);
  border-color: #9c3b2e;
  color: #23201a;
}
.award-filter.is-active {
  background: #23201a;
  border-color: #23201a;
  color: #efe4c8;
  box-shadow: 0 3px 8px rgba(35, 32, 26, 0.24);
}
.award-filter.is-active i { opacity: 1; }

/* ---------- Card tweaks ---------- */
/* Anchor for the corner place badge. */
.entry--award .entry__photo-link { position: relative; }
/* Photos come in mixed shapes (square medals, portrait diplomas) — fill the
   uniform 3:4 frame by cropping rather than stretching. The modal shows the
   whole scan, so nothing important is lost on the wall. */
.entry--award .entry__photo img { object-fit: cover; }

.entry__kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Blank (no-photo) tile — a coloured card per kind with a big glyph. */
.award-blank { color: #f3ead4; }
.award-blank__icon {
  font-size: 2.6rem;
  margin-bottom: 12px;
  color: #f6efdd;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}
.award-blank--medal       { background: linear-gradient(150deg, #b5893f, #6f5220); }
.award-blank--cup         { background: linear-gradient(150deg, #a86a3c, #6a3d1e); }
.award-blank--diploma     { background: linear-gradient(150deg, #7d795a, #4d4a34); }
.award-blank--certificate { background: linear-gradient(150deg, #5f7050, #3f4d34); }

/* ---------- Place badge (gold / silver / bronze) ---------- */
.award-place {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 32px; height: 32px;
  display: grid;
  place-items: center;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #3c2a12;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 6px rgba(60, 45, 25, 0.4);
}
.award-place--1 { background: radial-gradient(circle at 34% 30%, #ffe79a, #d4af37 70%); }
.award-place--2 { background: radial-gradient(circle at 34% 30%, #f4f4f8, #b8b8c0 70%); }
.award-place--3 { background: radial-gradient(circle at 34% 30%, #f0c39a, #cd7f32 70%); color: #4a2c12; }

/* ============================================================
   Modal additions (rendered in a body-level portal → literal colours)
   ============================================================ */
.modal__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
}
.modal__genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.modal__place {
  align-self: flex-start;
  font-family: "Kalam", ui-rounded, "Segoe UI", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3c2a12;
  border-radius: 999px;
  padding: 2px 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}
/* The place pill reuses the medal colours from the badge classes above. */
.modal__note { white-space: pre-wrap; }

/* Place badge inside the modal polaroid sits on the photo corner. */
.modal__polaroid { position: relative; }
.modal__polaroid .award-place { top: 2px; right: 2px; }

/* ============================================================
   Form additions — award form reuses .cozy-form; give c-awards the
   same journal skin as c-books, plus a notes textarea.
   ============================================================ */
body.c-awards .cozy-form {
  --accent: #9c3b2e;
  --accent-deep: #7d2f24;
  position: relative;
  max-width: 560px;
  background: #f6efdd;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05), 0 14px 32px -16px rgba(60, 45, 25, 0.55);
}
body.c-awards .cozy-form::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%) rotate(-1.5deg);
  width: 128px; height: 26px;
  background: rgba(228, 214, 170, 0.6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
body.c-awards .cf-field input,
body.c-awards .cf-field textarea,
body.c-awards .cf-chip,
body.c-awards .cf-cover__drop {
  background: #fbf7ec;
  border-color: #cdbf9e;
}
body.c-awards .cf-field input,
body.c-awards .cf-field textarea {
  font-family: "Kalam", ui-rounded, "Segoe UI", sans-serif;
  font-size: 1.05rem;
}
body.c-awards .cf-field > label,
body.c-awards .cf-chip,
body.c-awards .cf-cover__hint { font-family: "Kalam", ui-rounded, "Segoe UI", sans-serif; }
body.c-awards .cf-genres__label,
body.c-awards .cf-cover__label {
  font-family: "Kalam", ui-rounded, "Segoe UI", sans-serif;
  color: #7d2f24;
}
body.c-awards .cf-field input:focus,
body.c-awards .cf-field textarea:focus,
body.c-awards .cf-cover__drop:hover {
  border-color: #9c3b2e;
  box-shadow: 0 0 0 3px rgba(156, 59, 46, 0.15);
}
body.c-awards .cf-chip.is-selected {
  background: #9c3b2e;
  border-color: #9c3b2e;
  color: #fff7ef;
}
body.c-awards .cf-submit.btn-primary {
  background: #23201a;
  color: #efe4c8;
  font-family: "Caveat", ui-rounded, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
body.c-awards .cf-submit.btn-primary:hover { background: #171410; color: #efe4c8; }
body.c-awards .cf-submit--success { background: var(--sage); }
body.c-awards .cf-actions .btn-ghost {
  font-family: "Caveat", ui-rounded, "Segoe UI", sans-serif;
  font-size: 1.25rem;
}

/* Notes textarea — same look as the floating-label inputs, multi-line. */
.cf-field--area textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 23px 14px 9px;
  background: #fffdf8;
  border: 1px solid #e0d4bd;
  border-radius: var(--radius-sm);
  resize: vertical;
  min-height: 92px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.cf-field--area textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(192, 106, 77, 0.15);
}
/* Floating label that lifts when focused or filled (placeholder is a single space). */
.cf-field--area > label {
  position: absolute;
  left: 15px;
  top: 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-faint);
  pointer-events: none;
  transform-origin: left center;
  transition: transform 0.18s var(--ease), color 0.18s var(--ease);
}
.cf-field--area textarea:focus + label,
.cf-field--area textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(0.74);
  color: var(--accent-deep);
  font-weight: 600;
}
.cf-field--area textarea:focus ~ .cf-underline { left: 8px; right: 8px; }

/* Blank tile on the no-JS award show page. */
.award__photo--blank {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  aspect-ratio: 3 / 4;
  padding: 22px;
  color: #f3ead4;
  background: linear-gradient(150deg, #b5893f, #6f5220);
  border-radius: 3px 7px 7px 3px;
  box-shadow: var(--shadow-lg);
}

@media (max-width: 500px) {
  .award-filters { gap: 8px; }
  .award-filter { font-size: 0.95rem; padding: 4px 12px; }
}
