/* Visitor request list: a reading-room tray that collects works across pages. */

.request-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .9rem 1.25rem;
  padding: .85rem clamp(1rem, 4vw, 2.5rem) calc(.85rem + env(safe-area-inset-bottom));
  background: var(--burgundy);
  box-shadow: 0 -12px 30px rgba(36, 12, 13, .22);
  color: #f8eedf;
  font-family: var(--sans);
  font-size: .86rem;
}

.request-bar[hidden] { display: none; }

.request-bar__text { margin: 0; line-height: 1.35; }

.request-bar__count { color: var(--gold-pale); font-weight: 600; }

.request-bar__note { color: #e6d2c1; }

.request-bar__button {
  flex: 0 0 auto;
  min-height: 46px;
  white-space: nowrap;
}

body.has-request-bar { padding-bottom: 5.25rem; }

/* Every page-level "Request access" control shows its state. */
[data-request-key].is-added {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--burgundy-deep);
}

[data-request-key].is-added:hover {
  background: var(--gold);
  color: var(--burgundy-deep);
}

/* Dialog */
.request-dialog .modal__panel {
  width: min(100%, 44rem);
  padding: clamp(1.6rem, 4vw, 2.8rem);
}

.request-dialog .eyebrow { color: var(--burgundy-soft); }

.request-dialog__intro {
  max-width: 36rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.request-dialog__count {
  margin: 0 0 .6rem;
  color: var(--burgundy);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.request-dialog__count:empty { display: none; }

.request-dialog__empty {
  display: grid;
  gap: 1rem;
  margin: .5rem 0 1.5rem;
  padding: 1.25rem;
  border: 1px dashed rgba(92, 46, 37, .34);
}

.request-dialog__empty p { margin: 0; color: var(--muted); }

.request-dialog__empty .button { justify-self: start; }

.request-dialog__items {
  display: grid;
  max-height: min(42vh, 22rem);
  margin: 0 0 1.25rem;
  padding: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  list-style: none;
}

.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--line);
}

.request-item__text { min-width: 0; }

.request-item__title {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.request-item__title[lang='ar'] { font-family: 'Noto Naskh Arabic', Tahoma, Arial, sans-serif; font-size: 1rem; }

.request-item__category {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .74rem;
}

.request-item__remove {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .5rem;
  border: 0;
  background: transparent;
  color: var(--burgundy);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.request-item__remove:hover { color: var(--burgundy-deep); }

.request-dialog__limit {
  margin: 0 0 1rem;
  color: var(--burgundy);
  font-size: .82rem;
}

.request-dialog__done {
  display: grid;
  gap: .6rem;
  margin: .5rem 0 0;
  padding: 1.4rem;
  border-left: 2px solid var(--gold);
  background: rgba(230, 193, 126, .14);
}

.request-dialog__done h3 { margin: 0; font-size: 2rem; }

.request-dialog__done p { margin: 0; color: var(--ink); }

.request-dialog__done .button { justify-self: start; margin-top: .4rem; }

.request-dialog__form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.request-dialog__form h3 {
  margin: 0;
  font-size: 1.7rem;
}

.request-dialog__form .field {
  border-color: rgba(83, 55, 40, .38);
  background: #fffdfa;
  color: var(--ink);
}

.request-dialog__form label { color: var(--ink); }

.request-dialog__form .form-status[data-state='error'] { color: #8a2a1e; }
.request-dialog__form .form-status[data-state='success'] { color: var(--burgundy); }

.request-dialog__form .form-status:not(:empty) { margin: 0; }

.form-status__fallback {
  color: var(--burgundy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.form-status__fallback:hover { color: var(--burgundy-deep); }

.request-dialog__note {
  margin: 0;
  color: var(--muted);
  font-size: .76rem;
}

/* Contact block on the Archive page */
.request-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.request-contact h2 {
  margin-bottom: .9rem;
  color: #f8eedf;
  font-size: clamp(2.6rem, 4.6vw, 4.2rem);
}

.request-contact__block > p:not(.eyebrow) {
  max-width: 30rem;
  color: #e6d2c1;
  line-height: 1.55;
}

.request-contact__block .eyebrow { color: var(--gold-pale); }

.request-contact__actions { margin: 1.4rem 0 .6rem; }

.request-contact__note {
  margin: 0;
  color: #cdb49f;
  font-size: .76rem;
}

.request-contact a { color: var(--gold-pale); }

.request-contact .request-form { gap: .9rem; }

/* The footer stays focused on navigation; direct contact remains in Contact. */
.footer-email {
  display: none;
}

.footer-email:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .request-contact { grid-template-columns: 1fr; gap: 2.4rem; }
}

@media (max-width: 600px) {
  .request-bar { padding-block: .6rem; font-size: .8rem; }
  .request-bar__button { min-height: 44px; padding-inline: 1rem; }
  body.has-request-bar { padding-bottom: 4.4rem; }
  .request-dialog .modal__panel { max-height: 92vh; padding: 1.4rem 1.2rem 1.6rem; }
  .request-dialog__items { max-height: 36vh; }
}

/* Archive: More details panel */
.work-row__details--more { margin-top: .7rem; }
.work-row__details--more > summary { cursor: pointer; color: var(--burgundy); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; list-style: none; }
.work-row__details--more > summary::-webkit-details-marker { display: none; }
.work-row__details--more > summary::after { content: ' +'; }
.work-row__details--more[open] > summary::after { content: ' −'; }
.work-row__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .7rem 1.4rem; margin: .9rem 0 0; }
.work-row__facts dt { color: var(--muted); font-size: .64rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.work-row__facts dd { margin: .25rem 0 0; color: var(--ink); font-family: var(--serif); font-size: 1.02rem; }
.work-row__entry { margin: .8rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; overflow-wrap: anywhere; }

.work-row__entry { unicode-bidi: plaintext; text-align: start; }

/* Phones: comfortable tap targets and readable small text */
@media (max-width: 600px) {
  .site-footer .footer-nav a,
  .site-footer .footer-email,
  .site-header .brand { display: inline-flex; align-items: center; min-height: 44px; }
  .seminar-item__eyebrow, .seminar-item__type { font-size: .7rem; letter-spacing: .1em; }
  .seminar-item p { font-size: max(.8rem, 12.5px); line-height: 1.5; }
  .seminar-item h3 + p, .seminar-item__content > p:not([class]) { font-size: 13px; }
  .book-card__translation, .book-card__role { font-size: 12px; line-height: 1.4; }
}
@media (max-width: 600px) {
  body.books-page .book-card .book-card__translation,
  body.books-page .book-card .book-card__role { font-size: 12px; line-height: 1.4; }
  .archive-page .text-button { display: inline-flex; align-items: center; min-height: 44px; }
}

/* A cleaner selection tray and review surface for multi-work requests. */
.request-bar {
  padding: .6rem 0 calc(.6rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(83, 55, 40, .28);
  background: #fffdfa;
  box-shadow: 0 -14px 34px rgba(36, 12, 13, .16);
  color: var(--ink);
}

.request-bar__inner {
  display: flex;
  width: min(calc(100% - 84px), var(--container));
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-inline: auto;
}

.request-bar__copy { min-width: 0; }
.request-bar__label { margin: 0 0 .12rem; color: var(--burgundy-soft); font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.request-bar__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin: 0; color: var(--ink); font-size: .82rem; line-height: 1.35; }
.request-bar__count { color: var(--burgundy); font-weight: 700; }
.request-bar__note { color: var(--muted); font-size: .75rem; }
.request-bar__note::before { content: '·'; margin-right: .5rem; color: var(--gold); }
.request-bar__button { min-height: 2.75rem; gap: .85rem; padding-inline: 1.05rem; white-space: nowrap; }
.request-bar__arrow { font-size: 1rem; line-height: 1; }
body.has-request-bar { padding-bottom: 5.5rem; }

.request-dialog .modal__panel {
  width: min(100%, 48rem);
  max-height: min(92vh, 52rem);
  padding: 0;
  border-top: 4px solid var(--gold);
  background: #fffdfa;
  box-shadow: 0 28px 70px rgba(24, 8, 11, .3);
}

.request-dialog .modal__close { top: 1rem; right: 1rem; z-index: 1; background: rgba(255, 253, 250, .78); }
.request-dialog__header { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: clamp(1.6rem, 4vw, 2.5rem) clamp(1.35rem, 4vw, 2.7rem) 1.15rem; border-bottom: 1px solid var(--line); }
.request-dialog__header .eyebrow { margin-bottom: .8rem; }
.request-dialog__header h2 { margin: 0; }
.request-dialog__header-mark { padding: .32rem .55rem; border: 1px solid rgba(128, 91, 52, .3); color: var(--burgundy-soft); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.request-dialog__intro { max-width: none; margin: 0; padding: 1.1rem clamp(1.35rem, 4vw, 2.7rem) 0; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.request-dialog__summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem clamp(1.35rem, 4vw, 2.7rem); padding: .75rem .85rem; border: 1px solid rgba(128, 91, 52, .25); background: #f7f0e7; }
.request-dialog__summary[hidden] { display: none; }
.request-dialog__count { margin: 0; color: var(--burgundy); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.request-dialog__summary-note { margin: 0; color: var(--muted); font-size: .72rem; }

.request-dialog__items { max-height: min(36vh, 22rem); margin: 0 clamp(1.35rem, 4vw, 2.7rem) 1.15rem; border: 1px solid var(--line); }
.request-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .9rem .85rem; border: 0; background: #fffdfa; }
.request-item + .request-item { border-top: 1px solid var(--line); }
.request-item:nth-child(even) { background: #faf6ef; }
.request-item__number { display: inline-grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid rgba(128, 91, 52, .35); border-radius: 50%; color: var(--burgundy-soft); font-size: .62rem; font-weight: 700; letter-spacing: .04em; }
.request-item__title { font-size: 1.06rem; }
.request-item__category { margin-top: .28rem; color: var(--burgundy-soft); font-size: .64rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.request-item__remove { display: inline-flex; min-width: 4.4rem; align-items: center; justify-content: center; gap: .35rem; min-height: 2.5rem; padding: .35rem .45rem; border: 1px solid rgba(83, 55, 40, .2); background: transparent; color: var(--burgundy); text-decoration: none; }
.request-item__remove:hover, .request-item__remove:focus-visible { border-color: var(--burgundy); background: var(--burgundy); color: var(--ivory); }
.request-item__remove-label { font-size: .7rem; }
.request-item__remove-icon { color: var(--gold); font-size: 1rem; line-height: 1; }
.request-item__remove:hover .request-item__remove-icon, .request-item__remove:focus-visible .request-item__remove-icon { color: var(--gold-pale); }

.request-dialog__empty { margin: 1rem clamp(1.35rem, 4vw, 2.7rem) 1.5rem; padding: 1.2rem; border-color: rgba(128, 91, 52, .32); background: #faf6ef; }
.request-dialog__limit { margin-inline: clamp(1.35rem, 4vw, 2.7rem); }
.request-dialog__form { margin: 1.5rem clamp(1.35rem, 4vw, 2.7rem) 2rem; padding: 1.35rem; border: 1px solid rgba(83, 55, 40, .2); background: #faf6ef; }
.request-dialog__form-heading { margin-bottom: .35rem; }
.request-dialog__form-heading .eyebrow { margin-bottom: .65rem; }
.request-dialog__form-heading h3 { margin: 0 0 .35rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.request-dialog__form-heading p:last-child { margin: 0 0 1rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.request-dialog__form .field { min-height: 3rem; }
.request-dialog__send { width: 100%; min-height: 3.15rem; }
.request-dialog__note { text-align: center; }
.request-dialog__done { margin: 1.5rem clamp(1.35rem, 4vw, 2.7rem) 2rem; padding: 1.5rem; border: 1px solid rgba(128, 91, 52, .3); border-left: 3px solid var(--gold); background: #f7f0e7; }

@media (max-width: 600px) {
  .request-bar__inner { width: min(calc(100% - 36px), var(--container)); align-items: stretch; flex-direction: column; gap: .55rem; }
  .request-bar__button { width: 100%; justify-content: space-between; }
  body.has-request-bar { padding-bottom: 7.5rem; }
  .request-dialog .modal__panel { max-height: 94vh; }
  .request-dialog__header { align-items: flex-start; flex-direction: column; padding-right: 4.2rem; }
  .request-dialog__header-mark { align-self: flex-start; }
  .request-dialog__summary { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .request-dialog__items { max-height: 32vh; }
  .request-item { grid-template-columns: 1.7rem minmax(0, 1fr); gap: .65rem; }
  .request-item__remove { grid-column: 2; justify-self: start; min-height: 2.25rem; }
  .request-dialog__form { margin-top: 1.25rem; }
}


