/* Read More / Read Less and section white space. Logic and the per-widget table: ila-readmore.js. */

/* Extra white space added between sections, on top of site.js's 80 / 40px joins. */
.v2-desk, .v2-phone { --rm-section-air: var(--desktop-widget-to-widget-space); }

.rm-air {
  border-top: var(--rm-section-air) solid transparent;
  background-clip: padding-box;
}

/* The phone About columns lay their wrapper out as a row, which would put the button beside the text. */
html body .v2-phone [class*="about-textgrp"] .text-content-wrapper:has(> .rm-btn) { display: block !important; }

/* The button: a quiet text link. */
.rm-btn {
  display: inline;
  margin: 0;
  margin-inline-start: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand-color);
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}
.rm-btn b { font-weight: inherit; text-decoration: underline; text-underline-offset: 3px; }
/* Closed: at the right end of the last row shown. rm-spacer holds it down to that row. */
.rm-spacer { display: block; float: inline-end; width: 0; }
.rm-cut > .rm-btn { float: inline-end; clear: inline-end; margin-inline-start: 6px; }
.rm-cut > .rm-btn::before { content: "\2026"; }

/* One gap from the shortened text to what follows, on every widget */
.rm-cut, .rm-gone { margin-bottom: 0 !important; }
.rm-cut ~ p:empty, .rm-gone ~ p:empty { display: none !important; }
html body :is(.v2-desk, .v2-phone) .content_wrapper .text-content-wrapper:has(.rm-cut) :is(.txt-wdgt-btn-wrapper, ul.ila-list, ul.ila-room-facts) { margin-top: 24px !important; padding-top: 0 !important; }
/* Text over a photo is white; the brand brown would not read there. */
[class*="bgimgtxt"] .rm-btn { color: #fff; }
.rm-btn[hidden],
.rm-btn[aria-expanded="false"] .rm-less,
.rm-btn[aria-expanded="true"] .rm-more { display: none !important; }
.rm-btn:focus-visible { outline: 2px solid var(--brand-color); outline-offset: 2px; }

/* Before the script runs, long text is already held back so it never flashes open.
   Rows here match the trigger rows in RULES; only the widgets near the top of a page need it. */
@media (scripting: enabled) {
  html:not(.rm-ready) .ila-intro-text .text-content-wrapper > :is(p, div):not(:has(.btn)),
  html:not(.rm-ready) .text-content-wrapper:has(> h1) > p,
  html:not(.rm-ready) .title-block:has(h1) ~ .content-block .text-content-wrapper > p,
  html:not(.rm-ready) .widget-wrapper:has(h1):not(:has(p)) + .widget-wrapper .text-content-wrapper > :is(p, div):not(:has(.btn)),
  html:not(.rm-ready) .wt-image-text-slider .text-content-wrapper > h4 + p {
    max-height: 2lh;
    overflow: hidden;
  }
}
/* Hotel home room cards: every card, shortened or not, keeps its button on the card's bottom row, 24px under the text
   (a card without Read More sat 52px lower: owner, 25 Nov 26). */
html body :is(.v2-desk, .v2-phone) .for-homepage.child-hotel #i0bta .text-content-wrapper .txt-wdgt-btn-wrapper { margin-top: auto !important; padding-top: 24px !important; }
/* A slider holding any shortened card drops desktop-ila.css's 5-line paragraph floor: shortened cards show 2 rows,
   so the floor only padded the uncut ones (tall empty boxes, buttons out of line). */
/* The hotel home room cards need no floor at all: their flex column already pins every button to one row. */
html body .v2-desk .gjs-cell .wt-image-text-slider:has(.rm-cut) .text-content-wrapper p,
html body .v2-desk .for-homepage.child-hotel #i0bta .text-content-wrapper p { min-height: 0 !important; }
html body .v2-phone .content_wrapper .text-content-wrapper:has(.rm-cut) > ul.ila-list { margin-top: 24px !important; }
html body .v2-phone .content_wrapper .ila-offer-text:has(.rm-cut) ul.ila-list { margin-top: 24px !important; }

/* a site-wide button rule zeroes margins, so the space before Read Less needs !important */
html body :is(.v2-desk, .v2-phone) .rm-btn { margin-inline-start: 6px !important; }
/* In a slider where some cards are shortened, the uncut cards take the same 24px from text to button: their last
   paragraph kept its own bottom margin, so their buttons sat 8px lower (Maulakali offers, owner 25 Nov 26). */
html body :is(.v2-desk, .v2-phone) .content_wrapper .wt-image-text-slider:has(.rm-cut) .text-content-wrapper > p:empty { display: none !important; }
html body :is(.v2-desk, .v2-phone) .content_wrapper .wt-image-text-slider:has(.rm-cut) .text-content-wrapper > p:is(:has(+ .txt-wdgt-btn-wrapper), :has(+ p:empty)) { margin-bottom: 0 !important; }
html body :is(.v2-desk, .v2-phone) .content_wrapper .wt-image-text-slider:has(.rm-cut) .text-content-wrapper > .txt-wdgt-btn-wrapper { margin-top: 24px !important; padding-top: 0 !important; }
