/* Keep booking confirmations in the provider's View Request modal only. */
#root .provider-bookings-page .booking-card .booking-confirmation {
  display: none !important;
}

#root .provider-bookings-page .booking-card:has(.booking-confirmation) {
  height: auto !important;
  min-height: 156px !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto;
  grid-auto-rows: auto;
  align-items: center;
}

#root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-information {
  grid-column: 1;
  grid-row: 1;
}

#root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  justify-content: flex-end;
  width: auto;
}

/* Keep the client, event date, and schedule columns in the same place on every card. */
#root .provider-bookings-page .booking-card,
#root .provider-bookings-page .booking-card:has(.booking-confirmation) {
  grid-template-columns: minmax(0, 1fr) 330px;
}

#root .provider-bookings-page .booking-card > .booking-actions,
#root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions {
  box-sizing: border-box;
  width: 330px;
  min-width: 330px;
}

#root .provider-bookings-page .booking-information > p:nth-of-type(1),
#root .provider-bookings-page .booking-information > p:nth-of-type(2),
#root .provider-bookings-page .booking-information > p:nth-of-type(3) {
  grid-row: 1 / span 3;
  align-self: center;
  text-align: center;
}

@media (max-width: 1250px) {
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-information {
    grid-column: 1;
    grid-row: 1;
  }

  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 1450px) {
  #root .provider-bookings-page .booking-card,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  #root .provider-bookings-page .booking-card > .booking-actions,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
  }
}

#root .provider-bookings-page .booking-request-modal .provider-request-confirmation {
  box-sizing: border-box;
  width: 100%;
  margin: 18px 0 0;
}

@media (max-width: 700px) {
  #root .provider-bookings-page .booking-card,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 14px;
    min-height: 0 !important;
    height: auto !important;
    padding: 16px !important;
    border-radius: 15px;
    box-shadow: 0 8px 22px rgba(20, 54, 86, 0.08);
  }

  #root .provider-bookings-page .booking-card > .booking-information,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-information {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-auto-rows: auto;
    align-items: start;
    gap: 9px 8px;
    width: 100%;
    min-width: 0;
  }

  #root .provider-bookings-page .booking-information > .status {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
  }

  #root .provider-bookings-page .booking-information > .booking-contact-verified {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin: 0;
    padding: 4px 7px;
    white-space: nowrap;
    font-size: 10px;
  }

  #root .provider-bookings-page .booking-information > h2 {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #root .provider-bookings-page .booking-information > p:nth-of-type(1),
  #root .provider-bookings-page .booking-information > p:nth-of-type(2),
  #root .provider-bookings-page .booking-information > p:nth-of-type(3) {
    grid-column: 1 / -1;
    justify-self: stretch;
    align-self: stretch;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e6edf5;
    border-radius: 10px;
    color: #415b74;
    background: #f7fafe;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
  }

  #root .provider-bookings-page .booking-information > p:nth-of-type(1) { grid-row: 3; }
  #root .provider-bookings-page .booking-information > p:nth-of-type(2) { grid-row: 4; }
  #root .provider-bookings-page .booking-information > p:nth-of-type(3) { grid-row: 5; }

  #root .provider-bookings-page .booking-information > .custom-quote-summary {
    grid-column: 1 / -1;
    grid-row: 6;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
  }

  #root .provider-bookings-page .booking-card > .booking-actions,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    justify-items: stretch;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  #root .provider-bookings-page .booking-card > .booking-actions > *,
  #root .provider-bookings-page .booking-card:has(.booking-confirmation) > .booking-actions > * {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
  }
}
