/* Create Allotment page (resources/views/operations/ota-allotments-create.blade.php) */

/* Matches the design's measured padding exactly (20px vertical, 24px
   horizontal) — less vertical breathing room than the default card body. */
.plx-create-allotment-card .plx-card-body {
  padding: var(--space-5) var(--space-4);
}

.plx-nights-display {
  align-items: center;
  background: var(--bg-surface-muted);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  font-size: var(--text-base);
  height: 38px;
  padding: 0 var(--space-3);
}

.plx-nights-display strong {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  margin-right: var(--space-1);
}

.plx-room-select-header {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  margin-bottom: var(--space-5);
  margin-top: var(--space-8);
}

.plx-room-select-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}

.plx-room-select-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.plx-room-select-filters .plx-select {
  border-color: var(--pm-accent);
  width: 160px;
}

/* "Floor 1" outer card — the header divider is brand-accent (not the
   default gray), and the body padding is much tighter than a normal card
   since each room-type group below is itself a bordered/backgrounded card
   with its own padding. */
.plx-room-floor-card .plx-card-header {
  border-bottom-color: var(--pm-accent);
}

.plx-room-floor-card .plx-card-body {
  padding: 15px;
}

/* Each room-type group (Standard Room, Deluxe Room, ...) renders as its own
   card nested inside the Floor 1 card. */
.plx-room-type-group {
  background: var(--bg-surface-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.plx-room-type-group + .plx-room-type-group {
  margin-top: var(--space-4);
}

.plx-room-type-header {
  align-items: baseline;
  border-bottom: 1px solid rgba(154, 162, 255, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
}

.plx-room-type-title {
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}

.plx-room-type-price {
  color: var(--color-booked);
  font-weight: var(--weight-medium);
  margin-left: var(--space-1);
}

.plx-room-type-count {
  color: var(--pm-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  white-space: nowrap;
}

.plx-room-chip-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
}

/* At 1920px this grid's available width fits 15 of the 90px-floor columns
   per row; the same row only fits 8-10 between 1200 and 1535px, pushing a
   20-room floor from 2 rows to 3. A smaller floor (chip content is just a
   3-5 character room number, still perfectly legible at 70px) recovers
   most of that — not a full match since 15 columns would need an
   unreadably narrow chip at this width, but it noticeably cuts down the
   extra wrapping without shrinking anything below a usable size. */
@media (min-width: 1200px) and (max-width: 1535.98px) {
  .plx-room-chip-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  div .plx-room-chip {
    height: 30px;
}
.plx-selected-rooms-label {
    margin-bottom: 10px;
}
}

.plx-room-chip {
  background: var(--bg-surface);
  border: 1.5px solid var(--step-pending);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  height: 40px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.plx-room-chip:hover {
  border-color: var(--pm-accent);
}

.plx-room-chip[data-plx-selected="true"] {
  border-color: var(--color-booked);
  border-width: 2px;
  box-shadow: 0 0 8px rgba(32, 51, 254, 0.25);
}

/* Fixed footer summarizing the current selection — sits above the sidebar's
   own z-index but stays clear of it horizontally via the same width var, and
   collapses to full-width once the sidebar itself goes off-canvas. */
.plx-selected-rooms-bar {
  align-items: center;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  bottom: 0;
  box-shadow: 0 -4px 12px rgba(17, 24, 39, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  left: var(--sidebar-width);
  padding: var(--space-4) var(--space-8);
  position: fixed;
  right: 0;
  z-index: 1015;
}

.plx-selected-rooms-label {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  /* margin: 0; */
}

.plx-selected-rooms-list {
  color: var(--color-available);
  font-size: var(--text-sm);
  margin: 0;
}

.plx-selected-rooms-actions {
  align-items: center;
  display: flex;
  gap: var(--space-3);
}

/* Reserves room below the page content so the fixed bar above never covers
   the last room row — height here must track the bar's own real height. */
.plx-page-has-sticky-footer {
  padding-bottom: 96px;
}

@media (max-width: 991.98px) {
  .plx-selected-rooms-bar {
    left: 0;
  }
}

@media (max-width: 575.98px) {
  .plx-selected-rooms-bar {
    padding: var(--space-3) var(--space-4);
  }

  .plx-selected-rooms-actions {
    width: 100%;
  }

  .plx-selected-rooms-actions .plx-btn {
    flex: 1 1 0;
  }

  .plx-room-select-filters .plx-select {
    width: auto;
  }

  .plx-page-has-sticky-footer {
    padding-bottom: 140px;
  }
}

/* OTA Allotments "View" modal flow (resources/views/operations/partials/
   _ota_booking_modals.blade.php) — booking summary -> room detail -> release
   dates. See ota-allotments-modals.js for the modal-switching logic. */

.plx-modal-divider {
  border: 0;
  border-top: 1px solid var(--pm-accent-soft);
  margin: var(--space-6) 0;
  opacity: 1;
}

.plx-detail-grid {
  display: grid;
  gap: var(--space-4) var(--space-6);
  grid-template-columns: repeat(2, 1fr);
}

.plx-detail-field {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.plx-detail-label {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.plx-detail-value {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
}

.plx-room-list-heading {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-4);
}

.plx-conversion-history-heading {
  margin-bottom: var(--space-3);
}

.plx-room-list-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

/* Fixed (not stretched) widths matching the design's three filter widths,
   leaving the rest of the row empty on the right. */
.plx-room-list-filters .plx-select {
  border-color: var(--pm-accent);
  flex: 0 0 auto;
  height: 30px;
  width: 121px;
}

.plx-room-list-filters .plx-select:nth-child(2) {
  width: 141px;
}

/* Scrolls internally once the allotted-room list outgrows the modal. */
.plx-room-view-card-list {
  display: grid;
  gap: var(--space-3) var(--space-3);
  grid-template-columns: repeat(2, 1fr);
  max-height: 420px;
  overflow-y: auto;
  padding-right: var(--space-1);
}

/* Row layout: text stack on the left, chevron on the right, vertically
   centered against the whole card (not tied to either text line). */
.plx-room-view-card {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--pm-accent);
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  text-align: left;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    border-radius: var(--radius-sm);
  -webkit-border-radius: var(--radius-sm);
  -moz-border-radius: var(--radius-sm);
  -ms-border-radius: var(--radius-sm);
  -o-border-radius: var(--radius-sm);
}

.plx-room-view-card-text {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}

/* Sized down from the shared .plx-pill default so it sits comfortably
   beside the title instead of growing the row to a full-size badge. */
.plx-room-view-card .plx-pill {
  font-size: var(--text-xs);
  padding: 2px var(--space-2);
}

.plx-room-view-card-chevron {
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: 24px;
}

.plx-room-view-card:hover {
  border-color: var(--pm-primary);
  box-shadow: var(--shadow-sm);
}

.plx-room-view-card[data-plx-hidden="true"] {
  display: none;
}

/* Title + pill, left-aligned together (not spread apart). */
.plx-room-view-card-row {
  align-items: center;
  display: flex;
  gap: var(--space-3);
}

.plx-room-view-card-title {
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.plx-room-view-card-meta {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

@media (max-width: 575.98px) {
  .plx-room-view-card-list {
    grid-template-columns: 1fr;
  }
}

/* "Available Allotted Dates" (amber) / "Nights to release" (green) boxes */
.plx-highlight-box {
  margin-bottom: var(--space-5);
    border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  -webkit-border-radius: var(--radius-sm);
  -moz-border-radius: var(--radius-sm);
  -ms-border-radius: var(--radius-sm);
  -o-border-radius: var(--radius-sm);
}

.plx-highlight-box-label {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-1);
}

.plx-highlight-box-value {
  color: var(--text-primary);
  font-size: var(--text-base);
}

.plx-highlight-box-warning {
  background: var(--bg-surface);
  border: 1.5px solid var(--color-notification-dot);
}

.plx-highlight-box-warning .plx-highlight-box-label {
  color: var(--text-primary);
}

.plx-highlight-box-success {
  background: var(--color-success-bg);
  border: 1px solid var(--color-available);
  border-radius: var(--radius-sm);
  margin-bottom: 0;
  padding: var(--space-2) var(--space-3);
}

.plx-highlight-box-success .plx-highlight-box-value {
  color: var(--text-muted);
}

.plx-highlight-box-success .plx-highlight-box-value strong {
  color: var(--color-available);
  font-weight: var(--weight-semibold);
  margin-right: var(--space-1);
}

/* Release Dates modal — narrower gap between the two date fields than the
   default .plx-form-row (60px, tuned for wider pages) needs in a 600px
   modal, plus extra clearance above "Nights to release" so it doesn't read
   as part of the date-field row above it. */
.plx-release-dates-row {
  gap: var(--space-5);
}

.plx-nights-to-release-group {
  margin-top: var(--space-6);
}

.plx-release-helper-text {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-5);
}

/* Dashed (not solid) row dividers, matching the updated design. */
#plxRoomConversionTableJs tbody td {
  border-bottom: 1px dashed var(--pm-accent-soft);
}

/* Room cell: room name on its own line, room type stacked directly below
   it in a smaller, muted style. */
#plxRoomConversionTableJs .plx-room-cell-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
}

#plxRoomConversionTableJs .plx-table-name {
  color: var(--text-secondary);
  line-height: 1.15;
}

#plxRoomConversionTableJs .plx-table-room-type {
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1.2;
}

/* The design has no rule above either footer's action buttons — only the
   shared .plx-modal .modal-footer's default top border/padding need
   overriding here. */
#plxRoomBookingModalJs .modal-footer,
#plxReleaseDatesModalJs .modal-footer {
  border-top: 0;
  padding-top: var(--space-3);
}

#plxRoomBookingModalJs .modal-footer {
  justify-content: center;
}
