/* Famous Bridal global record-list standard.
   See docs/FAMOUS_BRIDAL_GLOBAL_RECORD_LIST_STANDARD.md. */

.record-list-table-wrap {
  max-width: 100%;
  overflow-x: visible !important;
}

.record-list-table {
  width: 100%;
  min-width: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
}

.record-list-table th,
.record-list-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}

.record-list-table tbody tr {
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.record-list-table [data-record-more-cell] {
  display: none;
}

.record-date-range-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.record-date-range {
  position: relative;
  min-width: 0;
}

.record-date-range-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  color: #1f2937;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.record-date-range-trigger > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-date-range-trigger-mark {
  color: #ad5068;
  font-size: 17px;
}

.record-date-range-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1090;
  border: 0;
  background: rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(1px);
}

.record-date-range-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 1100;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  transform: translate(-50%, -50%);
  border: 1px solid #dce2e8;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.record-date-range-presets,
.record-date-range-actions,
.record-date-range-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-date-range-presets {
  flex-wrap: wrap;
  border-bottom: 1px solid #e7ebef;
  padding-bottom: 12px;
}

.record-date-range-presets button,
.record-date-range-actions button,
.record-date-range-nav button {
  min-height: 40px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
  padding: 7px 11px;
  color: #536174;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.record-date-range-presets button:hover,
.record-date-range-nav button:hover {
  border-color: #ad5068;
  color: #ad5068;
}

.record-date-range-nav {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 40px;
  margin: 12px 0;
}

.record-date-range-nav select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #dce2e8;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: #1f2937;
  font: inherit;
}

.record-date-range-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.record-date-range-month > strong {
  display: block;
  margin-bottom: 7px;
  color: #1f2937;
  font-size: 14px;
  text-align: center;
}

.record-date-range-week,
.record-date-range-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.record-date-range-week span {
  padding: 5px 0;
  color: #718096;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.record-date-range-day {
  min-width: 0;
  height: 30px;
  border: 0;
  background: transparent;
  color: #243142;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.record-date-range-day.is-outside { color: #c4cad2; }
.record-date-range-day.is-range { background: #fce8ed; color: #9d3e58; }
.record-date-range-day.is-start { border-radius: 8px 0 0 8px; background: #ad5068; color: #fff; }
.record-date-range-day.is-end { border-radius: 0 8px 8px 0; background: #ad5068; color: #fff; }
.record-date-range-day.is-start.is-end { border-radius: 8px; }

.record-date-range-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  border-top: 1px solid #e7ebef;
  padding-top: 12px;
}

.record-date-range-summary {
  color: #68768a;
  font-size: 12px;
}

.record-date-range-actions { justify-content: flex-end; }
.record-date-range-actions .record-date-range-apply { border-color: #ad5068; background: #ad5068; color: #fff; }

@media (max-width: 900px) {
  .record-list-table-wrap {
    border: 0 !important;
    background: transparent !important;
  }

  .record-list-table {
    display: block;
    width: 100%;
  }

  .record-list-table thead { display: none; }

  .record-list-table tbody {
    display: grid;
    gap: 10px;
  }

  .record-list-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    border: 1px solid #dce2e8;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  }

  .record-list-table tbody td {
    display: grid;
    min-width: 0 !important;
    gap: 3px;
    border: 0 !important;
    padding: 7px 8px !important;
    text-align: left !important;
    white-space: normal !important;
  }

  .record-list-table tbody td::before {
    content: attr(data-record-label);
    color: #718096;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .record-list-table tbody td[data-record-primary="true"] {
    grid-column: 1 / -1;
    border-radius: 8px;
    background: #f7f9fb;
  }

  .record-list-table tbody td[data-record-select="true"] {
    display: none;
  }

  .record-list-table tbody td[data-record-actions="true"] {
    grid-column: 1 / -1;
    align-items: center;
  }

  .record-list-table tbody td[data-record-secondary="true"] {
    display: none;
  }

  .record-list-table tbody tr.is-expanded td[data-record-secondary="true"] {
    display: grid;
  }

  .record-list-table tbody td[data-record-more-cell] {
    display: block;
    grid-column: 1 / -1;
    padding: 2px 0 0 !important;
  }

  .record-list-more-toggle {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-top: 1px solid #e7ebef;
    background: transparent;
    color: #ad5068;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
  }

  .record-list-table tbody td[data-record-actions="true"] :is(form, div) {
    max-width: 100%;
  }

  .record-list-table tbody td[colspan] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .record-date-range-popup { padding: 12px; }
  .record-date-range-months { grid-template-columns: minmax(0, 1fr); }
  .record-date-range-month:nth-child(2) { display: none; }
  .record-date-range-footer { align-items: stretch; flex-direction: column; }
  .record-date-range-actions { width: 100%; }
  .record-date-range-actions button { flex: 1 1 0; }
}
