/* Capacity and prices on the sales platforms: the hub, the availability screen with
   the hotel table and the accommodation sections, and the price screen (at the end,
   borrowing most of the availability screen's pieces). White cards on the panel's
   dark background, the same way the reserve-request screen sits on it. */

/* ---- hub ------------------------------------------------------------------ */

.cmSubtitle {
  color: #bdbdbd;
  text-align: center;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}

.cmHub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 60rem;
}

.cmHubBtn {
  width: 11rem;
  min-height: 6.5rem;
  background-color: white;
  border: 1px solid #d5d5d5;
  border-top: 5px solid #999;
  border-radius: 8px;
  padding: 1rem 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #222;
  font-family: inherit;
}

.cmHubBtn:hover:not(:disabled) {
  color: #222;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.cmHubBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cmHubReady {
  border-top-color: #2e7d32;
}

.cmHubTitle {
  font-weight: bold;
  font-size: 0.95rem;
}

.cmHubHint {
  font-size: 0.72rem;
  color: #6b6b6b;
  text-align: center;
}

/* ---- availability screen --------------------------------------------------- */

#cmPage,
#cpPage,
#crPage {
  width: calc(100% - 6rem);
  max-width: 95rem;
  margin: auto;
  padding-bottom: 4rem;
}

.cmTopBar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

/* The picker starts empty; an اعمال without a range marks it until one is chosen. */
.cmDates {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  border-radius: 8px;
}

.cmDateHint {
  display: none;
  color: #ff6b6b;
  font-size: 0.82rem;
  font-weight: bold;
}

.cmDates.cmDatesNeeded {
  outline: 2px solid #ff6b6b;
  outline-offset: 4px;
}

.cmDates.cmDatesNeeded .cmDateHint {
  display: inline;
}

/* امروز، فردا، پس‌فردا and the day after, beside the picker: lit = the range reaches it.
   Drawn like تغییر قیمت's weekday ticks, but an unlit day is only not chosen, not struck out. */
.cmQuickDays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  /* level with the picker's box, not with its label above it */
  align-self: flex-end;
  margin-bottom: 0.2rem;
}

.cmQuickDay {
  min-width: 4.2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #6b6b6b;
  border-radius: 6px;
  background-color: #3a3a3a;
  color: #bdbdbd;
  font-family: inherit;
  font-size: 0.82rem;
}

.cmQuickDay:hover {
  border-color: #9a9a9a;
}

.cmQuickDay.cmQuickDayOn {
  background-color: #1f3a68;
  border-color: #4a6fa8;
  color: white;
}

.cmQuickDay:focus-visible {
  outline: 2px solid #ffd600;
  outline-offset: 2px;
}

/* ظرفیت‌گذاری sends one unbroken range: a day in the middle of it cannot be left out. */
.cmQuickDay.cmQuickDayRefused {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.45);
}

.cmGlobal {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cmGlobalLabel {
  color: white;
  font-size: 0.85rem;
}

.cmGroupToggle {
  border: 1px solid #6b6b6b;
  background-color: #444;
  color: white;
  border-radius: 6px;
  padding: 0.4rem 1.1rem;
  font-family: inherit;
  font-size: 0.85rem;
}

.cmGroupToggle:hover {
  background-color: #555;
}

/* open / close / clear over a scope: the dark bars above each group of sites */
.cmBulk {
  border: 1px solid #6b6b6b;
  background-color: transparent;
  color: #cfcfcf;
  border-radius: 6px;
  padding: 0.25rem 0.9rem;
  font-family: inherit;
  font-size: 0.75rem;
}

.cmBulk:hover {
  background-color: #444;
  color: white;
}

.cmBulkOpen {
  border-color: #3f7d4f;
  color: #8fd3a1;
}

.cmBulkOpen:hover {
  background-color: #1e7a32;
  color: white;
}

.cmBulkClose {
  border-color: #8a4040;
  color: #e79a9a;
}

.cmBulkClose:hover {
  background-color: #a81f1f;
  color: white;
}

.cmBulkClear {
  border-style: dashed;
}

/* inside a white card it has to read the other way round */
.cmSection .cmBulk {
  border-color: #cfcfcf;
  color: #8a8a8a;
}

.cmSection .cmBulk:hover {
  background-color: #f1f1f1;
  color: #444;
}

.cmGlobalBar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
  margin-bottom: 0.6rem;
}

.cmTitleTools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* the hotel is full today: the one button that reaches every site by itself */
.cmToday {
  background-color: #a81f1f;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.4rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: bold;
}

.cmToday:hover {
  background-color: #c32626;
}

.cmFootBarToday {
  background-color: rgba(168, 31, 31, 0.16);
  border: 1px solid rgba(168, 31, 31, 0.5);
  margin-top: 0.8rem;
}

.cmNote {
  color: #bdbdbd;
  font-size: 0.75rem;
  margin: 0 0 1.2rem;
}

.cmSectionTitle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 1.5rem 0 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #5a5a5a;
}

.cmSectionTitle h4 {
  color: white;
  font-size: 1rem;
  margin: 0;
}

/* ---- the hotel table ------------------------------------------------------- */

.cmTableWrap {
  overflow-x: auto;
}

.cmTable {
  width: 100%;
  min-width: 56rem;
  border-collapse: collapse;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.cmTable th,
.cmTable td {
  border: 1px solid #dcdcdc;
  padding: 0.4rem 0.3rem;
  text-align: center;
  font-size: 0.8rem;
  vertical-align: middle;
}

.cmTable thead th {
  background-color: #efefef;
  font-weight: bold;
  white-space: nowrap;
}

.cmRowHead {
  background-color: #f7f7f7;
  white-space: nowrap;
  font-weight: bold;
  min-width: 5.5rem;
}

.cmMasterRow td,
.cmMasterRow th {
  background-color: #fbf6e7;
}

.cmApplyHead,
.cmResultHead {
  min-width: 5rem;
}

/* ---- a cell: a count and a state, which are one value ---------------------- */

.cmCell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.cmCount {
  width: 2.2rem;
  text-align: center;
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 0.25rem 0.1rem;
  font-family: inherit;
  font-size: 0.85rem;
  -moz-appearance: textfield;
}

.cmCount::-webkit-outer-spin-button,
.cmCount::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cmToggle {
  min-width: 4rem;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 0.25rem 0.3rem;
  font-family: inherit;
  font-size: 0.72rem;
  white-space: nowrap;
}

.cmUnset {
  background-color: #ececec;
  border-color: #cfcfcf;
  color: #767676;
}

.cmOpen {
  background-color: #1e7a32;
  color: white;
}

.cmClosed {
  background-color: #a81f1f;
  color: white;
}

/* ---- apply and its result -------------------------------------------------- */

/* Every اعمال is the same sharp yellow — one colour for "this sends". */
.cmApply {
  background-color: #ffd600;
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: bold;
}

.cmApply:hover {
  background-color: #ffe433;
}

.cmResult {
  font-size: 0.72rem;
  color: #6b6b6b;
  min-height: 1rem;
}

.cmSectionFoot .cmResult,
.cmFootBar .cmResult {
  flex: 1 1 auto;
  min-height: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.2rem 0.5rem;
  border: 1px dashed #e0e0e0;
  border-radius: 5px;
}

.cmResult-wait {
  color: #9a6b00;
}

.cmResult-ok {
  color: #1e7a32;
}

.cmResult-idle {
  color: #9a9a9a;
}

.cmResult-err {
  color: #a81f1f;
}

/* a platform only its own اعمال sends to (جاجیگا), left out of a press over several sites: bold,
   shining red, until its own اعمال or پاک کردن replaces it */
.cmResult.cmResult-skip,
.cmFootBar .cmResult.cmResult-skip {
  color: #ff2d2d;
  font-weight: 800;
  font-size: 0.85rem;
  animation: cmSkipShine 1.1s ease-in-out infinite alternate;
}

@keyframes cmSkipShine {
  from {
    text-shadow: 0 0 2px rgba(255, 45, 45, 0.35);
    opacity: 0.8;
  }
  to {
    text-shadow: 0 0 10px rgba(255, 45, 45, 0.95);
    opacity: 1;
  }
}

/* a room opened on nights where the platform's own «توقف فروش» is on (لاماسو): written, not selling */
.cmStopSell {
  display: block;
  margin-top: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background-color: #e8590c;
  color: white;
  font-weight: bold;
  font-size: 0.68rem;
  line-height: 1.35;
}

.cmSectionFoot .cmResult:has(.cmStopSell) {
  flex-wrap: wrap;
}

/* ---- accommodation sections ------------------------------------------------ */

.cmSections {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.cmSection {
  background-color: white;
  border-radius: 8px;
  border-top: 5px solid #1f3a68;
  padding: 0.9rem 1rem 1rem;
  flex: 1 1 18rem;
  max-width: 28rem;
}

.cmSectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.5rem;
  margin-bottom: 0.7rem;
}

.cmSectionHead h5 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: bold;
}

.cmSectionTools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* one booking mode for every room of a platform */
.cmArrivalAll {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #f0f0f0;
}

.cmArrivalAllLabel {
  font-size: 0.72rem;
  color: #8a8a8a;
  margin-left: 0.2rem;
}

.cmArrivalAllBtn {
  border: 1px solid #d5d5d5;
  background-color: #fafafa;
  color: #555;
  border-radius: 5px;
  padding: 0.2rem 0.6rem;
  font-family: inherit;
  font-size: 0.7rem;
}

.cmArrivalAllBtn:hover {
  background-color: #efefef;
}

.cmArrivalAllOn {
  background-color: #1f3a68;
  border-color: #1f3a68;
  color: white;
}

.cmToggleAll {
  background-color: #ececec;
  border: 1px solid #cfcfcf;
  border-radius: 5px;
  padding: 0.25rem 0.7rem;
  font-family: inherit;
  font-size: 0.72rem;
  color: #444;
}

.cmToggleAll:hover {
  background-color: #e0e0e0;
}

.cmRooms {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cmRoom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #f0f0f0;
}

.cmRoomsWide .cmRoom {
  padding: 0.4rem 0;
}

.cmRoomName {
  font-size: 0.8rem;
  min-width: 6rem;
  flex: 1 1 auto;
}

.cmArrival {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  width: 100%;
}

.cmArrivalOption {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: #555;
  margin: 0;
}

.cmArrivalOption input {
  margin: 0;
}

.cmSectionFoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid #eaeaea;
}

.cmFootBar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.cmFootBar .cmResult {
  color: #d8d8d8;
}

.cmFootBar .cmResult-ok {
  color: #7bd88f;
}

.cmFootBarEverything {
  background-color: rgba(184, 134, 11, 0.16);
  border: 1px solid rgba(184, 134, 11, 0.5);
  margin-top: 0.8rem;
}

.cmFootBar .cmResult {
  border-color: rgba(255, 255, 255, 0.18);
}

/* ---- login codes ----------------------------------------------------------- */

#cmOtp {
  display: none;
  background-color: #fff8e6;
  border: 1px solid #e0c27a;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
}

#cmOtp.cmOtpOn {
  display: block;
}

.cmOtpHead {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-weight: bold;
  font-size: 0.9rem;
  color: #7a4e00;
  margin-bottom: 0.6rem;
}

.cmOtpHeadHint {
  font-weight: normal;
  font-size: 0.75rem;
  color: #8a6a2a;
  direction: rtl;
}

.cmOtpRow {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px dashed #ebd7a8;
}

.cmOtpRow.cmOtpRowOn {
  display: flex;
}

.cmOtpPlatform {
  font-weight: bold;
  font-size: 0.82rem;
  min-width: 5.5rem;
}

.cmOtpHint {
  font-size: 0.75rem;
  color: #7a6335;
  flex: 1 1 12rem;
}

.cmOtpHint em {
  font-style: normal;
  color: #a08b5c;
}

.cmOtpInput {
  width: 7rem;
  text-align: center;
  letter-spacing: 0.35rem;
  direction: ltr;
  border: 1px solid #d9bd7c;
  border-radius: 6px;
  padding: 0.35rem 0.4rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.cmOtpSubmit {
  background-color: #7a4e00;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 1.1rem;
  font-family: inherit;
  font-size: 0.78rem;
}

.cmOtpSubmit:hover {
  background-color: #96610a;
}

.cmOtpResult {
  font-size: 0.72rem;
  color: #7a6335;
  min-width: 6rem;
}

.cmOtpBad {
  color: #a81f1f;
}

.cmOtpSubmit:disabled {
  opacity: 0.55;
}

/* A platform's own CAPTCHA picture, for reception to read. Hidden until one arrives. */
.cmCaptchaImg {
  display: none;
  height: 2.4rem;
  border: 1px solid #d9bd7c;
  border-radius: 6px;
  background-color: white;
}

.cmCaptchaImg.cmCaptchaOn {
  display: inline-block;
}

.cmCaptchaNew {
  background: none;
  border: 1px solid #d9bd7c;
  border-radius: 6px;
  color: #7a4e00;
  padding: 0.2rem 0.55rem;
  font-size: 0.95rem;
  line-height: 1;
}

/* A texted-code row that can also show a picture (مهمان‌شو) keeps ↻ out of the way until it does. */
.cmOtpRow[data-captcha="0"]:not([data-mode="captcha"]) .cmCaptchaNew {
  display: none;
}

/* A wired texted-code row asks the platform for a (new) code. */
.cmOtpSend {
  background: none;
  border: 1px solid #d9bd7c;
  border-radius: 6px;
  color: #7a4e00;
  padding: 0.3rem 0.7rem;
  font-family: inherit;
  font-size: 0.75rem;
}

.cmOtpSend:disabled {
  opacity: 0.55;
}

/* ---- payload preview: stands in for the service that is not built yet ------ */

#cmPreview {
  display: none;
  margin-top: 1.5rem;
  background-color: #14181f;
  border-radius: 8px;
  overflow: hidden;
}

#cmPreview.cmPreviewOn {
  display: block;
}

.cmPreviewHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.9rem;
  background-color: #1f2632;
  color: #c9d3e0;
  font-size: 0.78rem;
}

#cmPreviewClose {
  background: none;
  border: 1px solid #47536a;
  color: #c9d3e0;
  border-radius: 5px;
  padding: 0.15rem 0.7rem;
  font-family: inherit;
  font-size: 0.72rem;
}

#cmPreview pre {
  margin: 0;
  padding: 0.9rem;
  color: #d8e2ee;
  font-size: 0.72rem;
  direction: ltr;
  text-align: left;
  max-height: 22rem;
  overflow: auto;
}

/* Each wired platform's raw answer, under what was sent. */
.cmAnswerHead {
  padding: 0.4rem 0.9rem;
  background-color: #1f2632;
  border-top: 1px solid #2e3747;
  color: #c9d3e0;
  font-size: 0.75rem;
}

/* ---- price screen ------------------------------------------------------------
   /ChannelManager/SetPrices borrows the availability screen's bars, table, sections,
   اعمال buttons, result boxes and preview; what it adds is below. */

/* The hub's link to a screen that exists but does not send yet. */
.cmHubPreview {
  border-top-color: #b8860b;
}

/* the days of the week: a ticked day gets the prices, an unticked one is struck through */
.cpWeekdays {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0.5rem;
  padding: 0.3rem 0;
  border-radius: 8px;
}

.cpWeekdays.cpWeekdaysNeeded {
  outline: 2px solid #ff6b6b;
  outline-offset: 4px;
}

.cpWeekdaysLabel {
  color: white;
  font-size: 0.85rem;
  margin-left: 0.2rem;
}

.cpDay {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.cpDay input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.cpDay span {
  display: inline-block;
  min-width: 4.2rem;
  text-align: center;
  padding: 0.35rem 0.7rem;
  border: 1px solid #6b6b6b;
  border-radius: 6px;
  background-color: #3a3a3a;
  color: #9a9a9a;
  font-size: 0.82rem;
  text-decoration: line-through;
  user-select: none;
}

.cpDay input:checked + span {
  background-color: #1f3a68;
  border-color: #4a6fa8;
  color: white;
  text-decoration: none;
}

.cpDay input:focus-visible + span {
  outline: 2px solid #ffd600;
  outline-offset: 2px;
}

.cpNights {
  color: #bdbdbd;
  font-size: 0.8rem;
  margin-right: 0.5rem;
}

.cpNights.cpNightsNone {
  color: #ff6b6b;
  font-weight: bold;
}

.cpTitleHint,
.cpUnit {
  font-weight: normal;
  font-size: 0.72rem;
}

.cpTitleHint {
  color: #bdbdbd;
  margin-right: 0.5rem;
}

.cpUnit {
  color: #8a6a2a;
  background-color: #fff8e6;
  border-radius: 5px;
  padding: 0.25rem 0.5rem;
  margin: -0.2rem 0 0.6rem;
}

/* a price box: digits grouped in thousands, wide enough for 2,980,000 and more */
.cpPrice {
  width: 6.8rem;
  text-align: center;
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 0.28rem 0.3rem;
  font-family: inherit;
  font-size: 0.85rem;
  background-color: white;
}

.cpPrice::placeholder {
  color: #a3a3a3;
  font-size: 0.75rem;
}

/* filled means it will be sent */
.cpPrice.cpFilled {
  background-color: #fff7d6;
  border-color: #d9bd7c;
}

.cpPrice.cpBad {
  background-color: #fdecec;
  border-color: #a81f1f;
}

/* a default the page opened with (برد): grey until a price typed for its room takes it along */
.cpPrice.cpDefault:not(.cpFilled) {
  color: #8a8a8a;
}

/* اسنپ‌تریپ's «قبل تخفیف»: a percent under the platform's name, in its row head */
.cpRowTitle {
  display: block;
}

.cpBefore {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  margin: 0.35rem 0 0;
  font-weight: normal;
  font-size: 0.68rem;
  color: #555;
  cursor: pointer;
}

.cpBefore b {
  font-weight: normal;
  color: #8a8a8a;
}

/* لاماسو's «حذف قیمت روزانه»: under the platform's name, in its row head */
.cpDailyDelete {
  display: block;
  margin: 0.35rem auto 0;
  padding: 0.15rem 0.45rem;
  border: 1px solid #c9302c;
  border-radius: 5px;
  background-color: white;
  color: #a81f1f;
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: normal;
  white-space: nowrap;
  cursor: pointer;
}

.cpDailyDelete:hover {
  background-color: #fdeaea;
}

.cpBeforeBox {
  width: 2.2rem;
  text-align: center;
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 0.15rem 0.2rem;
  font-family: inherit;
  font-size: 0.8rem;
  background-color: white;
}

.cpBeforeBox.cpFilled {
  background-color: #fff7d6;
  border-color: #d9bd7c;
}

/* the base prices, never sent: one card per hotel room type, and one per accommodation price group */
.cpMasters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.cpMaster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background-color: #fbf6e7;
  border-top: 4px solid #b8860b;
  border-radius: 8px;
  padding: 0.55rem 0.4rem 0.7rem;
}

.cpMasterTitle {
  font-weight: bold;
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}

.cpReach {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.4rem;
  margin: 0.5rem 0 0.8rem;
  padding: 0;
  color: #bdbdbd;
  font-size: 0.72rem;
}

.cpReach b {
  color: #e8d49a;
}

.cpTable td {
  padding: 0.45rem 0.35rem;
}

/* A long answer wraps inside its box instead of widening the column under the prices. */
.cpTable .cmResultHead,
.cpTable td.cmResult {
  width: 10rem;
}

.cpStack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

/* an accommodation room: its name and its boxes */
.cpFields {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

/* اتاقک, جاجیگا, شب: «+ تخفیف» beside the price. On, the button stays on the name's line and the price,
   the percent and the price after it take a line of their own, in that order from the right. */
.cpOfferBox {
  display: none;
}

.cpOfferOn .cpFields {
  order: 2;
  flex: 1 1 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3.6rem minmax(0, 1fr);
}

.cpOfferOn .cpFields .cpPrice {
  display: block;
  width: 100%;
}

.cpOfferOn .cpOfferBtn {
  order: 1;
}

/* small enough that name, price and button share one line in the narrowest section */
.cpOfferBtn {
  border: 1px solid #d5d5d5;
  background-color: #fafafa;
  color: #555;
  border-radius: 5px;
  padding: 0.2rem 0.4rem;
  font-family: inherit;
  font-size: 0.68rem;
  white-space: nowrap;
}

.cpOfferBtn:hover {
  background-color: #efefef;
}

.cpOfferBtn[aria-pressed="true"] {
  background-color: #1f3a68;
  border-color: #1f3a68;
  color: white;
}

/* the one of the three the page wrote from the other two */
.cpPrice.cpComputed {
  border-style: dashed;
  border-color: #8a6a2a;
}

/* what Otaghak will show, once the three agree */
.cpOfferNote {
  order: 3;
  flex: 1 1 100%;
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: #555;
}

.cpOfferNote s {
  color: #a81f1f;
}

/* جاباما's «لحظه آخری»: once «خواندن تخفیف» has read (cpLmOpen), each room is one line — name,
   قیمت, its three percents — under one head that names the days; its own foot under the section's,
   with «ارسال تخفیف» and its answer. The columns are fixed so the head and every room line up,
   and narrow enough for the narrowest section. */
.cpLmHead {
  display: none;
}

.cpLmOpen .cpLmHead,
.cpLmOpen .cpRoom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 5.6rem 7.1rem;
  column-gap: 0.35rem;
  align-items: center;
}

.cpLmOpen .cpLmHead {
  font-size: 0.68rem;
  color: #8a8a8a;
  padding-bottom: 0.15rem;
  border-bottom: 1px solid #eaeaea;
}

/* «تخفیف ٪» right beside the days it heads */
.cpLmTitle {
  grid-column: 1 / 3;
  text-align: left;
  color: #8a6a2a;
  font-weight: bold;
}

.cpLmDays,
.cpLm {
  display: flex;
  gap: 0.25rem;
}

.cpLmDays span {
  width: 2.2rem;
  text-align: center;
  white-space: nowrap;
}

.cpLmOpen .cmRoomName {
  min-width: 0;
}

.cpLmOpen .cpFields .cpPrice {
  width: 100%;
}

.cpLm[hidden],
.cpLmFoot[hidden],
.cpLmSend[hidden] {
  display: none;
}

.cpLmBox {
  width: 2.2rem;
  text-align: center;
  border: 1px solid #c8c8c8;
  border-radius: 5px;
  padding: 0.15rem 0.2rem;
  font-family: inherit;
  font-size: 0.8rem;
  background-color: white;
}

/* a discount Jabama applies */
.cpLmBox.cpLmSet {
  color: #1e7a32;
  font-weight: bold;
}

/* differs from what Jabama has: «ارسال تخفیف» will send it */
.cpLmBox.cpLmChanged {
  background-color: #fff7d6;
  border-color: #d9bd7c;
}

.cpLmBox.cpBad {
  background-color: #fdecec;
  border-color: #a81f1f;
}

/* a room whose rule is off on Jabama's own page: a line of its own under the room */
.cpLmState {
  grid-column: 1 / -1;
  flex: 1 1 100%;
  font-size: 0.72rem;
  color: #a81f1f;
}

.cpLmState:empty {
  display: none;
}

.cpLmFoot {
  margin-top: 0.5rem;
}

/* ---- read screen -------------------------------------------------------------
   /ChannelManager/ReadCalendar: one table, a row per room and a column per night. The room
   column and the night heads stay put while the table scrolls under them. */

/* the platforms to read: ticked is blue, like the price screen's weekdays */
.crPicks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.8rem;
  margin: 0.6rem 0 0.8rem;
  padding: 0.3rem 0;
  border-radius: 8px;
}

.crPicks.crPicksNeeded {
  outline: 2px solid #ff6b6b;
  outline-offset: 4px;
}

.crPickGroup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.crPickLabel {
  color: white;
  font-size: 0.85rem;
  margin-left: 0.2rem;
}

.crPick {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.crPick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.crPick span {
  display: inline-block;
  min-width: 4.6rem;
  text-align: center;
  padding: 0.35rem 0.7rem;
  border: 1px solid #6b6b6b;
  border-radius: 6px;
  background-color: #3a3a3a;
  color: #cfcfcf;
  font-size: 0.82rem;
  user-select: none;
}

.crPick input:checked + span {
  background-color: #1f3a68;
  border-color: #4a6fa8;
  color: white;
}

.crPick input:focus-visible + span {
  outline: 2px solid #ffd600;
  outline-offset: 2px;
}

.crBar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

/* Reading sends nothing, so it is not the yellow of اعمال. */
.crRead {
  background-color: #2b6cb0;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 2.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: bold;
}

.crRead:hover {
  background-color: #3a7fc6;
}

.crBar .cmResult {
  color: #d8d8d8;
}

.crBar .cmResult-err {
  color: #ff8a8a;
}

.crLegend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1.3rem;
  margin: 0 0 1rem;
  padding: 0;
  color: #bdbdbd;
  font-size: 0.75rem;
}

.crSwatch {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 0.35rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.crDemo {
  background-color: #fff3c4;
  color: #6b4e00;
  border-radius: 6px;
  padding: 0.45rem 0.8rem;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Both directions scroll inside the box, so the heads can stick. */
.crWrap {
  overflow: auto;
  max-height: calc(100vh - 7rem);
  background-color: white;
  border-radius: 8px;
}

.crTable {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 0.78rem;
}

.crTable th,
.crTable td {
  border-left: 1px solid #e3e3e3;
  border-bottom: 1px solid #e3e3e3;
  padding: 0.3rem 0.35rem;
  text-align: center;
  vertical-align: middle;
}

.crTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #efefef;
  white-space: nowrap;
  border-bottom-color: #cfcfcf;
}

/* the room column, on the right */
.crCorner,
.crRoomHead,
.crPlatformHead {
  position: sticky;
  right: 0;
  z-index: 1;
  width: 8.5rem;
  min-width: 8.5rem;
  max-width: 8.5rem;
  text-align: right !important;
  border-left-color: #cfcfcf !important;
}

.crTable thead .crCorner {
  z-index: 3;
  color: #8a8a8a;
  font-weight: normal;
  font-size: 0.72rem;
}

.crRoomHead {
  background-color: #f7f7f7;
  font-weight: bold;
  white-space: nowrap;
  padding-right: 0.8rem !important;
}

.crNight {
  min-width: 6.8rem;
}

.crNightDay {
  display: block;
  font-size: 0.7rem;
  font-weight: normal;
  color: #6b6b6b;
}

.crNightDate {
  display: block;
  font-size: 0.82rem;
  font-weight: bold;
}

.crFriday .crNightDay,
.crFriday .crNightDate {
  color: #c0392b;
}

.crTable thead th.crToday {
  background-color: #ffe79a;
}

/* «جمع رزروها», under the night heads (its `top` is set by the script) — in the رزرو blue */
.crTable thead .crTotalRow th {
  background-color: #e2ebf8;
  border-bottom: 2px solid #2d5a9e;
}

.crTable thead .crTotalRow th.crToday {
  background-color: #ffe79a;
}

.crTable thead .crCorner.crTotalHead {
  color: #2d5a9e;
  font-weight: bold;
  font-size: 0.8rem;
}

/* the narrow room column on a phone */
.crTotalHead .crCellHint {
  white-space: normal;
}

.crTotal {
  color: #2d5a9e;
  font-size: 0.95rem;
  font-weight: bold;
}

.crTotal.crTotalNone {
  color: #8f9db3;
  font-weight: normal;
}

/* a ticked platform not read for the night: at least this many */
.crTotal.crTotalPartial {
  color: #808080;
}

/* a platform's own row: its name, what its cells hold, and how its read went */
.crPlatformRow th,
.crPlatformRow td {
  background-color: #e9eef7;
  border-top: 2px solid #1f3a68;
  border-bottom-color: #c9d4e8;
}

/* the name, and beside it خواندن for this platform alone */
.crPlatformTop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem 0.4rem;
}

.crReadOne {
  background-color: #2b6cb0;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 0.1rem 0.55rem;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: bold;
  line-height: 1.4rem;
}

.crReadOne:hover {
  background-color: #3a7fc6;
}

.crPlatformTitle {
  display: block;
  font-weight: bold;
  font-size: 0.88rem;
  color: #1f3a68;
}

.crCellHint {
  display: block;
  font-weight: normal;
  font-size: 0.66rem;
  color: #5b6b85;
}

.crPlatformFill {
  text-align: right !important;
}

/* stays beside the platform's name however far the nights scroll */
.crStatus {
  position: sticky;
  right: 9.2rem;
  display: inline-block;
  min-height: 0;
  font-size: 0.75rem;
}

/* a night: a badge, then the prices */
.crCell {
  min-width: 6.8rem;
  height: 3.6rem;
  line-height: 1.35;
  white-space: nowrap;
}

.crTodayCell {
  box-shadow: inset 2px 0 0 #e0b100, inset -2px 0 0 #e0b100;
}

.crOpen {
  background-color: #e3f3e7;
}

.crClosed {
  background-color: #fbe3e3;
}

/* Booked, on a platform with no count — sells nothing, like بسته, but nobody closed it. */
.crReserved {
  background-color: #e2ebf8;
}

.crUnread {
  background-color: #eeeeee;
  color: #9a9a9a;
  font-size: 0.7rem;
}

.crWait {
  background-color: #f7f7f7;
  color: #b5b5b5;
}

.crBadge {
  display: inline-block;
  min-width: 1.4rem;
  padding: 0 0.35rem;
  margin-bottom: 0.15rem;
  border-radius: 0.7rem;
  font-size: 0.68rem;
  font-weight: bold;
  line-height: 1.2rem;
  color: white;
}

.crOpen .crBadge,
.crSwatch.crOpen {
  background-color: #1e7a32;
}

.crClosed .crBadge,
.crSwatch.crClosed {
  background-color: #a81f1f;
}

.crReserved .crBadge,
.crSwatch.crReserved {
  background-color: #2d5a9e;
}

.crSwatch.crUnread {
  background-color: #bdbdbd;
}

.crPrice {
  display: block;
  font-weight: bold;
  font-size: 0.8rem;
  color: #222;
}

.crPriceSub {
  font-weight: normal;
  font-size: 0.72rem;
  color: #666;
}

/* a discount behind the guest's price */
.crOff {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0 0.25rem;
  border-radius: 3px;
  background-color: #b8860b;
  color: white;
  font-size: 0.62rem;
  font-weight: bold;
  line-height: 1.1rem;
  vertical-align: 1px;
}

.crExtra {
  display: block;
  font-size: 0.66rem;
  color: #666;
}

/* «۲ رزرو» beside the count: rooms guests hold, in the رزرو blue */
.crBooked {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0 0.3rem;
  border-radius: 0.7rem;
  background-color: #2d5a9e;
  color: white;
  font-size: 0.62rem;
  font-weight: bold;
  line-height: 1.2rem;
  vertical-align: top;
}

/* آنی / تاییدی beside the badge — ⚡ is Jajiga's own mark for آنی */
.crArrival {
  display: inline-block;
  margin-right: 0.3rem;
  font-size: 0.62rem;
  font-weight: bold;
  line-height: 1.2rem;
  vertical-align: top;
}

.crInstant {
  color: #c25e00;
}

.crRequest {
  color: #6b6b6b;
}

/* the legend sits on the page's dark background */
.crLegend .crInstant {
  color: #ffb15c;
}

.crLegend .crRequest {
  color: #d6d6d6;
}

@media only screen and (max-width: 992px) {
  #cmPage,
  #cpPage,
  #crPage {
    width: calc(100% - 1.5rem);
  }

  .crCorner,
  .crRoomHead,
  .crPlatformHead {
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
  }

  .crStatus {
    right: 7.2rem;
  }

  .cpMasters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cmSection {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* ---- the change report (گزارش تغییرات) --------------------------------------- */

.crpFilters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  justify-content: center;
  width: var(--mainMargin);
  margin: 1rem auto;
}

.crpFilters label {
  display: block;
  color: white;
  margin: 0.25rem;
}

.crpFilters .form-select {
  min-width: 9rem;
}

.crpCount {
  color: #d6d6d6;
  text-align: center;
}

.crpScroll {
  overflow-x: auto;
}

/* a record is a tbody of two rows, so the stripes go by record, not by row */
.crpTable tbody:nth-of-type(odd) tr {
  background-color: #d6d6d6;
}

.crpTable tbody:nth-of-type(even) tr {
  background-color: #f7f7f7;
}

.crpRow {
  cursor: pointer;
}

.crpRow.crpOpen td {
  border-top: 2px solid #ffc107;
}

.crpSummary {
  max-width: 26rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.crpWeekdays {
  display: block;
  font-size: 0.8rem;
  color: #555;
}

.crpOk {
  color: #157347;
  font-weight: bold;
}

.crpFail {
  color: #b02a37;
  font-weight: bold;
}

.crpDetail td {
  text-align: right;
}

.crpDetail ul {
  margin: 0 0 0.5rem;
  padding-right: 1.25rem;
}

.crpMessage {
  color: #444;
  font-size: 0.9rem;
}

@media only screen and (max-width: 1024px) {
  .crpFilters {
    width: calc(100% - 1.5rem);
  }

  .crpSummary {
    max-width: 12rem;
  }
}
