/* The Galleries page (gallery-dashboard.html), in the same look as the
   Workspace: the Studio sidebar, the brand fonts, one quiet row per
   gallery, and thin outline buttons. The gallery editor
   (gallery-project.html) uses it too, for the same buttons. */

/* The page you are on is marked in the sidebar menu. */
.gallery-list-page .sidebar-link[aria-current="page"] { background: rgba(42, 31, 22, .07); font-weight: 500; }

/* Heading with the "New gallery" button beside it. */
.gallery-list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 18px;
}
.gallery-list-head > div { display: grid; gap: 4px; min-width: 0; }

/* Every button and link-button on this page: thin outline, normal letters. */
.gallery-list-page main button,
.gallery-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  width: auto;
  padding: 0 14px;
  border: 1px solid rgba(42, 31, 22, .22);
  border-radius: 10px;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.gallery-list-page main button::before,
.gallery-button::before { display: none; }
.gallery-list-page main button:hover,
.gallery-button:hover { border-color: var(--ink); background: none; box-shadow: none; transform: none; }
/* The one button that moves things forward: a darker outline. */
.gallery-list-page .gallery-list-new,
.gallery-list-page .gallery-button--main { border-color: var(--ink); font-weight: 500; }
.gallery-list-page .gallery-list-new:hover,
.gallery-list-page .gallery-button--main:hover { background: rgba(42, 31, 22, .06); }

.gallery-list-summary { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.gallery-list-summary:empty { display: none; }

/* Search and status, on one line. */
.gallery-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  margin-bottom: 14px;
}
.gallery-list-tools label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.gallery-list-tools input,
.gallery-list-tools select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(42, 31, 22, .18);
  border-radius: var(--radius-field);
  background: rgba(255, 252, 246, .7);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: none;
}
.gallery-list-tools input:focus,
.gallery-list-tools select:focus { outline: none; border-color: var(--ink); }

/* The list: one white card, a thin line between galleries. */
.gallery-list {
  border: 1px solid rgba(159, 92, 53, .14);
  border-radius: 18px;
  background: rgba(255, 252, 246, .78);
}
.gallery-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}
.gallery-row + .gallery-row { border-top: 1px solid rgba(42, 31, 22, .1); }
.gallery-row__cover {
  width: 88px;
  height: 66px;
  border-radius: 8px;
  background: rgba(23, 17, 13, .06) center / cover no-repeat;
}
.gallery-row__text { display: grid; gap: 4px; min-width: 0; }
.gallery-row__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.gallery-row h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.gallery-row h2 a { color: inherit; text-decoration: none; }
.gallery-row h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.gallery-row p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.gallery-status {
  padding: 2px 9px;
  border-radius: 8px;
  background: rgba(42, 31, 22, .06);
  color: var(--muted);
  font-size: 13px;
}
.gallery-status[data-status="published"] { background: rgba(63, 113, 79, .1); color: #3f714f; }
.gallery-row__actions { display: flex; align-items: center; gap: 8px; }

/* "More": a small menu for the rarer actions. */
.gallery-more { position: relative; }
.gallery-more summary { list-style: none; }
.gallery-more summary::-webkit-details-marker { display: none; }
.gallery-more summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.gallery-more[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.gallery-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 5;
  display: grid;
  min-width: 170px;
  padding: 6px;
  border: 1px solid rgba(42, 31, 22, .14);
  border-radius: 12px;
  background: #fffcf6;
  box-shadow: 0 14px 34px rgba(55, 38, 25, .12);
}
.gallery-list-page .gallery-more__menu a,
.gallery-list-page .gallery-more__menu button {
  justify-content: flex-start;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.gallery-list-page .gallery-more__menu a:hover,
.gallery-list-page .gallery-more__menu button:hover { background: rgba(42, 31, 22, .06); }
.gallery-list-page .gallery-more__menu [data-delete] { color: #9a4a2c; }

.gallery-list-empty { margin: 0; padding: 22px 16px; color: var(--muted); font-size: 15px; }

html.gallery-picker-open { overflow: hidden; overscroll-behavior: none; }
html.gallery-picker-open body { position: fixed; inset: var(--gallery-picker-page-top) 0 auto; width: 100%; }
.gallery-list-page [data-project-picker] {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(var(--gallery-picker-height, 100dvh) - 32px);
  inset: calc(var(--gallery-picker-top, 0px) + var(--gallery-picker-height, 100dvh) / 2) 0 auto;
  margin: 0 auto;
  translate: 0 -50%;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 26px;
  border: 1px solid rgba(42, 31, 22, .16);
  border-radius: 18px;
  background: #fffcf6;
  color: var(--ink);
  box-shadow: 0 28px 70px rgba(42, 31, 22, .2);
}
.gallery-list-page [data-project-picker]::backdrop { background: rgba(25, 19, 15, .45); }
.gallery-list-page [data-project-picker] form { display: grid; gap: 16px; }
.gallery-list-page [data-project-picker] h2 { margin: 0; font-family: var(--serif); font-weight: 500; }
.gallery-list-page [data-project-picker] p { margin: 0; color: var(--muted); }
.gallery-list-page [data-project-picker] label { display: grid; gap: 8px; }
.gallery-project-choices { display: grid; gap: 8px; max-height: 45vh; overflow: auto; overscroll-behavior: contain; padding: 0; border: 0; font-family: Jost, var(--sans); }
.gallery-project-choices legend { margin-bottom: 8px; }
.gallery-list-page .gallery-project-choices label { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid rgba(42, 31, 22, .2); border-radius: 8px; background: white; cursor: pointer; }
.gallery-project-choices label:has(input:checked) { border-color: var(--ink); background: #f5eee2; }
.gallery-project-choices small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.gallery-list-page [data-project-picker] form > .gallery-only-fields { display: grid; grid-template-columns: 1fr; justify-content: stretch; gap: 12px; }
.gallery-list-page [data-project-picker] form > .gallery-only-fields[hidden] { display: none; }
.gallery-list-page .gallery-only-fields input,
.gallery-list-page .gallery-only-fields select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid rgba(42, 31, 22, .2); border-radius: var(--radius-field); background: white; color: var(--ink); font-family: Jost, var(--sans); font-size: 16px; font-weight: 400; letter-spacing: normal; text-transform: none; }
.gallery-picker-error { color: #9b2c2c !important; }
.gallery-list-page [data-project-picker] .gallery-picker-note { font-size: 13px; }
.gallery-list-page [data-project-picker] .gallery-picker-style { margin: 0; color: var(--accent); font-size: 13px; }
.gallery-picker-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.gallery-project-choices input { accent-color: #594532; }
/* studio.css styles every input as a wide text box and every label as tiny
   capitals. Undo both here so these are normal radio buttons with readable
   event names. */
/* Nov 14 (Jay, fresh-account test): the round phone radio (thick ring + dot)
   looked heavy. Now a small rounded square; chosen = dark with a thin tick. */
.gallery-project-choices input[type="radio"] {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0;
  border: 1.5px solid rgba(42, 31, 22, .35); border-radius: 5px;
  background: white center / 12px 12px no-repeat; box-shadow: none; cursor: pointer;
}
.gallery-project-choices input[type="radio"]:checked {
  border-color: var(--ink);
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.gallery-project-choices input[type="radio"]:focus-visible { outline: 1px solid rgba(42, 31, 22, .35); outline-offset: 2px; }
.gallery-project-choices label span { color: var(--ink); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.gallery-list-page [data-project-picker] form > div { display: flex; justify-content: flex-end; gap: 8px; }
.gallery-list-page [data-project-picker] button { min-height: 42px; padding: 0 14px; border: 1px solid rgba(42, 31, 22, .25); border-radius: 8px; background: transparent; }
.gallery-list-page [data-project-picker] [data-create-gallery] { background: var(--ink); color: white; }
.gallery-list-page [data-project-picker] [data-picker-new-event] { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 8px; background: var(--ink); color: white; text-decoration: none; }
.gallery-list-page [data-project-picker] [hidden] { display: none; }

/* Phone: the cover sits beside the text, the buttons go under them. */
@media (max-width: 640px) {
  .gallery-row { grid-template-columns: 72px minmax(0, 1fr); gap: 10px 12px; padding: 14px; }
  .gallery-row__cover { width: 72px; height: 54px; }
  .gallery-row__actions { grid-column: 1 / -1; }
  .gallery-row h2 { font-size: 20px; }
  .gallery-list-tools { grid-template-columns: minmax(0, 1fr) 118px; }
}
