/********************* Common **********************/
:root {
  --bg-white:#FFFFFF;
  --bg-page: #F5F5F5;
  --bg-button: linear-gradient(to bottom right, #3F88CB, #53B5BB);
  --bg-header: #3F88CB;

  --footer-btn-width: 5.5rem;
  --portrait-width: 800px; /*var() not working for media queries, if you change this, change the other 800 & 801 also*/
  --landscape-width: 1280px;
}
body {
  --bg-button: linear-gradient(to bottom right, #3F88CB, #53B5BB);
}
body.offline, body.offline-error {
  --bg-button: linear-gradient(to bottom right, chocolate, crimson);
}
body.local {
  --bg-button: linear-gradient(to bottom right, green, darkgreen);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: lato, sans-serif;
  font-size: 16px;
  background-color: var(--bg-white);
}
body > svg {
  display: none;
}
.page {
  display: none;
}

.btn-xs {
  padding: 0 5px !important;
  font-size: 0.875rem !important;
  text-align: center !important;
  min-width: 4.5em;
}

.btn-inv {
  padding: 0 5px !important;
  font-size: 0.875rem !important;
  text-align: center !important;
  width: 4rem; /*4.5em;*/
  position: relative;
}

.btn-xs2 {
  padding: 0 5px !important;
  font-size: 0.875rem !important;
  text-align: center !important;
  min-width: 50px;
}

.btn-xxs {
  padding: 0 5px !important;
  font-size: 0.875rem !important;
  text-align: center !important;
  width: 2.5em;
}

.form-select-xs {
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 0.5em;
  font-size: 12px;
  border-radius: 0.25em;
}
.form-control-xs,
.input-group-xs > .form-control {
  min-height: calc(1.5em + 0.5em + 2px);
  padding: 0.25em;
  font-size: 12px;
  border-radius: 0.25em;
}

.input-group-xs > .input-group-text {
  padding: 0.25em 0.5em;
  font-size: 12px;
  border-radius: 0.25em;
}

.x-highlight {
  font-weight: bold;
  color: red;
}

.wem7 {
  width: 7em !important;
}

.x-lh1 {
  line-height: 1;
}
.x-fs14 {
  font-size: 14px;
}

.x-tiny-time {
  height: 20px;
}
.x-tiny-time::-webkit-calendar-picker-indicator {
  display: none;
}

/********************* Login Page **********************/

/*
#loginPage {
  padding-top: 20vh;
}
#loginPage h1 {
  margin-bottom: 10vh;
}
#loginPage p {
  text-align: center;
}
#lgnErrorTxt {
  text-align: center;
  color: red;
}*/

#loginPage {
  position: absolute;
  top:0;
  left:0;
  right: 0;
  bottom: 0;
  background: url('img/login.jpg') no-repeat fixed center center;
  background-size: cover;
  display: none;
}
#loginPage > div {
  margin-top: 45vh;
  text-align: center;
}
#loginPage input {
  margin-bottom: 1em;
  width: 20rem;
}
#lgnErrorTxt {
  color: white;
  background-color: rgba(0,0,0,0.3);
}

/********************* Warning page **********************/

#warningPage {
  position: fixed;
  top:0;
  left:0;
  right: 0;
  bottom: 0;
  background-color: black;
  opacity: 0;
  color:white;
  padding-top: 30vh;
  display: none;
  transition: opacity 1s linear;
  z-index: 1000;
}
#warningPage h1, #warningPage h2, #warningPage h3 {
  text-align: center;
}


/********************* Main page **********************/

.x-hdr-wrapper {
  position: sticky;
  top: 0;
  height: 55px;
  background-color: white;
  z-index: 110;
}
body.offline .x-hdr-wrapper {
  background-color: orange;
}
body.offline-error .x-hdr-wrapper,
body.witherror .x-hdr-wrapper {
  background-color: red;
}
/* unobtrusive "update downloaded, will apply shortly" badge, shown on every page
   (set by showUpdateReadyBadge in htl_main2.js) */
body.updateready::after {
  content: attr(data-updateready);
  position: fixed;
  top: 4px;
  right: 8px;
  z-index: 200;
  background: #3F88CB;
  color: white;
  font-size: 12px;
  line-height: 1.4;
  padding: 2px 8px;
  border-radius: 10px;
  opacity: 0.85;
  pointer-events: none;
}
.hdr {
  width: 95%;
  margin: auto;
}

#menuBtn, #menuBtn2, #menuBtn3 {
  position: absolute;
  top:7px;
  left:7px;
  width: 30px;
}

.queueStatus {
  position: absolute;
  top: 35px;
  left:7px;
  font-size: 0.8rem;
}
.queueStatus:empty {
  display: none;
}
#hkStatusTbl {
  position: absolute;
  top: 0;
  right:10px;
  font-size: 12px;
  text-align: center;
}
#hkStatusTbl tr {
  line-height: 1;
}
#hkStatusTbl th:first-child {
  text-align: left;
}
#hkStatusTbl th {
  padding: 0 5px;
}

.x-lr-btn {
  border-color: var(--bs-border-color);
}


.x-tbl-header {
  font-size: 14px;
  font-weight: 700;
  color: white;
  box-shadow: inset 0 0 0 9999px transparent;
  padding: 0;

  position: sticky;
  top: 55px;
  z-index: 100;
}
.x-tbl-header-light {
  font-size: 14px;
  font-weight: 700;
  color: white;
  box-shadow: inset 0 0 0 9999px transparent;
  padding: 0;
} 

.x-tbl-bookings {
  display: flex;
}
.x-row {
  font-size: 12px;
  border-bottom: 1px solid rgb(222, 226, 230);
  line-height: 24px; /*this small is the button*/
  padding: 6px 0;
}
.x-row-no-bb {
  font-size: 12px;
  line-height: 24px; /*this small is the button*/
}

/*
.x-tbl-bookings.x-row:hover {
  filter: brightness(0.9);
}*/


.x-row.x-no-booking-today {
  background-color: lightgray;     /*antiquewhite; /*whitesmoke*/
}
.x-row.x-recently-arrived {
  background-color: lightcyan;
}
/* Recovery passes: synthesised from a cancelled-booking folio with orphan items.
   In-your-face styling so staff don't miss them. Disappears once items are merged out
   (the row stops being rendered in the recovery section by the JS). */
.x-title-tbl-row.x-recovery-title {
  background-color: #c0392b;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 12px;
  border: 2px solid #7c1f15;
  font-size: 14px;
}
.x-row.x-row-recovery {
  background-color: #ffe4e1;
  border-left: 6px solid #c0392b;
  border-right: 2px solid #c0392b;
  border-bottom: 2px solid #c0392b;
  font-weight: 600;
}
.x-row.x-row-recovery:hover {
  background-color: #ffd0cb;
}
.x-recovery-badge {
  display: inline-block;
  background-color: #c0392b;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.x-small {
  font-size: 8px;
}

.x-tbl-bookings > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-bookings > span:nth-child(1) {
  /* Room status */
  flex: 0 0 4.2rem;
  text-align: left;
}
.x-tbl-bookings > span:nth-child(2) {
  /* Room */
  flex: 1 0 5.5rem;
  text-align: center;
}
.x-tbl-bookings .x-room-span {
  /* tight line box, top-aligned, so the room name lines up with the top of the payment badge */
  display: inline-block;
  vertical-align: top;
  line-height: 15px;
}
.x-inv-nr {
  /* invoice number between the room name and the Invoice button */
  display: block;
  font-size: 10px;
  line-height: 1px;
  color: #BBBBBB;
  text-align: center !important;
  position: relative;
  top:-4px;
}
.x-tbl-bookings > span:nth-child(3) {
  /* Guest (name) */
  flex: 5 0 5rem;
  padding-left: 5px;
}
.x-tbl-bookings > span:nth-child(4) {
  /* Adults*/
  flex: 0 0 1.5rem;
  text-align: center;
}
.x-tbl-bookings > span:nth-child(5) {
  /* Children */
  flex: 0 0 1.5rem;
  text-align: center;
}
.x-tbl-bookings > span:nth-child(6) {
  /* Infants */
  flex: 0 0 1.5rem;
  text-align: center;
}

.x-tbl-bookings > span:nth-child(7) {
  /* CheckIn */
  flex: 0 0 3.5rem;
  text-align: center;
}
.x-tbl-bookings > span:nth-child(8) {
  /* CheckOut */
  flex: 0 0 3.5rem;
  text-align: center;
}
.x-tbl-bookings > span:nth-child(9) {
  /* nr nights */
  flex: 0 0 2rem;
  text-align: center;
}
.x-tbl-bookings > span:nth-child(10) {
  /* Meal */
  flex: 0 0 3rem;
  text-align: center;
}

.x-tbl-bookings > span:nth-child(11) {
  /* Comments B24*/
  flex: 25 0 10rem;
  padding-right: 1rem;
}
.x-tbl-bookings > span:nth-child(12) {
  /* Comments FO*/
  flex: 10 0 10rem;
}


.x-tbl-bookings.x-tbl-header > span:nth-child(11) {
  /* Comments B24*/
  text-align: center;
}
.x-tbl-bookings.x-tbl-header > span:nth-child(12) {
  /* Comments FO*/
  text-align: center;
}



.x-tbl-bookings.x-row > span > span[title].x-name-span {
  position: relative;
  cursor: help;
  display: inline-block;
  width: 100%;
}
.x-tbl-bookings.x-row > span > span[title].x-name-span::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 5px 5px 0;
  border-color: transparent black transparent transparent;
  right: 0;
  top: 0;
  position: absolute;
}

.x-pay-style {
  display: inline-block;
  height:23px;
  width:4rem;
  margin:0 0.1rem;
  border-radius: 6px;
  text-align: center !important;
  font-size: 12px;
  overflow-x: hidden;
  cursor: default;
}

.x-overflw {
  overflow: hidden;
}
/* other types of rows */
.x-empty-tbl-row {
  height: 2rem;
  width: 100%;
}
.x-segment-tbl-row {
  /*text-align: center;*/
  min-height: 2rem; /* not a fixed height: room-category names can wrap to 2 lines on phones */
  font-size: 1.25rem;
  font-weight: bold;
  padding-left: 1rem;
}

.x-title-tbl-row {
  text-align: center;
  height: 2rem;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.x-highlight-booked-today {
  background-color: tomato;
  color: white;
}
@media print {
  .x-highlight-booked-today {

    background-color: #ffffff;
    opacity: 1;
    background: linear-gradient(135deg, #e0e0e055 25%, transparent 25%) -4px 0/ 8px 8px, 
                linear-gradient(225deg, #e0e0e0 25%, transparent 25%) -4px 0/ 8px 8px, 
                linear-gradient(315deg, #e0e0e055 25%, transparent 25%) 0px 0/ 8px 8px, 
                linear-gradient(45deg, #e0e0e0 25%, #ffffff 25%) 0px 0/ 8px 8px;

    color: black;
  }
}


.x-highlight-booked-today button {
  --bs-btn-color:white;
  --bs-btn-border-color:white;

}
.x-already-checked-out {
  background-color: lightgrey;
}

.x-highlight-hanging-arrival {
  background-color: bisque;
}

#tblBookingsGuests {
  padding-top: 0;
  margin-bottom: 2rem; /*because there is nothing after */
  margin-top: 7px; /* this is to compensate for something, not sure what*/
}

.x-row-edit {
  font-size: 12px;
  line-height: 20px;
  background-color: aquamarine;
  padding: 5px 0;
}

.x-tbl-bookings.x-row > span > button.btn.btn-xs {
  position: relative;
}
.master-bkn {
  font-size: 8px;
  position: absolute;
  bottom:0.5em;
  right:4px;
}

.x-black {
  color:white;
  background-color: black;
}
.x-hk-black {
  color:white;
  background-color: black;
}

.x-ACI {
  display: inline-block !important;
  width: 4em !important;
}
.x-total-price {
  display: inline-block !important;
  width: 12.6em !important;
}

.x-room-status-span {
  display: inline-block;
  width:100%;
  text-align: center !important;
}

.x-room-status {
  width: 4rem;
  border-radius: 10px;
  border: 1px solid black;
  font-size: 10px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center !important;
  padding: 4px 0;
}
.x-room-status-bkn {
  width: 4rem;
  border-radius: 6px; /*was 10px;*/
  border: 1px solid black;
  font-size: 0.875rem; /*was 10px;*/
  /*font-weight: bold;*/
  line-height: 1.2;
  text-align: center !important;
  padding: 2px;
  margin-top: 2.5px;
}

.x-room-status.x-clean {
  background-color: green;
}
.x-room-status.x-dirty {
  background-color: grey;
}
.x-room-status.x-makeup {
  background-color: red;
}
.x-room-status.x-unknown {
  background-color: lightgray;
}
.x-room-status.x-nottoday {
  background-color: whitesmoke;
}



.x-room-status-bkn.x-clean {
  border-color: green;
  color: green;
  background-color: transparent;
}
.x-room-status-bkn.x-dirty {
  border-color: grey;
  color: grey;
  background-color: transparent;
}
.x-room-status-bkn.x-makeup {
  border-color: red;
  color: red;
  background-color: transparent;
}
.x-room-status-bkn.x-unknown {
  border-color: lightgray;
  color: lightgray;
  background-color: transparent;
}
.x-room-status-bkn.x-nottoday {
  border-color: whitesmoke;
  color: whitesmoke;
  background-color: transparent;
}


.x-booking-nickname {
  font-size: 8px;
  white-space: nowrap;
}
.x-dbl-folio-btn {
  height: 3rem;
  margin-bottom: 1px;
}

.x-tooltip-container {
  position: relative;
  display: inline-block;
}

.x-tooltip-text {
  visibility: hidden;
  width: 170px;
  line-height: 1.2;
  background-color: #333;
  color: #fff;
  text-align: left !important;
  padding: 5px;
  border-radius: 5px;
  position: absolute;
  bottom: calc(100% + 5px);
  right: 5px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.x-tooltip-container:hover .x-tooltip-text {
  visibility: visible;
  opacity: 1;
}

.x-btn-meal {
  width: 2rem;
  padding:0;
  font-size: 12px;
  text-align: center !important;
}

.x-grayed {
  opacity: 0.3;
}

/* in-house copy of a partly-arrived split booking: gray every column except the ones
   marked x-opaque (a child cannot undo an ancestor's opacity, hence the per-child gray) */
.x-partly-arrived > * {
  opacity: 0.3;
}
.x-partly-arrived > .x-opaque {
  opacity: 1;
}

.x-fo-comments {
  padding: 0 5px;
  margin-right: 5px;
  border: solid 1px #F0F0F0;
  border-radius: 5px;
}
.x-fo-comments textarea {
  width: 100%;
  height: 100%;
  min-height: 3em;
  margin-right: 5px;
  line-height: 1.4;
}

.x-goto-ad {
  width:5.5rem;
}
#guestsRoomsModalDate {
  border: 1px solid lightblue;
  border-radius: 5px;
  padding-left: 5px;
}

.x-pay-providers label {
  display: block;
}
.x-pay-providers input[type="checkbox"] {
  margin: 4px 10px;
}

/********************* Service page **********************/

.x-tbl-services {
  display: flex;
}

.x-tbl-services > span {
  padding: 4px 3px;
  text-align: center;
}

/* phone-only flex line break (see the phone media query); inert on desktop */
.x-tbl-services > span.x-srv-rowbreak {
  display: none;
}

.x-tbl-services > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-services-segment {
  font-size: 20px;
  font-weight: bold;
  margin-top: 1rem;
  border-bottom: 1px solid black;
  display: flex;
}
.x-tbl-services-segment > span {
  padding: 3px 10px;
}
.x-tbl-services-segment > span:nth-child(1) {
  flex: 1 0 10rem;
  text-align: left !important;
}
.x-tbl-services-segment > span:nth-child(2) {
  flex: 1 0 10rem;
  text-align: right !important;
}

.x-tbl-services > span * {
  vertical-align: middle;
  /*text-align: left;*/
}

.x-tbl-services > span:nth-child(1) {
  /* Date/Time */
  flex: 1 0 4.7rem;
  text-align: center;
}
.x-tbl-services > span:nth-child(2) {
  /* Resort */
  flex: 1 0 3.5rem;
  text-align: center;
}

.x-tbl-services > span:nth-child(3) {
  /* Room */
  flex: 1 0 3.5rem;
  text-align: center;
}

.x-tbl-services > span:nth-child(4) {
  /* Guest (name) */
  flex: 2 0 5rem;
}
.x-tbl-services > span:nth-child(5) {
  /* Service name (action name) + subcat */
  flex: 2 0 8rem;
}
.x-tbl-services > span:nth-child(6) {
  /* Field1 (ACI) */
  flex: 1 0 4rem;
}
.x-tbl-services > span:nth-child(7) {
  /* Field2 */
  flex: 1 0 6rem;
}
.x-tbl-services > span:nth-child(8) {
  /* Internal Field1 */
  flex: 1 0 6rem;
}
.x-tbl-services > span:nth-child(9) {
  /* Internal Field2 */
  flex: 1 0 6rem;
}
.x-tbl-services > span:nth-child(10) {
  /* Internal Field3 */
  flex: 1 0 6rem;
}
.x-tbl-services > span:nth-child(11) {
  /* Price */
  flex: 1 0 5rem;
}
.x-tbl-services > span:nth-child(12) {
  /* Status */
  flex: 0 0 6rem;
  text-align: center;
}
.x-tbl-services > span:nth-child(13) {
  /* Edit, + btns */
  flex: 0 0 4.5rem;
  /*text-align: right;*/
}

.x-tbl-services > span:nth-child(13) > svg {
  width: 1.5em;
  cursor: pointer;
}


.x-tbl-services div.dropdown > button {
  /* this is status btn*/
  width: calc(6rem - 6px); 
}

.x-service-select2 {
  width: 50%;
  display: inline-block;
} 
.x-service-select {
  width: 100%;
}

#tblServices input[type="date"] {
  width: 7rem;
  margin: auto;
}
#tblServices input[type="number"] {
  
  display: inline-block;
  margin: auto;
}
#tblServices input[type="number"].no-arrows {
  width: 1rem;
}

#tblServices input[type="number"].x-big {
  width: 5rem;
  margin: auto;
}

.x-status {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 0.5rem;
  border: 1.5px solid black;
  margin-right: 5px;
}
.x-status-none {
  border-color: transparent;
}


#srvcEdtItem_price {
  transition: background-color 1s ease;
}
.flash-red {
  background-color: red !important;
}

/* Chrome, Safari, Edge, Opera */
.no-arrows::-webkit-inner-spin-button,
.no-arrows::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.no-arrows {
  -moz-appearance: textfield;
}
.x-small-print {
  font-size: 12px;
  font-weight: normal;
  opacity: 0.5;
}

.x-status-print {
  font-weight: bold;
}

/********************* HouseKeeping page **********************/

#tblHouseKeeping {
  padding-top: 0;
  margin-bottom: 2rem; /*because there is nothing after */
  margin-top: 7px; /* this is to compensate for something, not sure what*/
}
#hkSaveBtn {
  width: 4.5rem;
}
.x-linenchange-confident {
  color: red;
  font-weight: bold;
}
.x-linenchange {
  font-weight: bold;
}
.x-tbl-hk {
  display: flex;
}
.x-tbl-hk > span {
  padding: 4px 3px;
  text-align: center;
}

.x-tbl-hk > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-hk > span:nth-child(1) {
  /* room name */
  flex: 1 0 3.5rem;
  text-align: center;
}

.x-tbl-hk > span:nth-child(2) {
  /* status */
  flex: 1 0 3.5rem;
  text-align: center;
}

.x-tbl-hk > span:nth-child(3) {
  /* assign to section/group */
  flex: 1 0 5rem;
  text-align: center;
}

.x-tbl-hk > span:nth-child(4) {
  /* Guest name */
  flex: 5 0 5rem;
  text-align: center;
}

.x-tbl-hk > span:nth-child(5) {
  /* check in date */
  flex: 0 0 3.5rem;
}

.x-tbl-hk > span:nth-child(6) {
  /* check out date */
  flex: 0 0 3.5rem;
}

.x-tbl-hk > span:nth-child(7) {
  /* comments */
  flex: 25 0 10rem;
  text-align: left;
}

.x-tbl-hk > span:nth-child(8) {
  /* info for housekeeping */
  flex: 3 0 20rem;
  text-align: left;
}
.x-tbl-hk > span:nth-child(8) > span {
  display:inline-block;
  width: 50%;
  vertical-align: top;
}
.x-tbl-hk > span:nth-child(8) > textarea {
  width: 100%;
}

/* print table */
.x-tbl-hk-print-section {
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  padding: 4px 3px;
  border-bottom: 1px solid black;
  margin-top: 2rem;
}
.x-tbl-hk-print {
  display: flex;
}
.x-tbl-hk-print > span {
  padding: 4px 3px;
  text-align: center;
}
.x-tbl-hk-print > span:nth-child(1) {
  /* room name */
  flex: 1 0 5rem;
}
.x-tbl-hk-print > span:nth-child(2) {
  /* booking(s) */
  flex: 1 0 10rem;
}
.x-tbl-hk-print > span:nth-child(3) {
  /* housekeeping items */
  flex: 1 0 10rem;
  text-align: left;
}
.x-tbl-hk-print > span:nth-child(4) {
  /* comments */
  flex: 5 0 10rem;
  text-align: left;
}

@media print {
  .x-section {
    /* Prevent page breaks inside the section */
    -webkit-column-break-inside: avoid; /* Chrome, Safari */
    page-break-inside: avoid;          /* Older browsers */
    break-inside: avoid;               /* Standard syntax */
  }
}

/********************* Folio Details page **********************/

#fldBookingDetails th {
  padding-right: 1rem;
}

.x-tbl-pers-details {
  display: flex;
}

.x-tbl-pers-details > span {
  padding: 4px 3px;
  text-align: center;
}

.x-tbl-pers-details > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-pers-details > span:nth-child(1) {
  /* No. */
  flex: 1 0 1rem;
}
.x-tbl-pers-details:not(.x-pp-row) > span:nth-child(2) {
  /* Inv. No. — only relevant when the booking is split into multiple invoices; the
     folioDetailsPage x-show-inv-col class reveals it (pp rows keep their own 3-span layout).
     Wide enough for the new-person target-invoice select: a 5-digit invoice number or
     "(pls sel)" plus the dropdown arrow */
  flex: 0 0 6rem;
  display: none;
}
#folioDetailsPage.x-show-inv-col .x-tbl-pers-details:not(.x-pp-row) > span:nth-child(2) {
  display: block;
}
.x-tbl-pers-details > span:nth-child(3),
.x-tbl-pers-details > span:nth-child(4) {
  /* First / Last name */
  flex: 10 0 3rem;
  text-align: left;
}

.x-tbl-pers-details > span:nth-child(5) {
  /* Birthdate */
  flex: 0 0 7.5rem;
}

.x-tbl-pers-details > span:nth-child(6) {
  /* Age */
  flex: 1 0 3rem;
}

.x-tbl-pers-details > span:nth-child(7) {
  /* Adult/Child/Infant */
  flex: 1 0 5rem;
}

.x-tbl-pers-details > span:nth-child(8) {
  /* Country */
  flex: 1 0 7rem;
}
.x-tbl-pers-details > span:nth-child(9) {
  /* ID Type */
  flex: 1 0 5rem;
}

.x-tbl-pers-details > span:nth-child(10) {
  /* ID Number */
  flex: 1 0 5rem;
}

.x-tbl-pers-details > span:nth-child(11) {
  /* Email */
  flex: 7 0 5rem;
}

.x-tbl-pers-details > span:nth-child(12) {
  /* Mobile */
  flex: 1 0 7rem;
}

.x-tbl-pers-details > span:nth-child(13) {
  /* Picture */
  flex: 0 0 7.5rem; /*was: 5rem*/
  /*text-align: left;*/
}
.x-tbl-pers-details > span:nth-child(14) {
  /* Action */
  flex: 0 0 7.5rem;
  text-align: right;
}
.x-pp-row > span:first-child {
  flex: 1 0 1rem !important;
}
.x-pp-row > span:nth-child(2) {
  flex: 33 0 58rem !important;
  padding: 0 3px 4px 3px !important;
  text-align: left !important;
}
.x-pp-row > span:last-child {
  flex: 0 0 7.5rem !important;
}
.x-pp-row textarea {
  width: 100%;
  font-size: 12px;
  resize: vertical;
}
.x-pp-row .x-pp-text {
  font-size: 12px;
  font-style: italic;
  color: #555;
}

.x-border-top {
  border-top: 2px solid black;
}

/* Split-booking invoice picker on the details page (one radio row per invoice) */
.x-inv-pick-row label {
  margin-bottom: 2px;
  cursor: pointer;
}
.x-inv-pick-row input[type=radio] {
  margin-right: 4px;
}
/* persons of a NON-selected invoice of a split booking */
.x-tbl-pers-details.x-other-invoice > span,
.x-tbl-pers-details.x-other-invoice > span a,
.x-tbl-pers-details.x-other-invoice .x-pp-text {
  color: #a5a5a5;
}

.x-tbl-pers-details span:nth-child(12) > svg {
  width: 1.5em;
}
/*
.niy {
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'  width='40' height='48' 
      viewport='0 0 100 100' style='fill:black;font-size:28px;'><text y='50%'>😱</text></svg>") 16 0,auto; 
}

*/

.x-person-select-table {
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
}
.x-person-select-table tr.x-sel:hover {
  background-color: #d0d0d0;
  cursor: pointer;
}
.x-person-select {
  border-bottom: 1px solid #ccc;
  text-align: left;
  line-height: 1.1;
}
.x-close {
  line-height: 1.1;
  padding-bottom: 0.5em;
}

.x-50pct-left {
  width: 50%;
  display: inline-block;
}
.x-50pct-right {
  width: calc(50% - 5px);
  float: right;
}

#fldBookingDetails [readonly] {
  background-color: #f5f5f5;
}

/********************* Take picture page **********************/

#takePicturePage,
#takeBillPicturePage {
  position: fixed;
  top:0;
  bottom:0;
  left:0;
  right:0;
  background-color: black;
}

#camera-stream,
#camera-stream-bill {
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
}

#guide-rectangle {
  position: absolute;
  border: 2px solid white;
  border-radius: 2vw;
  overflow: hidden;
}
#guide-rectangle-bill {
  position: absolute;
  top:0;
  bottom:0;
  left:0;
  right:0;
}

#guide-rectangle img,
#guide-rectangle-bill img {
  width: 100%;
}

#takePictureBtn,
#takeBillPictureBtn {
  position: absolute;
  bottom: 5vh;
  left: 50vw;
  transform: translate(-50%, 50%);
}
#takePictureCancelBtn,
#takeBillPictureCancelBtn {
  position: absolute;
  bottom: 5vh;
  left: 35vw;
  transform: translate(-50%, 50%);
}
#takePictureDoneBtn,
#takeBillPictureDoneBtn {
  position: absolute;
  bottom: 5vh;
  left: 65vw;
  transform: translate(-50%, 50%);
}


/********************* Invoice page **********************/

#invFolioIdStatus {
  font-size: 16px;
  vertical-align: super;
}
#invFolioDateNow {
  position: absolute;
  top:2rem;
  right: 4rem;
}
#invFolioPrintBtn {
  position: absolute;
  top:2rem;
  right: 2rem;
  width: 2rem;
}
#invFolioGoBack {
  position: absolute;
  top:2rem;
  left: 2rem;

  border: none;
  background-color: transparent;
  color: black;
}
#invFolioGoBack svg {
  width: 2rem;
}

.x-tbl-invoice {
  display: flex;
}

.x-tbl-invoice > span {
  padding: 4px 3px;
  text-align: center;
}

.x-tbl-invoice > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-invoice > span:nth-child(1) {
  /* Segments, generally */
  flex: 0 0 8rem;
  text-align: left;
}
.x-tbl-invoice > span:nth-child(1) > input {
  max-width: 8rem;
}
.x-tbl-invoice > span:nth-child(2) {
  /* Item */
  flex: 1 0 15rem;
  text-align: left;
}
.x-tbl-invoice > span:nth-child(3) {
  flex: 1 0 5rem;
  text-align: left;
}

.x-tbl-invoice > span:nth-child(4),
.x-tbl-invoice > span:nth-child(5) {
  flex: 4 0 6.5rem;
}

.x-tbl-invoice > span:nth-child(6),
.x-tbl-invoice > span:nth-child(7) {
  flex: 1 0 5rem;
  text-align: right;
}

.x-tbl-invoice > span:nth-child(8) {
  /* Price */
  flex: 0 0 6rem;
  text-align: right;
}
.x-tbl-invoice > span:nth-child(9) {
  /* Edit, + btns */
  flex: 0 0 4.5rem;
  text-align: right;
}
.x-tbl-invoice > span:nth-child(9) > svg {
  width: 1.5em;
  cursor: pointer;
}

/* internal per-item note (manager-and-up only, never printed) */
.x-item-note-btn {
  border: none;
  background: none;
  padding: 0;
  margin-right: 0.35rem;
  color: #6c757d;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.x-item-note-btn:hover {
  color: #0d6efd;
}
.x-item-note-text {
  /* shown under the item name: small, italic, grey */
  font-size: 0.72rem;
  font-style: italic;
  color: #6c757d;
  white-space: pre-wrap;
  line-height: 1;
  padding-left: 1rem;
}



.x-tbl-invoice-total {
  display: flex ;
}

.x-tbl-invoice-total > span {
  padding: 4px 3px;
  text-align: center;
}

.x-tbl-invoice-total > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-invoice-total > span:nth-child(1) {
  /* Total text */
  flex: 1 0 8rem;
  text-align: right;
}
.x-tbl-invoice-total > span:nth-child(2) {
  /* Price */
  flex: 0 0 6rem;
  text-align: right;
}
.x-tbl-invoice-total > span:nth-child(3) {
  /* Edit, + btns */
  flex: 0 0 4.5rem;
  text-align: right;
}



.x-tbl-header-inv {
  font-size: 12px;
  font-weight: 700;
  box-shadow: inset 0 0 0 9999px transparent;
  padding: 0;
}

.x-segment-hdr {
  font-size: 12px;
  font-weight: 700;
  margin-top: 1rem;
  border-bottom: 2px solid black;
  align-items: flex-end;
}

#invFolioSegments input[type="date"] {
  width: 7rem;
  margin: auto;
}
#invFolioSegments input[type="number"] {
  width: 2rem;
  margin: auto;
}

#invFolioSegments input[type="number"].x-big {
  width: 5rem;
  margin: auto;
}

.big-vex-dialog {
  width: 650px !important;
}
.big2-vex-dialog {
  width: 800px !important;
}
.big-vex-select {
  width: 590px !important;
  margin-left: 20px !important;
}
.big3-vex-dialog {
  width: 1024px !important;
}
.big4-vex-dialog {
  width: 1280px !important;
}

.big2-vex-dialog [readonly] {
  background-color: #f5f5f5 !important;
}

.x-plus {
  font-size: 1.5rem;

  padding: 0 5px !important;
  text-align: center !important;
  min-width: 1.5em;
}
.x-normal {
  padding: 0 5px !important;
  text-align: center !important;
  min-width: 1.5em;
}


.x-action-select-small{
  display: inline-block;
  width:35%;
}
.x-action-select-big{
  display: inline-block;
  width:65%;
}

.x-action-select-small2{
  display: inline-block;
  width:28%;
}
.x-action-select-big2{
  display: inline-block;
  width:44%;
}

#checkxxInvoiceRow {
  margin-top: 5px;
}

.x-min-width30 {
  min-width: 30rem;
}

.x-hdr-err {
  font-weight: normal;
  font-size: 12px;
}

.x-hdr-err-warning {
  font-weight: normal;
  font-size: 12px;
  color: orange;
}
.x-hdr-err-danger {
  font-weight: normal;
  font-size: 12px;
  color: red;
}

.x-space {
  display: inline-block;
  width: 1rem;
}

.x-orders-table td:first-child,
.x-orders-table th:first-child {
  text-align: left;
}
.x-orders-table td:not(:first-child),
.x-orders-table th:not(:first-child) {
  text-align: right;
}
.x-orders-table td,
.x-orders-table th {
  padding: 2px 5px;
}
.x-orders-table th {
  line-height: 1.2;
}

.x-info-button {
  width: 16px;
  height: 16px;
  background-color: transparent;
  color: #aaa;
  font-size: 12px;
  line-height: 16px;
  text-align: center !important;
  cursor: pointer;
  padding: 0;
  border-radius: 7px;
  border: 1px solid #aaa;
  margin-bottom:3px;
}
.x-info-button:hover {
  color:black;
  border-color:black;
}

.x-payment-provider-name {
  font-size: 14px;
  font-style: italic;
}
.x-payment-provider {
  line-height: 1;
}

/********************* Pay Section **********************/


.pay-vex-dialog {
  width: 700px !important;
}

#payTable input.x-pay-input {
  border: 1px solid #3288e6;
  width: 7rem;
  min-height: 1rem;
  padding: 0 2px;
  text-align: right;
}
#payTable button.btn {
  width: 5rem;
}
#payTable input.x-pay-note {
  border: 1px solid #3288e6;
  width: 100%;
  min-height: 1rem;
  padding: 0 2px;
  text-align: left;
}
#payTable tr.x-pay-has-note,
#payTable tr.x-pay-has-note td {
  border-bottom-width: 0 !important;
}


/********************* Print Section **********************/
#printPage {
  display: none;
  margin: 0;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  position: relative;
  font-size: 12px;
  /*background-color: aliceblue; -> this is for development */
}

/*
#printPage.thermal {
  margin: 0 3mm;
  width: calc(100% - 6mm);
}
*/

.email-print {
  font-size: 10px;
  line-height: 11px;
  display: inline-block;
}

.printDate {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 14px;
  width: 10em;
  text-align: right;
}
.printTopLeft {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
  text-align: left;
}
.printFooter {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 55px;
  line-height: 1.3;
  font-size: 14px;
  text-align: center;
  opacity: 0.85;
}
article {
  position: relative;
  
  /*background-color: aliceblue;*/
}
article:nth-child(2){
  top:15px;
}

@media print {
  html, body {
    /*height:100vh;*/
    margin: 0;
    padding: 0;
    background-color: white;
  }

  article {
    break-before: page;   /* or: page-break-before: always; for older browsers */
    /*background-color: red;*/
    height: 1300px !important; /*same as he KPageHeight constant, defined in htl_print.js*/
  }

  /* Optional: don’t force a page break before the very first article */
  article:first-of-type {
    break-before: auto;
  }
}

@media screen {
  #printPage {
    visibility: hidden;
  }
}

/* the bookings table */

.x-tbl-header-print {
  font-size: 14px;
  font-weight: 700;
  color: black;
  box-shadow: inset 0 0 0 9999px transparent;
  padding: 0;
}

.x-tbl-bookings-print {
  display: flex;
}
.x-tbl-bookings-print > span * {
  vertical-align: middle;
  text-align: left;
}

.x-tbl-print-frontOffice > span:nth-child(1),
.x-tbl-print-restaurant > span:nth-child(1),
.x-tbl-print-housekeeping > span:nth-child(1) {
  /* Room */
  flex: 1 0 3.5rem;
  text-align: center;
}

.x-tbl-print-frontOffice > span:nth-child(2),
.x-tbl-print-restaurant > span:nth-child(2),
.x-tbl-print-housekeeping > span:nth-child(2) {
  /* Guest */
  flex: 5 0 5rem;
}

.x-tbl-print-frontOffice > span:nth-child(3),
.x-tbl-print-restaurant > span:nth-child(3),
.x-tbl-print-housekeeping > span:nth-child(3) {
  /* Adults */
  flex: 0 0 1.5rem;
  text-align: center;
}

.x-tbl-print-frontOffice > span:nth-child(4),
.x-tbl-print-restaurant > span:nth-child(4),
.x-tbl-print-housekeeping > span:nth-child(4) {
  /* Children */
  flex: 0 0 1.5rem;
  text-align: center;
}

.x-tbl-print-frontOffice > span:nth-child(5),
.x-tbl-print-restaurant > span:nth-child(5),
.x-tbl-print-housekeeping > span:nth-child(5) {
  /* Infants */
  flex: 0 0 1.5rem;
  text-align: center;
}

.x-tbl-print-frontOffice > span:nth-child(6),
.x-tbl-print-restaurant > span:nth-child(6),
.x-tbl-print-housekeeping > span:nth-child(6) {
  /* CheckIn */
  flex: 0 0 3.5rem;
}

.x-tbl-print-frontOffice > span:nth-child(7),
.x-tbl-print-restaurant > span:nth-child(7),
.x-tbl-print-housekeeping > span:nth-child(7) {
  /* CheckOut */
  flex: 0 0 3.5rem;
}

.x-tbl-print-frontOffice > span:nth-child(8),
.x-tbl-print-restaurant > span:nth-child(8),
.x-tbl-print-housekeeping > span:nth-child(8) {
  /* Nr nights */
  flex: 0 0 2rem;
  text-align: center;
}

.x-tbl-print-frontOffice > span:nth-child(9),
.x-tbl-print-restaurant > span:nth-child(9) {
  /* Meal. No meal for housekeeping */
  flex: 0 0 3rem;
}

.x-tbl-print-frontOffice > span:nth-child(10),
.x-tbl-print-restaurant > span:nth-child(10),
.x-tbl-print-housekeeping > span:nth-child(9) {
  /* Comments */
  flex: 25 0 10rem;
  padding-right: 1rem;
}

.x-tbl-print-frontOffice > span:nth-child(11),
.x-tbl-print-restaurant > span:nth-child(11),
.x-tbl-print-housekeeping > span:nth-child(10) {
  /* FO Comments */
  flex: 10 0 10rem;
}

.x-tbl-header-print.x-tbl-print-frontOffice > span:nth-child(10),
.x-tbl-header-print.x-tbl-print-restaurant > span:nth-child(10),
.x-tbl-header-print.x-tbl-print-housekeeping > span:nth-child(9) {
  /* Comments */
  text-align: center;
}

.x-tbl-header-print.x-tbl-print-frontOffice > span:nth-child(11) /*,
.x-tbl-header-print.x-tbl-print-restaurant > span:nth-child(11),
.x-tbl-header-print.x-tbl-print-housekeeping > span:nth-child(10)*/ {
  /* FO Comments */
  text-align: center;
}


.x-qr-print {
  width: 100%;
  height: 250px;
  padding: 0;
  margin: 0 0 55px 0;
  
}
.x-qr-title {
  font-size: 20px;
  padding:25px 0 5px 0;
  font-weight: bold;
  text-align: center;
  margin: 0;
}
.x-qr-footer {
  font-size: 16px;
  padding: 5px 0 0 0;
  text-align: center;
  margin: 0;
}
.x-qr-img {
  width:100%;
  height:150px;
  padding: 0;
  margin: 0;
}

.hotelapp-about {
  width: 500px;
}


/********************* User Config **********************/

.service-card {
  width: 30%;
  margin: -1rem 0 1rem 70%;
}

.x-width-delete {
  width: 6rem;
}
.x-width-sees-all-hotels {
  width: 10rem;
}
.x-user-delete > input,
.x-user-delete > div,
.x-user-delete > select,
.x-user-delete > button {
  background-color: red !important;
}


/********************* Server Down **********************/

#serverDown h1 {
  text-align: center;
  margin-top: 33vh;
}

/********************* Invoice Button Due Amount **********************/

.x-inv-due {
  font-size: 12px;
  font-weight: bold;
}
.x-inv-due-sl {
  font-size: 10px;
  font-weight: 300;
  color: #888;
}
.merged-bkn {
  font-size: 8px;
  position: absolute;
  top: 6px;
  right: 4px;
}

/********************* Phone layout (see hotelapp-phone-ux-study.md) **********************/
/* Read-only companion view for phones. Breakpoint 600px: every tablet (768px+ portrait)
   stays on the desktop layout. The flat span rows are re-laid into cards via CSS grid;
   nth-child mapping follows the span order emitted by displayBookings/displaySegments. */

.x-pwa-banner {
  /* PWA install banner (phones only — shown from the beforeinstallprompt handler) */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: white;
  border-top: 1px solid #ccc;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.15);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {

  /********** main page header **********/
  .x-hdr-wrapper {
    height: auto;
    padding-bottom: 2px;
  }
  .x-hdr-title-txt {
    display: none; /* "<hotel>: Guests in House. Date:" — the date picker says it all */
  }
  #hkStatusTbl {
    display: none;
  }
  .hdr .fs-3 {
    font-size: 1rem !important; /* row holding the Arrivals/Departures nav buttons */
  }
  /* line 1: (hamburger, absolutely positioned) + < date >; line 2: Arrivals/Departures */
  .hdr .row > .col-auto.fs-3 {
    order: 9;
    width: 100%;
    text-align: center;
  }
  .x-title-tbl-row {
    font-size: 1.2rem;
    height: auto;
  }
  .x-empty-tbl-row {
    height: 0.8rem;
  }

  /* the 12-column header rows (static one + per-section generated ones): cards are self-describing */
  .x-tbl-bookings.x-tbl-header {
    display: none;
  }

  /********** main page: booking rows become rounded cards **********
     Row 1: room | guest name | 2A 0C [1I] | meal plan
     Row 2: (indented to the name) arrival → departure, times — read-only
     Rows 3/4: B24 / FO comments, indented, clamped to one line (tap expands)
     Span order: 1 payment+roomstatus, 2 room, 3 name, 4 A, 5 C, 6 I,
     7 dates (phone: combined by _adnSpans; passes: arrival), 8 filler/departure,
     9 nights, 10 meal, 11 B24 comments, 12 FO comments. */
  .x-tbl-bookings.x-row {
    display: grid;
    grid-template-columns: max-content 1fr auto auto auto auto;
    grid-template-areas:
      "room name  a     c     i     meal"
      ".    dates dates out   out   out"
      ".    cmt1  cmt1  cmt1  cmt1  cmt1"
      ".    cmt2  cmt2  cmt2  cmt2  cmt2";
    column-gap: 8px;
    margin: 6px 4px;
    padding: 6px 8px;
    border: 1px solid #bbb;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  .x-tbl-bookings.x-row > span { /* neutralize the desktop flex bases */
    flex: none;
  }
  .x-tbl-bookings.x-row > span:nth-child(1) { display: none; }  /* payment chip + room status: not on the phone */
  .x-tbl-bookings.x-row > span:nth-child(2) { grid-area: room; text-align: left; font-weight: 700; }
  .x-tbl-bookings.x-row > span:nth-child(3) { grid-area: name; text-align: left; padding-left: 0; font-weight: 700; }
  .x-tbl-bookings.x-row > span:nth-child(4) { grid-area: a; text-align: right; }
  .x-tbl-bookings.x-row > span:nth-child(4):not(:empty)::after { content: 'A'; }
  .x-tbl-bookings.x-row > span:nth-child(5) { grid-area: c; text-align: right; }
  .x-tbl-bookings.x-row > span:nth-child(5):not(:empty)::after { content: 'C'; }
  .x-tbl-bookings.x-row > span:nth-child(6) { grid-area: i; text-align: right; }
  .x-tbl-bookings.x-row > span:nth-child(6):not(:empty)::after { content: 'I'; }
  .x-tbl-bookings.x-row > span:nth-child(7) { grid-area: dates; text-align: left; }
  .x-tbl-bookings.x-row > span:nth-child(8) { grid-area: out; text-align: left; }
  .x-tbl-bookings.x-row > span:nth-child(8):not(:empty)::before { content: '\2192\00a0'; } /* pass rows: arrival → departure */
  .x-tbl-bookings.x-row > span:nth-child(9) { display: none; }  /* nights */
  .x-tbl-bookings.x-row > span:nth-child(10) { grid-area: meal; text-align: right; }
  /* comments: clamped to one line, tap toggles .x-expanded (phoneCardTapped in htl_main.js) */
  .x-tbl-bookings.x-row > span:nth-child(11),
  .x-tbl-bookings.x-row > span:nth-child(12) {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    text-align: left;
    font-style: italic;
    color: #444;
    padding-right: 0;
  }
  .x-tbl-bookings.x-row > span:nth-child(11) { grid-area: cmt1; }
  .x-tbl-bookings.x-row > span:nth-child(12) { grid-area: cmt2; }
  .x-tbl-bookings.x-row.x-expanded > span:nth-child(11),
  .x-tbl-bookings.x-row.x-expanded > span:nth-child(12) {
    -webkit-line-clamp: unset;
  }
  /* "more" marker on actually-truncated comments (markPhoneTruncatedComments):
     padding reserves space so the marker never covers text */
  .x-tbl-bookings.x-row > span.x-truncated {
    position: relative;
    padding-right: 3rem;
  }
  .x-more-btn {
    position: absolute;
    right: 0;
    top: 0;
    font-style: normal;
    color: #0d6efd;
    text-decoration: underline;
    text-underline-offset: 2px;
  }

  /* a guest name with contact details acts as a "button" → contacts popup */
  .x-tbl-bookings.x-row .x-name-span[data-guest-name] {
    color: #0d6efd;
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  /* the hover-tooltip corner triangle is meaningless on touch; country shows in the popup instead */
  .x-tbl-bookings.x-row > span > span[title].x-name-span::after {
    display: none;
  }
  /* inline contact links (arrivals rows): contacts live in the popup instead */
  .x-tbl-bookings.x-row .x-contact-links {
    display: none;
  }

  /* empty rooms: keep them as slim separators, not full cards */
  .x-tbl-bookings.x-row.x-no-booking-today {
    padding: 1px 8px;
  }

  /* read-only: hide action buttons; the meal "button" is information, restyle it as text */
  .x-tbl-bookings.x-row button {
    display: none;
  }
  .x-tbl-bookings.x-row > span:nth-child(10) button {
    display: inline;
    border: none;
    background: none;
    padding: 0;
    font-size: inherit;
    pointer-events: none;
  }
  .x-tbl-bookings.x-row .x-inv-span,
  .x-tbl-bookings.x-row .x-room-status-span {
    display: none;
  }
  /* the <br> between room/name and their (now hidden) buttons */
  .x-tbl-bookings.x-row > span:nth-child(2) br,
  .x-tbl-bookings.x-row > span:nth-child(3) br {
    display: none;
  }

  /********** invoice page **********/
  .x-desk-only {
    display: none !important; /* Print/Email/Split/Payment-provider buttons etc. */
  }
  #invoicePage h1 {
    font-size: 1.3rem;
  }
  #invFolioGoBack {
    top: 0;
    left: 0;
  }
  #invFolioDateNow {
    top: 0;
    right: 0;
  }
  .x-tbl-header-inv {
    display: none;
  }

  /* items/payments/details rows become 2-line cards */
  .x-tbl-invoice.x-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto auto;
    grid-template-areas:
      "c2 c2 c2 c2 c3 c3"
      "c1 c4 c5 c6 c7 c8";
    column-gap: 4px;
    font-size: 13px;
  }
  .x-tbl-invoice.x-row > span {
    flex: none;
    padding: 1px 2px;
  }
  .x-tbl-invoice.x-row > span:nth-child(1) { grid-area: c1; text-align: left; }   /* date */
  .x-tbl-invoice.x-row > span:nth-child(2) { grid-area: c2; text-align: left; }   /* description */
  .x-tbl-invoice.x-row > span:nth-child(3) { grid-area: c3; text-align: right; }  /* subcat */
  .x-tbl-invoice.x-row > span:nth-child(4) { grid-area: c4; text-align: left; }   /* field0 */
  .x-tbl-invoice.x-row > span:nth-child(5) { grid-area: c5; text-align: left; }   /* field1 */
  .x-tbl-invoice.x-row > span:nth-child(6) { grid-area: c6; text-align: right; }  /* qty */
  .x-tbl-invoice.x-row > span:nth-child(7) { grid-area: c7; text-align: right; }  /* unit price */
  .x-tbl-invoice.x-row > span:nth-child(8) { grid-area: c8; text-align: right; }  /* amount */
  .x-tbl-invoice.x-row > span:nth-child(9) { display: none; }                     /* edit buttons */
  .x-tbl-invoice.x-row button {
    display: none; /* read-only on the phone */
  }

  /* segment headers: name + freshness info only */
  .x-tbl-invoice.x-segment-hdr {
    display: flex;
  }
  .x-tbl-invoice.x-segment-hdr > span {
    flex: 0 1 auto;
  }
  .x-tbl-invoice.x-segment-hdr > span:nth-child(1) {
    flex: 1 0 auto;
    text-align: left;
  }
  .x-tbl-invoice.x-segment-hdr > span:nth-child(n+3) {
    display: none;
  }

  /* totals: label + amount, drop the buttons column */
  .x-tbl-invoice-total > span:nth-child(3) {
    display: none;
  }

  /* booking-details block: hide the row labels and the column-header row, decorate the bare values */
  #invFolioDetailsB24 > .x-tbl-invoice:nth-child(2) {
    display: none; /* the Room/Check-In/Check-Out/... header row */
  }
  #invFolioDetailsB24 .x-tbl-invoice.x-row > span:nth-child(1) {
    display: none; /* "Reservation Name:" / "Reservation No.:" labels */
  }
  #invFolioDetailsB24 .x-tbl-invoice.x-row > span:nth-child(4) { text-align: left; }
  #invFolioDetailsB24 .x-tbl-invoice.x-row > span:nth-child(5):not(:empty)::before {
    content: '\2192\00a0'; /* arrival → departure */
  }
  #invFolioDetailsB24 .x-tbl-invoice.x-row > span:nth-child(6):not(:empty)::before {
    content: 'A:\00a0';
  }
  #invFolioDetailsB24 .x-tbl-invoice.x-row > span:nth-child(7):not(:empty)::before {
    content: 'C:\00a0';
  }

  /********** services page: rows become rounded cards **********
     Read-only companion view. The 13-span row keeps its structure (CSS re-lays it +
     getServiceItemHTML's isRefresh path depends on it); flexbox order + full-width line
     breaks build the 4 rows:
       Row 1: time, resort, room, name, persons (ACI), status chip (tap-to-advance)
       Row 2: service name
       Row 3: comments (the Note field)
       Row 4: other/custom fields (internal fields, label baked in by JS)
     Span order: 1 time, 2 resort, 3 room, 4 name, 5 service, 6 persons, 7 note,
     8-10 custom, 11 price, 12 status, 13 edit. */

  /* segment title row: keep the name, drop the "+" add button */
  .x-tbl-services-segment .x-plus { display: none; }

  /* column-header rows: cards are self-describing */
  .x-tbl-services.x-tbl-header { display: none; }

  .x-tbl-services.x-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 6px;
    row-gap: 2px;
    margin: 6px 4px;
    padding: 6px 8px;
    border: 1px solid #bbb;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
  }
  .x-tbl-services.x-row > span { flex: none; text-align: left; }

  /* Row 1 */
  .x-tbl-services.x-row > span:nth-child(1) { order: 1; }                 /* time */
  .x-tbl-services.x-row > span:nth-child(2) { order: 2; }                 /* resort (hidden attr when single-site) */
  .x-tbl-services.x-row > span:nth-child(3) { order: 3; font-weight: 700; } /* room */
  .x-tbl-services.x-row > span:nth-child(4) { /* guest name */
    order: 4;
    font-weight: 700;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .x-tbl-services.x-row > span:nth-child(6) { order: 5; margin-left: auto; } /* persons (ACI) — pushed right */

  /* invisible full-width break — forces row 2 to start (flexbox can't break a line otherwise) */
  .x-tbl-services.x-row > span.x-srv-rowbreak {
    display: block;
    order: 6;
    flex: 0 0 100%;
    height: 0;
    padding: 0;
    margin: 0;
  }

  /* Row 2: service name + status chip share the line */
  .x-tbl-services.x-row > span:nth-child(5) { order: 7; flex: 0 1 auto; font-weight: 600; } /* service name */
  .x-tbl-services.x-row > span:nth-child(12) { order: 8; }                                  /* status chip */

  /* Row 3: comments (Note) — full-width, italic; hidden if empty */
  .x-tbl-services.x-row > span:nth-child(7) {
    order: 9;
    flex: 0 0 100%;
    font-style: italic;
    color: #444;
  }
  .x-tbl-services.x-row > span:nth-child(7):empty { display: none; }

  /* Row 4: custom/internal fields — wrap to a new line after the full-width rows above */
  .x-tbl-services.x-row > span:nth-child(8)  { order: 10; }
  .x-tbl-services.x-row > span:nth-child(9)  { order: 11; }
  .x-tbl-services.x-row > span:nth-child(10) { order: 12; }
  .x-tbl-services.x-row > span:nth-child(8),
  .x-tbl-services.x-row > span:nth-child(9),
  .x-tbl-services.x-row > span:nth-child(10) {
    color: #555;
    font-size: 12px;
    margin-right: 0.6rem;
  }
  .x-tbl-services.x-row > span:nth-child(8):empty,
  .x-tbl-services.x-row > span:nth-child(9):empty,
  .x-tbl-services.x-row > span:nth-child(10):empty { display: none; }

  /* read-only: hide price and the edit-button column on the phone */
  .x-tbl-services.x-row > span:nth-child(11) { display: none; } /* price */
  .x-tbl-services.x-row > span:nth-child(13) { display: none; } /* edit btn */

  /* tap-to-advance status chip */
  .x-srv-status-chip {
    border-radius: 10px;
    padding: 1px 9px;
    font-size: 12px;
    white-space: nowrap;
  }

}/* @media phone */

/********************* Activities & Prices editor (htl_editactivities.js) **********************/
.x-ea-hdr {
  position: sticky; top: 0; z-index: 50;
  background: white; padding: 10px 14px; border-bottom: 1px solid #ddd;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.x-ea-list { padding: 12px 14px; max-width: 900px; margin: 0 auto; }
.x-ea-showdep { display: flex; align-items: center; gap: 6px; justify-content: flex-end; font-size: 0.85rem; color: #555; margin-bottom: 8px; }
.x-ea-showdep input { margin: 0; }
.x-ea-card {
  border: 1px solid #ccc; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
}
.x-ea-card.x-ea-deprecated { opacity: 0.55; }
.x-ea-row1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-ea-name { font-weight: 700; }
.x-ea-mut { color: #777; font-size: 0.85rem; }
.x-ea-combo { color: #555; font-size: 0.85rem; margin-left: 1rem; }
.x-ea-badge {
  font-size: 0.7rem; font-weight: 600; background: #eee; color: #666;
  border-radius: 6px; padding: 1px 6px; vertical-align: middle;
}

.x-ea-dialog { width: 720px !important; max-width: 96vw !important; }
.x-ea-edit { text-align: left; }
.x-ea-edit .x-ea-fld { display: block; margin: 8px 0; }
.x-ea-edit .x-ea-num { display: inline-block; width: 6rem; }
.x-ea-flags { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0; }
.x-ea-flags label { font-weight: 400; }
/* Name label + box on one row (vex otherwise forces the input to 100% → its own line) */
.x-ea-edit .x-ea-namerow { display: flex; align-items: center; gap: 8px; }
.x-ea-edit .x-ea-namerow > label { font-weight: 600; margin: 0; }
.x-ea-edit .x-ea-namerow > input { flex: 1 1 auto; min-width: 0; width: auto !important; }
.x-ea-fs { border: 1px solid #ddd; border-radius: 8px; padding: 8px 10px; margin: 10px 0; }
.x-ea-fs > legend { font-size: 0.9rem; font-weight: 600; width: auto; padding: 0 6px; }
/* per-headcount price boxes (group-priced): one labelled box per group size */
.x-ea-ppp { display: flex; flex-wrap: wrap; gap: 12px; }
.x-ea-pppcell { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 400; margin: 0; }
.x-ea-ppp input.eaPpp { width: 4.5rem !important; text-align: right; } /* !important: vex forces inputs to 100% */
.x-ea-ppptbd { font-size: 0.72rem; color: #777; font-weight: 400; margin: 0; display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.x-ea-ppptbd input { margin: 0; }
/* child discount on a single row */
.x-ea-childdisc { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.x-ea-childdisc > label { font-weight: 600; margin: 0; }
.x-ea-childdisc input { width: 4rem !important; text-align: right; }
.x-ea-addon { border: 1px dashed #ccc; border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.x-ea-addon-hdr { display: flex; gap: 8px; align-items: center; }
.x-ea-addon-deltas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.x-ea-addon-deltas label.x-ea-addon-cell { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 400; margin: 0; } /* number on top of the box, like a base price cell */
.x-ea-addon-plus { display: flex; align-items: center; gap: 2px; width: 4.5rem; } /* "+" + box == one base price box wide, so they align */
.x-ea-addon-deltas input.eaAddonDelta { flex: 1 1 auto; min-width: 0; width: auto !important; text-align: right; } /* fill the wrapper minus the "+"; !important: vex forces inputs to 100% */

/* Activities editor — flat-priced option rows (Transfers / Spa) */
.x-ea-flatrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
.x-ea-flatrow .x-ea-flatlabel { min-width: 9rem; }
.x-ea-flatrow .eaFlat { width: 7rem !important; } /* !important: vex forces dialog inputs to 100% */
.x-ea-flatrow .x-ea-flattbd { font-weight: 400; white-space: nowrap; margin: 0; }

/* Menu: Configuration submenu (inline expand) */
.x-config-submenu { list-style: none; margin: 0; padding: 0; }
.x-config-submenu .dropdown-item { padding-left: 2.4rem; }
#configSubmenuCaret { display: inline-block; width: 1em; font-size: 0.8em; }
