.department-orders {
  color: #12304a;
}
.department-orders h2 {
  margin: 0 0 22px;
}
.department-order-list {
  border: 1px solid #d5e1ed;
  border-radius: 10px;
  overflow: hidden;
}
.department-order-list table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.department-order-list th {
  background: #f4f8fc;
  text-align: start;
}
.department-order-list th,
.department-order-list td {
  padding: 16px;
  border-bottom: 1px solid #d5e1ed;
  overflow-wrap: anywhere;
}
.department-order-list [hidden] {
  display: none !important;
}
.department-order-expanded > td {
  padding: 20px;
  background: #fdf9f0;
}
.department-order-expanded footer {
  display: flex;
  justify-content: flex-end;
}
.department-order-expanded footer button {
  width: auto;
  min-width: 76px;
}
@media (max-width: 760px) {
  .department-order-list table,
  .department-order-list tbody {
    display: block;
  }
  .department-order-list thead {
    display: none;
  }
  .department-order-list tr {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #d5e1ed;
  }
  .department-order-list td {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 8px;
    border: 0;
  }
  .department-order-list td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 75px;
    font-weight: 600;
  }
  .department-order-expanded > td {
    display: block;
    padding: 0;
  }
}

.order-inline-review > article {
  padding: 14px;
  border: 1px solid #c6dcf6;
  border-radius: 6px;
  margin-block: 10px;
}
.order-inline-review header,
.order-inline-review footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.order-inline-review label {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-block: 10px;
}
.order-inline-review label > input:not([type='checkbox']),
.order-inline-review textarea {
  flex: 1;
  min-width: 0;
}
.order-inline-review .itinerary-plan-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 760px) {
  .order-inline-review .itinerary-plan-editor {
    grid-template-columns: minmax(0, 1fr);
  }
}

.department-order-search {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 600px;
  margin-block: 18px;
}
.department-order-search input {
  min-width: 0;
  flex: 1;
}

.department-order-toolbar {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-block: 22px;
}
.department-shared {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 18px;
  background: #fff3e6;
  color: #a96d17;
  border-radius: 7px;
  font-weight: 700;
  white-space: nowrap;
  border: 0;
  width: auto;
}
.department-order-search {
  margin: 0;
  max-width: none;
  flex: 1;
  gap: 12px;
}
.department-order-search input {
  height: 48px;
}
.department-order-search button {
  width: auto;
  padding: 12px 28px;
  background: #bd8426;
  border: 1px solid #bd8426;
}
.department-order-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.department-order-filter select {
  width: 140px;
  height: 48px;
}
.department-order-list td,
.department-order-list th {
  border-inline-end: 1px solid #d5e1ed;
}
.department-order-pill {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff0ef;
  color: #c3443b;
  font-weight: 600;
}
.department-order-pill.is-arranged {
  background: #dcf6e9;
  color: #287553;
}
.department-order-pill.is-canceled {
  background: #edf0f4;
  color: #697589;
}
.department-itinerary-link {
  padding: 0;
  min-width: 0;
  border: 0;
  background: none;
  color: #008cfb;
  font-weight: 600;
  white-space: nowrap;
}
.department-order-expanded .brief-itinerary ul {
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
}
.department-order-expanded .brief-itinerary li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
}
.department-order-expanded .brief-itinerary li > strong {
  border-inline-end: 1px solid #e5cdaa;
  padding-inline-end: 16px;
}
@media (max-width: 760px) {
  .department-order-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .department-order-search {
    flex-basis: 100%;
    gap: 8px;
  }
  .department-shared {
    padding: 8px 12px;
  }
  .department-order-search button {
    padding: 10px 16px;
  }
  .department-order-list tr[data-department-order] {
    position: relative;
    padding-block: 18px;
  }
  .department-order-list tr[data-department-order] > td:first-child {
    display: block;
    padding-inline-end: 100px;
    font-weight: 700;
  }
  .department-order-list tr[data-department-order] > td:first-child::before {
    display: none;
  }
  .department-order-list .department-order-state {
    position: absolute;
    inset-inline-end: 8px;
    top: 14px;
  }
  .department-order-state::before {
    display: none !important;
  }
  .department-order-list td[data-label]::before {
    flex-basis: 95px;
  }
  .department-order-list .department-order-action {
    justify-content: center;
    border-top: 1px solid #d5e1ed;
    padding-top: 14px;
  }
  .department-order-expanded .brief-itinerary li {
    display: block;
  }
  .department-order-expanded .brief-itinerary li > strong {
    display: block;
    border: 0;
    margin-block-end: 8px;
  }
  .department-order-list tr[data-department-order]:has(+ .department-order-expanded:not([hidden])) {
    border-bottom: 0;
  }
  .department-order-list
    tr[data-department-order]:has(+ .department-order-expanded:not([hidden]))
    .department-order-action {
    display: none;
  }
}

#appView:has([data-department-orders]) #pageTitle {
  font-size: 28px;
  color: #12304a;
}
#appView .department-orders > h2,
#appView .ao-page:has([data-department-orders]) > .ao-page-head {
  display: none;
}
/* A feature-owned page must retain its own title when the global copy is hidden. */
#appView #mainContent > .department-orders[data-page-head-owner='feature'] > h2 {
  display: block;
}
#appView .ao-page[data-page-head-owner='feature']:has([data-department-orders]) > .ao-page-head {
  display: flex;
}
#appView .department-order-toolbar .department-order-search {
  display: flex;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
#appView .department-order-toolbar .department-order-search button {
  background: #bd8426;
  color: white;
  width: auto;
  flex-shrink: 0;
  border-color: #bd8426;
}
#appView .department-orders [data-department-itinerary] {
  border: 0;
  background: transparent;
  color: #008cfb;
  min-width: 0;
  width: auto;
  padding: 0;
  box-shadow: none;
}
#appView .department-order-expanded .brief-itinerary {
  border: 0;
  background: transparent;
  padding: 0;
}
#appView .department-order-expanded .brief-itinerary h4 {
  border-bottom: 1px solid #e5cdaa;
  padding-bottom: 14px;
  margin-bottom: 16px;
}
#appView .department-order-expanded footer button {
  border-color: #bd8426;
  color: #9b651b;
}
@media (max-width: 760px) {
  #appView:has([data-department-orders]) #pageTitle {
    font-size: 22px;
  }
  .department-order-list td {
    border-inline-end: 0;
  }
}
