/*
 * TradeFlow v7.14.19 R10
 * Mobile Holiday settings repair. Desktop tables and all data/workflows remain unchanged.
 */

.tf71425-number-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.tf71425-number-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #66717f;
  font-size: .75rem;
  font-weight: 800;
}

.tf71425-number-field input {
  width: 100%;
  min-width: 0;
  color: #17231e;
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 900px) {
  .tf71425-holiday-modal {
    max-width: 100% !important;
    overflow-x: hidden !important;
    overscroll-behavior: contain;
  }

  #tf-mh-holiday-settings,
  #tf-mh-holiday-settings > *,
  #tf-mh-holiday-settings .tf-mh-field {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  #tf-mh-holiday-settings {
    overflow-x: clip;
  }

  #tf-mh-holiday-settings .tf71425-holiday-members,
  #tf-mh-holiday-settings .tf71425-holiday-members.tfm-card-wrap {
    width: 100%;
    max-width: 100%;
    max-height: none;
    overflow: visible !important;
    border: 0;
    background: transparent;
  }

  #tf-mh-holiday-settings .tf71425-holiday-staff-table,
  #tf-mh-holiday-settings .tf71425-holiday-staff-table.tfm-card-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    table-layout: fixed;
  }

  #tf-mh-holiday-settings .tf71425-holiday-staff-table > tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
    width: 100%;
    min-width: 0;
  }

  #tf-mh-holiday-settings .tf71425-member-card {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  #tf-mh-holiday-settings .tf71425-member-card > td {
    box-sizing: border-box;
    grid-template-columns: minmax(112px, .72fr) minmax(0, 1.28fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
  }

  #tf-mh-holiday-settings .tf71425-member-card > td::before {
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }

  #tf-mh-holiday-settings .tf71425-member-card input:not([type="checkbox"]):not([type="radio"]),
  #tf-mh-holiday-settings .tf71425-member-card select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  #tf-mh-holiday-settings .tf71425-member-card input[type="checkbox"],
  #tf-mh-holiday-settings .tf71425-member-card input[type="radio"] {
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    flex: 0 0 auto;
  }

  #tf-mh-holiday-settings .tf-mh-member-schedule {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  #tf-mh-holiday-settings .tf-mh-member-schedule > label {
    min-width: 0;
    white-space: normal;
  }

  #tf-mh-holiday-settings .tf-mh-schedule-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  #tf-mh-holiday-settings .tf-mh-schedule-grid label,
  #tf-mh-holiday-settings .tf-mh-schedule-grid input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  #tf-mh-holiday-settings .tf-mh-schedule-presets {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  #tf-mh-holiday-settings .tf-mh-schedule-presets .btn {
    width: 100%;
    white-space: normal;
  }

  #tf-mh-holiday-settings .tf71425-number-pair {
    min-width: 0;
  }

  #tf-mh-holiday-settings > .tf-mh-actions {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .tf71425-holiday-modal {
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }

  #tf-mh-holiday-settings .tf71425-member-card > td.tf-mh-member-schedule {
    display: block !important;
  }

  #tf-mh-holiday-settings .tf71425-member-card > td.tf-mh-member-schedule::before {
    display: block;
    margin-bottom: 8px;
  }

  #tf-mh-holiday-settings > .tf-mh-actions {
    position: sticky !important;
    z-index: 12;
    display: grid !important;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr);
    gap: 8px;
    bottom: 0;
    margin: 18px 0 0;
    padding: 12px 0 calc(4px + env(safe-area-inset-bottom));
    background: #fff;
  }

  #tf-mh-holiday-settings > .tf-mh-actions > button {
    width: 100% !important;
    min-width: 0;
    margin: 0;
  }
}
