/* This file may be used for providing additional customizations to the Trestle
 * admin. It will be automatically included within all admin pages.
 *
 * For organizational purposes, you may wish to define your customizations
 * within individual partials in this folder and they'll be required below.
 *

*/
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *


 */

:root {
  --ink: #07090c;
  --paper: #008080;
  --paper-strong: #f4f1df;
  --muted: #3d4b56;
  --line: #6f7f86;
  --ochre: #ffd84d;
  --rust: #d94324;
  --green: #006a7a;
  --blue: #23256f;
  --silver: #c0c0c0;
  --silver-light: #f2f2f2;
  --shadow: 12px 12px 0 rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 216, 77, 0.1), transparent 36%),
    linear-gradient(315deg, rgba(35, 37, 111, 0.36), transparent 42%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    var(--paper);
  background-size: auto, auto, 28px 28px, 28px 28px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.gallery-shell,
.login-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 64px;
  align-items: start;
  padding: 42px 0 28px;
  border-bottom: 4px solid var(--silver);
}

.eyebrow {
  margin: 0 0 10px;
  color: #ffffff;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

.gallery-hero h1,
.detail-panel h1,
.login-panel h1 {
  max-width: 760px;
  margin-bottom: 14px;
  color: #fff7b2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 8vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 5px 5px 0 var(--blue);
}

.gallery-hero h1 {
  max-width: none;
  margin-top: 18px;
  font-size: clamp(2.6rem, 5.8vw, 5.35rem);
  white-space: nowrap;
}

.detail-panel h1 {
  max-width: none;
  margin-top: 14px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 0;
  color: #f3f7ef;
  font-size: 1.12rem;
  line-height: 1.6;
}

.session-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-link,
.nav-button,
.search-button,
.clear-link,
.oauth-button,
.back-link {
  min-height: 42px;
  border: 2px outset #ffffff;
  border-radius: 0;
  background: var(--silver);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  text-decoration: none;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-button {
  margin: 0;
}

.clear-link,
.back-link {
  border-style: inset;
  background: var(--paper-strong);
  color: var(--ink);
}

.flash {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 2px outset #ffffff;
  border-radius: 0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

.flash-notice {
  background: var(--ochre);
}

.flash-alert {
  background: #ffddd6;
}

.gallery-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px 0;
}

.gallery-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-input,
.filter-select {
  min-height: 42px;
  border: 2px inset #ffffff;
  border-radius: 0;
  background: var(--paper-strong);
  color: var(--ink);
  padding: 9px 12px;
}

.search-input {
  flex: 1 1 280px;
  min-width: 0;
}

.filter-select {
  flex: 0 1 180px;
}

.result-count {
  margin: 0;
  color: #ffffff;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.game-card {
  min-width: 0;
  border: 3px outset #ffffff;
  border-radius: 0;
  background: var(--paper-strong);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(90deg, rgba(255, 216, 77, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(255, 216, 77, 0.1) 1px, transparent 1px),
    var(--blue);
  background-size: 18px 18px;
  border-bottom: 3px solid var(--silver);
  overflow: hidden;
}

.card-media img,
.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card-body {
  padding: 14px;
}

.card-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.card-title-row h2 {
  margin-bottom: 8px;
  font-size: 1.18rem;
  line-height: 1.15;
}

.card-title-row a {
  text-decoration: none;
}

.value-pill {
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ochre);
  color: var(--ink);
  padding: 5px 8px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.card-meta {
  min-height: 38px;
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.35;
}

.card-facts,
.detail-facts {
  display: grid;
  gap: 8px;
  margin: 0;
}

.card-facts div,
.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 2px solid var(--line);
  padding-top: 8px;
}

dt {
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

dd {
  margin: 0;
  text-align: right;
}

.empty-gallery,
.login-panel {
  border: 3px outset #ffffff;
  border-radius: 0;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  padding: 28px;
}

.empty-gallery {
  grid-column: 1 / -1;
}

.detail-shell {
  padding-top: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-top: 22px;
}

.detail-media {
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(90deg, rgba(255, 216, 77, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(255, 216, 77, 0.1) 1px, transparent 1px),
    var(--blue);
  background-size: 18px 18px;
  border: 4px outset #ffffff;
  border-radius: 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.detail-panel {
  min-width: 0;
  border: 3px outset #ffffff;
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  padding: 24px;
}

.detail-panel .eyebrow,
.login-panel .eyebrow {
  color: var(--green);
}

.detail-panel h1,
.login-panel h1 {
  color: var(--blue);
  text-shadow: 4px 4px 0 var(--ochre);
}

.detail-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.detail-value {
  display: inline-flex;
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ochre);
  color: var(--ink);
  padding: 8px 12px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
}

.ebay-listing-details {
  margin: 22px 0;
  border-top: 3px solid var(--silver);
  padding-top: 16px;
  line-height: 1.55;
}

.ebay-listing-details p {
  margin: 0 0 12px;
}

.ebay-listing-details p:last-child {
  margin-bottom: 0;
}

.ebay-title {
  font-weight: 700;
}

.detail-notes {
  margin-top: 24px;
  border-top: 3px solid var(--silver);
  padding-top: 18px;
  line-height: 1.6;
}

.detail-notes h2 {
  font-size: 1.2rem;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-panel {
  width: min(620px, 100%);
}

.login-panel h1 {
  font-size: clamp(2.4rem, 8vw, 5.4rem);
}

.oauth-actions {
  display: grid;
  gap: 10px;
  margin: 24px 0 18px;
}

.oauth-actions form,
.oauth-actions .button_to {
  margin: 0;
}

.oauth-button {
  width: 100%;
}

.oauth-button.google {
  background: var(--paper-strong);
  color: var(--ink);
}

.oauth-button.facebook {
  background: var(--blue);
  border-color: #ffffff;
  color: #ffffff;
}

code {
  background: rgba(255, 216, 77, 0.32);
  border-radius: 0;
  padding: 2px 5px;
}

@media (max-width: 760px) {
  .gallery-hero,
  .gallery-controls,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .session-nav {
    justify-content: flex-start;
  }

  .filter-select,
  .search-button,
  .clear-link {
    flex: 1 1 140px;
  }

  .result-count {
    white-space: normal;
  }
}
