/* The booking page: the availability grid with a search, a price column and a booking form.
   It builds on styles.css and v2.css and changes nothing on the availability page itself. */
.book { --price-w: 104px; --act-w: 0px; }
.book.searching { --act-w: 86px; }
.book:not(.priced) { --price-w: 0px; }

/* Search: dates, rooms and guests in one row */
.book .search .wrap { flex-direction: column; align-items: stretch; gap: 10px; }
.book #search { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.book #search label, .sheet-counts label { display: flex; flex-direction: column; gap: 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.book #search input[type="date"], .book #search select, .sheet-counts select { height: 40px; min-width: 0; padding: 0 10px; border: 1px solid var(--hairline); border-radius: 6px; background: #fff; font: inherit; font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.book #search select, .sheet-counts select { min-width: 68px; }
.book #search button { height: 40px; padding: 0 22px; border-radius: 6px; }
.book #search .clear { align-self: center; margin-top: 14px; font-size: 13px; color: var(--muted); }
.book .browse { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.book .found { font-weight: 600; }
.book .how { margin: 0; font-size: 14px; color: var(--ink-2); }
.book .how a, .book .banner a { color: var(--steel); }
.book .banner.done { background: #e3efe0; }
.book .top h1 { grid-column: 2; }

/* The price column sits just before the quantity; it stays in view with the room type */
.book th.price, .book td.price { position: sticky; left: calc(var(--lodge-w) + var(--room-w)); z-index: 4; width: var(--price-w); min-width: var(--price-w); padding: 0 10px; background: #fff; text-align: right; border-bottom: 1px solid var(--soft); }
.book thead th.price { z-index: 9; text-align: right; }
.book tbody td.price { color: var(--ink); font-size: 15px; font-weight: 400; line-height: 16px; border-right: 0; }
.book tbody td.price b { display: block; font-weight: 700; }
.book tbody td.price small { display: block; font-size: 10px; line-height: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.book.priced .qty { left: calc(var(--lodge-w) + var(--room-w) + var(--price-w)); }
.book th.act, .book td.act { width: var(--act-w); min-width: var(--act-w); padding: 0 8px; background: #fff; border-bottom: 1px solid var(--soft); text-align: center; }
.book-button { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: var(--night); color: var(--on-night); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.book-button:hover { background: #2c3a4c; }
@media (min-width: 761px) {
  .book table { min-width: calc(var(--lodge-w) + var(--room-w) + var(--price-w) + var(--qty-w) + var(--act-w) + var(--days) * var(--day-min, 34px)); }
  .book .band-name { width: calc(var(--lodge-w) + var(--room-w) + var(--price-w) + var(--qty-w)); }
  .book tbody td.act { border-right: 0; }
}

/* The nights of the stay, and picking them on the grid */
.book th.day.stay { background: var(--steel-soft); box-shadow: inset 0 3px 0 var(--night); }
.book tbody td.stay { box-shadow: inset 0 3px 0 rgba(29, 38, 50, 0.55), inset 0 -3px 0 rgba(29, 38, 50, 0.55); }
.book tbody td[data-free]:not(.full) { cursor: pointer; }
.book tbody td[data-free]:not(.full):hover { filter: brightness(0.93); }
.book tbody td.chosen { box-shadow: inset 0 0 0 3px var(--night); }
.book tbody td.chosen.full { box-shadow: none; }
.picked { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 14px; max-width: calc(100% - 24px); padding: 10px 12px 10px 18px; border-radius: 10px; background: #fff; border: 1px solid var(--hairline); box-shadow: 0 8px 28px rgba(10, 10, 10, 0.22); font-size: 14px; }
.picked[hidden] { display: none; }
.picked button { height: 32px; padding: 0 10px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; }

/* The booking form, over the page */
.sheet-back { position: fixed; inset: 0; z-index: 200; display: flex; justify-content: flex-end; background: rgba(20, 26, 34, 0.5); }
.sheet { position: relative; width: 460px; max-width: 100%; height: 100%; overflow-y: auto; padding: 28px 28px 36px; background: #fff; display: flex; flex-direction: column; gap: 12px; box-shadow: -8px 0 32px rgba(10, 10, 10, 0.2); }
.sheet h2 { margin: 0; font: 400 24px/32px "Libre Baskerville", Georgia, serif; }
.sheet-close { position: absolute; top: 14px; right: 18px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 18px; font-size: 26px; line-height: 1; color: var(--ink-2); text-decoration: none; }
.sheet-close:hover { background: var(--sunken); }
.sheet-stay { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 8px; background: var(--sunken); }
.sheet-stay strong { font-size: 17px; }
.sheet-stay span { font-size: 14px; color: var(--ink-2); }
.sheet-counts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.quiet-button { height: 40px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 6px; background: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.js .quiet-button { display: none; }
.sheet-price { margin: 0; font-size: 14px; color: var(--ink-2); }
.sheet-price strong { display: block; font-size: 26px; line-height: 32px; color: var(--ink); }
.sheet .small { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }
.sheet .problem { margin: 0; padding: 10px 14px; border-radius: 6px; background: #f8ebe8; color: #7a2e22; font-size: 14px; }
.sheet-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.sheet-form label { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sheet-form label small { font-weight: 400; color: var(--muted); }
.sheet-form input, .sheet-form textarea { width: 100%; border: 1px solid var(--hairline); border-radius: 6px; padding: 0 12px; font: inherit; background: #fff; }
.sheet-form input { height: 44px; }
.sheet-form textarea { padding: 10px 12px; resize: vertical; }
.sheet-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.sheet-form .two > div { display: flex; flex-direction: column; gap: 6px; }
.sheet-form button { height: 48px; margin-top: 14px; border: 0; border-radius: 6px; background: var(--night); color: var(--on-night); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }

/* The staff list of requests */
.requests { max-width: 1240px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 14px; }
.requests h1 { margin: 0; font: 400 26px/34px "Libre Baskerville", Georgia, serif; }
.requests h2 { margin: 18px 0 0; font-size: 18px; }
.requests p { margin: 0; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--soft); border-radius: 10px; background: #fff; }
.list { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 14px; }
.list th { position: static; height: 40px; padding: 0 12px; background: var(--sunken); border-bottom: 1px solid var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: left; }
.list td { height: auto; min-width: 0; padding: 10px 12px; border-bottom: 1px solid var(--soft); background: #fff; text-align: left; vertical-align: top; font-size: 14px; line-height: 19px; }
.list small { font-size: 12px; color: var(--muted); }
.list td form { display: inline-block; margin: 0 4px 4px 0; }
.list .state { font-weight: 600; }
.list .st-declined td { color: var(--muted); }
.rates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.rates label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.rates input { width: 150px; height: 44px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 6px; font: inherit; }

@media (max-width: 760px) {
  .book th.price, .book td.price, .book.priced .qty { position: static; }
  .book #search label { flex: 1 1 28%; }
  .book #search input[type="date"] { width: 100%; }
  .book #search button { flex: 1 1 100%; }
  .sheet { width: 100%; padding: 22px 18px 32px; }
  .picked { left: 12px; right: 12px; transform: none; flex-wrap: wrap; }
  .requests { padding: 20px 16px 40px; }
}

/* The price and Book cells are not day boxes: dark text on white, and the headings keep their line */
.v2.book tbody td.price:not(.qty):not(.note):not(.unknown) { color: var(--ink); font-size: 15px; font-weight: 400; }
.v2.book tbody td.price small { color: var(--muted); }
.v2.book tbody td.price, .v2.book tbody td.act { background: #fff; border-right: 0; border-bottom: 1px solid var(--soft); }
.book thead th.price, .book thead th.act { border-bottom: 2px solid var(--ink); }
.v2.book tbody td.act:not(.qty):not(.note):not(.unknown) { font-size: 13px; }

/* Ticks, terms, and the pages behind the booking page */
.tick { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px !important; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important; cursor: pointer; }
.tick input { width: 18px !important; height: 18px !important; flex: none; padding: 0; margin: 0; }
.terms { margin-top: 10px; font-size: 13px; line-height: 19px; color: var(--ink-2); }
.terms summary { cursor: pointer; color: var(--steel); }
.terms p { margin: 8px 0 0; max-height: 180px; overflow-y: auto; }
.pin select { height: 46px; border: 1px solid var(--hairline); border-radius: 6px; padding: 0 12px; font: inherit; background: #fff; }
.mine-list { display: flex; flex-direction: column; gap: 10px; }
.mine { display: grid; grid-template-columns: 1.3fr 1.5fr 1.2fr auto; gap: 8px 20px; align-items: center; padding: 14px 18px; border: 1px solid var(--soft); border-radius: 10px; background: #fff; }
.mine > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mine span { font-size: 14px; color: var(--ink-2); }
.mine strong { font-size: 16px; }
.mine .state { font-weight: 600; color: var(--ink); }
.mine.st-confirmed .state { color: #2f6b3a; }
.mine.st-declined, .mine.st-cancelled { background: var(--sunken); }
.list .tag { display: inline-block; margin-top: 3px; padding: 1px 6px; border-radius: 4px; background: var(--steel-soft); color: var(--ink-2); }
.list .inline { display: flex !important; flex-wrap: wrap; align-items: center; gap: 10px; }
.list .inline label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.list .inline input:not([type="checkbox"]) { width: 70px; height: 34px; padding: 0 8px; border: 1px solid var(--hairline); border-radius: 6px; font: inherit; }
.rooms-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.rooms-form fieldset { margin: 0; padding: 12px 16px 14px; border: 1px solid var(--soft); border-radius: 10px; background: #fff; }
.rooms-form legend { padding: 0 6px; font-weight: 600; }
.rooms-form button { grid-column: 1 / -1; justify-self: start; }
.texts { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.texts textarea { width: 100%; max-width: 720px; padding: 10px 12px; border: 1px solid var(--hairline); border-radius: 6px; font: inherit; }
.cards { display: none; }
@media (max-width: 760px) {
  .mine { grid-template-columns: 1fr; }
  /* A search on a phone: the rooms found as cards, in place of the grid */
  .book.searching .cards { display: flex; flex-direction: column; gap: 18px; }
  .book.searching #grid, .book.searching .legend, .book.searching .how { display: none; }
  .card-lodge { display: flex; flex-direction: column; gap: 8px; }
  .card-lodge h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; font-size: 16px; }
  .card-lodge h2 img { height: 34px; width: auto; max-width: 60%; object-fit: contain; object-position: left center; }
  .card-lodge h2 small { font-size: 13px; font-weight: 400; color: var(--muted); }
  .room-card { display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--soft); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
  .room-card img { grid-column: 1; width: 76px; height: 64px; border-radius: 8px; object-fit: cover; }
  .room-card .rc-text { grid-column: 2; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .room-card small { font-size: 12px; color: var(--muted); }
  .room-card .rc-price { grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
  .room-card .rc-price b { font-size: 17px; }
  .room-card .rc-price i { margin-top: 4px; padding: 5px 14px; border-radius: 6px; background: var(--night); color: var(--on-night); font-style: normal; font-size: 13px; font-weight: 600; }
}
/* On a phone the GoBookingDirect logo keeps to the right, above the links */
@media (max-width: 760px) {
  .appbar .wrap { padding-top: 10px; }
  .appbar .brand { order: -1; margin-left: auto; }
  .appbar .links { flex-basis: 100%; }
}
