/*
|--------------------------------------------------------------------------
| Public room browser
|--------------------------------------------------------------------------
|
| The three open-web pages behind "Browse Rooms": the browse grid, a property,
| and one room. Layout on those pages is Tailwind utilities, exactly like the
| rest of the landing site, which loads Tailwind from the CDN and therefore
| needs no build step.
|
| What lives HERE is only what a utility class cannot say without repeating
| itself: the visual atoms those pages use over and over -- a chip, a card, a
| price, a fact, a section -- named once so a template can carry the name and
| no styling at all. Blade holds translations; this file holds the look.
|
| public/css rather than resources/css because this project does not run
| `npm run build`: anything under resources/ would never reach a browser.
| Linked from the welcome layout, so it is loaded on every public page.
|
| Colours are the landing site's own: primary #4F46E5, deepening to #312e81.
|
*/

/* The gradient band at the top of a page, and at the foot of it. */
.pr-hero {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
}

.pr-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  margin-bottom: 0.9rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* A card: the browse page's kinds, and a property page's rooms. */
.pr-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pr-card:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 14px 30px -18px rgba(49, 46, 129, 0.45);
}

.pr-card__head {
  padding: 1rem 1.1rem;
  background: linear-gradient(120deg, #312e81 0%, #4f46e5 100%);
  color: #fff;
}

.pr-card__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.pr-card__sub {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.pr-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
}

/* Pushes a card's call to action to the bottom however tall its body is. */
.pr-card__foot {
  margin-top: auto;
}

/* A property's photograph, wherever one is shown -- the top of a browse card,
   the corner of a property's hero, beside a room's address. One shape in all
   three, so the same building is not a letterbox on one page and a square on
   the next.

   16:9 because that is the shape the owner's own upload preview crops to (see
   public/css/image-upload.css), so what an owner approves on the form is what a
   visitor is shown.

   The height comes from the ratio rather than from the file, so the box is
   already the right size before anything has downloaded: a grid of twelve cards
   settles once instead of jumping a card at a time as the photographs arrive. */
.pr-cover {
  display: block;
}

.pr-cover__frame {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef2ff;
}

.pr-cover__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

/* A photograph fills its frame rather than sitting inside it, so a card lifting
   under the pointer takes the picture with it. */
.pr-card:hover .pr-cover__image {
  transform: scale(1.04);
}

/* What is drawn for a property that has no photograph yet -- and for one whose
   photograph could not be addressed, because a bucket the application cannot
   reach hands back the same null. Not white space and not a broken picture: a
   wash and a mark, so a card without one keeps exactly the silhouette of the
   cards beside it in the grid. */
.pr-cover__frame--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #e2e8f0 100%);
  color: #c7d2fe;
}

/* Corners of its own, for the places nothing else clips it -- inside a padded
   panel, or against the hero. A browse card needs none: .pr-card is already
   `overflow: hidden` and rounds the picture for free. */
.pr-cover--framed .pr-cover__frame {
  border: 1px solid #eef0f4;
  border-radius: 0.65rem;
}

/* The same frame on the gradient band, where a slate border disappears and the
   pale placeholder reads as a hole punched through it. */
.pr-cover--onhero .pr-cover__frame {
  border-color: rgba(255, 255, 255, 0.25);
}

.pr-cover--onhero .pr-cover__frame--empty {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.55);
}

/* The line under a photograph that has to say what it is a photograph OF -- the
   building, on a page about one room inside it. */
.pr-cover__caption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #94a3b8;
}

/* A chip: one short fact about a room, in one of four voices. */
.pr-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}

.pr-chip--brand {
  border-color: #e0e7ff;
  background: #eef2ff;
  color: #4338ca;
}

.pr-chip--muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.pr-chip--live {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

/* The same, on a coloured card head, where a border would disappear. */
.pr-chip--onhead {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* The dot beside "free to take now" -- a quiet pulse, stilled for anybody who
   has asked their system not to animate. */
.pr-dot {
  position: relative;
  display: inline-flex;
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
}

.pr-dot::before,
.pr-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: currentColor;
}

.pr-dot::before {
  animation: pr-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
}

@keyframes pr-ping {
  75%, 100% { transform: scale(2.4); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pr-dot::before { animation: none; }
  .pr-card:hover { transform: none; }
  .pr-card:hover .pr-cover__image { transform: none; }
}

/* A price, wherever one is quoted. */
.pr-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pr-price__prefix {
  font-size: 0.75rem;
  color: #94a3b8;
}

.pr-price__amount {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  color: #4338ca;
}

.pr-price__to {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
}

.pr-price__period {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* A white panel with a heading -- the room page is built out of these. */
.pr-section {
  overflow: hidden;
  border: 1px solid #eef0f4;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pr-section__title {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid #f1f5f9;
  background: #fafbff;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #475569;
}

.pr-section__body {
  padding: 1.15rem;
}

/* One labelled figure. Rows of these are how a room states its terms. */
.pr-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px dashed #f1f5f9;
}

.pr-fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.pr-fact:first-child {
  padding-top: 0;
}

.pr-fact__label {
  font-size: 0.875rem;
  color: #64748b;
}

.pr-fact__value {
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: right;
  color: #0f172a;
}

.pr-fact__hint {
  margin-left: 0.3rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: #94a3b8;
}

/* The trail back up. The separators are drawn by CSS rather than typed between
   the links, so a template holds nothing but the names of the pages. */
.pr-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.pr-crumb > * + *::before {
  content: '\203A';
  margin-right: 0.5rem;
  color: #cbd5e1;
}

.pr-crumb a {
  color: #4f46e5;
}

.pr-crumb a:hover {
  text-decoration: underline;
}

.pr-crumb > span:last-child {
  min-width: 0;
  overflow: hidden;
  color: #334155;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The filter panel, above the results on both listing pages. */
.pr-filters {
  padding: 1rem;
  border: 1px solid #eef0f4;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pr-filters__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.pr-filters__field {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.55rem;
  background: #fff;
  font-size: 0.875rem;
  color: #0f172a;
}

.pr-filters__field:focus {
  border-color: #4f46e5;
  outline: 2px solid rgba(79, 70, 229, 0.18);
  outline-offset: 0;
}

/* The two buttons every public page uses: one to act, one to step back. */
.pr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.55rem;
  background: #4f46e5;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.pr-button:hover {
  background: #4338ca;
  box-shadow: 0 10px 20px -12px rgba(67, 56, 202, 0.9);
}

.pr-button--quiet {
  background: #f1f5f9;
  color: #475569;
}

.pr-button--quiet:hover {
  background: #e2e8f0;
  box-shadow: none;
}

.pr-button--onhero {
  background: #fff;
  color: #4338ca;
}

.pr-button--onhero:hover {
  background: #eef2ff;
}

/* A line of small facts -- "Building A", "Floor 1" -- with the dots between
   them drawn by CSS. A part that has nothing to say is simply not printed, and
   the separator goes with it, so no line ever opens on a stray dot. */
.pr-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pr-meta > * + *::before {
  content: '\00B7';
  margin-right: 0.35rem;
}
