/* assets/pages/library/library-desktop.css */
/* Desktop and tablet layout for library pages */

.filters {
  grid-template-columns: repeat(5, minmax(0, 230px));
}

@media (max-width: 1320px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 230px));
  }
}

@media (max-width: 760px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 230px));
  }
}

.library-latest-strip {
  max-width: 1400px;
  margin: 0 auto 14px;
  padding: 0 5%;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 10px;
  align-items: stretch;
}

.latest-sheet-requests-section {
  min-width: 0;
  margin: 0;
  padding: 0;
  height: 100%;
}

.latest-sheet-requests-inline,
.request-sheet-panel-latest {
  max-width: 100%;
  height: 100%;
  border: 1px solid rgba(200,164,90,0.14);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.012));
  padding: 10px;
}

.latest-sheet-requests-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.latest-sheet-requests-head h3 {
  margin: 0;
  font-size: 0.82rem;
  color: var(--gold-light);
  line-height: 1.25;
}

.latest-sheet-requests-meta,
.latest-sheet-requests-controls {
  display: none !important;
}

.latest-sheet-requests-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,164,90,0.36) rgba(255,255,255,0.04);
  padding-bottom: 2px;
}

.latest-sheet-requests-viewport::-webkit-scrollbar {
  height: 6px;
}

.latest-sheet-requests-viewport::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.latest-sheet-requests-viewport::-webkit-scrollbar-thumb {
  background: rgba(200,164,90,0.36);
  border-radius: 999px;
}

.latest-sheet-requests-list {
  --latest-card-width: 172px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--latest-card-width);
  grid-template-rows: repeat(2, minmax(46px, auto));
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  touch-action: pan-x;
  width: max-content;
  min-width: 100%;
}

.recently-added-sheets-list {
  --latest-card-width: 148px;
  grid-template-rows: repeat(2, minmax(46px, auto));
}

.latest-sheet-request-item[hidden] {
  display: grid !important;
}

.latest-sheet-request-item {
  display: grid;
  gap: 1px;
  min-height: 46px;
  padding: 6px 8px;
  border-radius: 11px;
  border: 1px solid rgba(200,164,90,0.11);
  background: linear-gradient(180deg, rgba(255,255,255,0.024), rgba(255,255,255,0.015));
  align-content: center;
}

.latest-sheet-request-item-added {
  border-color: rgba(67, 185, 120, 0.55);
  background: linear-gradient(180deg, rgba(67, 185, 120, 0.17), rgba(67, 185, 120, 0.07));
}

.latest-sheet-request-item-pending {
  border-color: rgba(200,164,90,0.18);
}

.latest-sheet-request-item strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text);
  font-weight: 850;
  line-height: 1.22;
  min-width: 0;
}

.latest-sheet-request-item-added strong {
  color: #7ee8a4;
}

.latest-sheet-request-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
}

.latest-sheet-request-check {
  background: rgba(67, 185, 120, 0.28);
  border: 1px solid rgba(67, 185, 120, 0.65);
  color: #92ffb5;
  box-shadow: 0 0 0 2px rgba(67, 185, 120, 0.08);
}

.latest-sheet-request-hourglass {
  background: rgba(200,164,90,0.13);
  border: 1px solid rgba(200,164,90,0.32);
  color: var(--gold-light);
}

.latest-sheet-request-item span {
  font-size: 0.64rem;
  color: var(--text-muted);
  line-height: 1.22;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latest-sheet-request-item-added > span {
  color: rgba(143, 240, 176, 0.88);
}

.request-sheet-section {
  padding: 8px 5% 0;
}

.request-sheet-card {
  max-width: 1080px;
  margin: 24px auto 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%), var(--bg2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  display: grid;
  grid-template-columns: minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.request-sheet-copy h2 {
  font-size: 1.34rem;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.request-sheet-copy p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.request-sheet-form {
  display: grid;
  gap: 14px;
}

.request-sheet-form label {
  display: grid;
  gap: 8px;
}

.request-sheet-form label span {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.request-sheet-form input,
.request-sheet-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: all 0.3s var(--ease);
}

.request-sheet-form input:focus,
.request-sheet-form textarea:focus {
  border-color: rgba(200,164,90,0.5);
  box-shadow: 0 0 0 4px rgba(200,164,90,0.08);
}

.request-sheet-form textarea {
  resize: vertical;
  min-height: 110px;
}

.request-sheet-btn {
  width: fit-content;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--bg);
  font-weight: 800;
  transition: all 0.3s var(--ease);
}

.request-sheet-btn:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,164,90,0.24);
}

.request-sheet-note {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.7;
}

.request-sheet-success {
  font-size: 0.9rem;
  color: var(--green);
  margin-top: 2px;
}

@media (max-width: 900px) {
  .library-latest-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .library-latest-strip {
    padding: 0 4%;
    margin-bottom: 12px;
    gap: 8px;
  }

  .latest-sheet-requests-inline,
  .request-sheet-panel-latest {
    padding: 9px;
    border-radius: 13px;
  }

  .latest-sheet-requests-head {
    margin-bottom: 7px;
  }

  .latest-sheet-requests-head h3 {
    font-size: 0.78rem;
  }

  .latest-sheet-requests-list {
    --latest-card-width: 152px;
    grid-template-rows: repeat(2, minmax(46px, auto));
    gap: 6px;
  }

  .recently-added-sheets-list {
    --latest-card-width: 136px;
    grid-template-rows: repeat(2, minmax(46px, auto));
  }

  .latest-sheet-request-item {
    min-height: 46px;
    padding: 6px 8px;
    border-radius: 11px;
  }

  .latest-sheet-request-item strong {
    font-size: 0.7rem;
  }

  .latest-sheet-request-item span {
    font-size: 0.62rem;
  }

  .request-sheet-section {
    padding: 0 4%;
  }

  .request-sheet-card {
    padding: 18px;
  }

  .request-sheet-btn {
    width: 100%;
    text-align: center;
  }
}
