/* Aktionszellen bleiben echte Tabellenzellen, damit alle Zeilen bündig sind. */
td.actions {
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
}

td.actions > a,
td.actions > form {
  display: inline-flex;
  vertical-align: middle;
  margin: 0 8px 0 0;
}

td.actions > :last-child {
  margin-right: 0;
}

td.actions form {
  align-items: center;
}

.button.reserve-action {
  color: #8a4b00;
  border-color: #e28a19;
  background: #fff0dc;
}

.button.reserve-action:hover,
.button.reserve-action:focus-visible {
  color: #fff;
  background: #e28a19;
}

.order-cell {
  white-space: nowrap;
}

.order-cell > strong {
  display: inline-block;
  min-width: 28px;
}

.order-controls,
.order-controls form {
  display: inline-flex;
  align-items: center;
}

.order-controls {
  gap: 5px;
  margin-left: 8px;
}

.order-controls form {
  margin: 0;
}

.order-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #111;
  border-radius: 50%;
  color: #111;
  background: #fff;
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.order-button:disabled {
  opacity: .25;
  cursor: default;
}

.order-button-top {
  color: #a5208e;
  border-color: #a5208e;
}

.customer-detail-title {
  align-items: center;
}

.customer-detail-title form {
  margin: 0;
}

.customer-account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.customer-detail-panel {
  margin-bottom: 26px;
  padding: 32px;
  border: 1px solid var(--line);
  background: #fff;
}

.customer-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.customer-detail-heading h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
}

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.customer-detail-grid > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.customer-detail-grid > div.wide {
  grid-column: span 2;
}

.customer-detail-grid dt {
  margin-bottom: 6px;
  color: #777;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.customer-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.customer-detail-empty {
  margin: 0;
  color: #666;
}

.customer-detail-subtitle {
  max-width: 760px;
  margin: 7px 0 0;
  color: #666;
}

.customer-conversation-list {
  display: grid;
  gap: 14px;
}

.customer-conversation {
  border: 1px solid var(--line);
  background: #fafafa;
}

.customer-conversation > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 22px;
  cursor: pointer;
}

.customer-conversation > summary::marker {
  color: #a5208e;
}

.customer-conversation[open] > summary {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.customer-conversation-summary-copy,
.customer-conversation-meta {
  display: grid;
  gap: 4px;
}

.customer-conversation-summary-copy small {
  color: #a5208e;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.customer-conversation-summary-copy strong {
  font-size: 1.05rem;
}

.customer-conversation-summary-copy em,
.customer-conversation-meta time {
  color: #666;
  font-size: .78rem;
  font-style: normal;
}

.customer-conversation-meta {
  flex: 0 0 auto;
  text-align: right;
}

.customer-conversation-body {
  padding: 22px;
  background: #fff;
}

.customer-conversation-parties {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.customer-conversation-parties > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.customer-conversation-parties span {
  color: #777;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.customer-conversation-parties strong,
.customer-conversation-parties small {
  overflow-wrap: anywhere;
}

.customer-conversation-parties small {
  color: #666;
}

.customer-conversation-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0;
}

.customer-conversation-message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 10px;
  width: min(78%, 760px);
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background: #fff;
  font-size: .78rem;
  line-height: 1.25;
}

.customer-conversation-message.from-customer {
  align-self: flex-end;
  color: #111;
  border-color: #e5d7e2;
  background: #f5edf4;
}

.customer-conversation-message.from-other {
  align-self: flex-start;
}

.customer-conversation-message header {
  display: block;
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding-top: .15em;
  font-size: .58rem;
  line-height: 1.2;
}

.customer-conversation-message time {
  display: block;
  text-align: right;
  white-space: nowrap;
  color: #777;
}

.customer-conversation-message.from-customer time {
  color: #666;
}

.customer-conversation-message p {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  overflow-wrap: anywhere;
}

.customer-conversation-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.provider-contact-summary {
  border-left: 4px solid #a5208e;
}

.provider-contact-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.provider-contact-summary-head .eyebrow {
  margin: 0 0 6px;
}

.provider-contact-summary-head h2 {
  margin: 0;
}

.provider-contact-overall,
.provider-contact-list-state {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-weight: 700;
}

.provider-contact-overall {
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: .78rem;
}

.provider-contact-overall.is-public,
.provider-contact-list-state.is-public,
.provider-contact-flag.is-public {
  color: #176d37;
  background: #e4f7ea;
}

.provider-contact-overall.is-private,
.provider-contact-list-state.is-private,
.provider-contact-flag.is-private {
  color: #5e5e5e;
  background: #ededed;
}

.provider-contact-flags {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.provider-contact-flag {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 5px;
  font-size: .76rem;
}

.provider-contact-flag strong {
  color: #111;
  font-size: .82rem;
}

.provider-contact-list-state {
  margin-top: 7px;
  padding: 4px 8px;
  font-size: .65rem;
  line-height: 1.2;
}

.machine-records-table th,
.machine-records-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.machine-records-table th {
  padding-top: 11px;
  padding-bottom: 11px;
}

.machine-records-table td {
  font-size: .88rem;
  line-height: 1.2;
}

.machine-records-table td small {
  margin-top: 2px;
  font-size: .74rem;
  line-height: 1.15;
}

.machine-records-table .provider-contact-list-state {
  margin-top: 4px;
  padding: 3px 7px;
  font-size: .61rem;
}

.machine-records-table .button.small {
  min-height: 30px;
  padding: 0 10px;
  font-size: .64rem;
}

.machine-records-table .order-controls {
  gap: 3px;
  margin-left: 5px;
}

.machine-records-table .order-button {
  width: 26px;
  height: 26px;
  font-size: .82rem;
}

.machine-records-table .status {
  padding: 4px 7px;
  font-size: .64rem;
}

.status.rejected {
  color: #8d1212;
  background: #ffeded;
}

.admin-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-body .admin-main {
  flex: 1 0 auto;
}

.admin-header nav a.portal-home-link {
  display: inline-flex;
}

.portal-footer {
  flex: 0 0 auto;
  padding: 64px 0 24px;
  color: #fff;
  background: #000;
}

.portal-footer-shell {
  width: min(1320px, calc(100% - 48px));
  margin-inline: auto;
}

.portal-footer-top {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 60px;
  padding-bottom: 48px;
}

.portal-footer-mark {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.05em;
}

.portal-footer-top p {
  margin: 0;
  color: #888;
}

.portal-footer-contact {
  display: inline-flex;
  min-height: 44px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.portal-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid #222;
  color: #777;
  font-size: .68rem;
  text-transform: uppercase;
}

.portal-footer-bottom div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
}

.portal-footer-bottom a {
  color: inherit;
  text-decoration: none;
}

.portal-footer a:hover,
.portal-footer a:focus-visible {
  color: #fff;
}

@media (max-width: 950px) {
  .customer-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-conversation-parties { grid-template-columns: 1fr; }
  .provider-contact-flags { grid-template-columns: 1fr; }
  .portal-footer-top { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 600px) {
  .customer-account-actions { width: 100%; justify-content: flex-start; }
  .customer-detail-panel { padding: 20px; }
  .customer-detail-heading { align-items: flex-start; flex-direction: column; }
  .customer-detail-grid { grid-template-columns: 1fr; }
  .customer-detail-grid > div.wide { grid-column: auto; }
  .customer-conversation > summary { align-items: flex-start; flex-direction: column; }
  .customer-conversation-meta { text-align: left; }
  .customer-conversation-message { width: 100%; }
  .provider-contact-summary-head { align-items: flex-start; flex-direction: column; }
  .portal-footer { padding-top: 48px; }
  .portal-footer-shell { width: calc(100% - 28px); }
  .portal-footer-bottom { flex-direction: column; }
}
.form-grid select {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid #bbb;
  border-radius: 0;
  background: #fff;
  color: #111;
  font: inherit;
}

.field-choice.is-disabled,
.form-grid label.is-disabled {
  opacity: .48;
}

.accessory-link-editor > small {
  max-width: 820px;
}

.link-editor-toolbar[hidden],
.link-editor-surface[hidden],
.link-editor-source[hidden] {
  display: none !important;
}

.link-editor-toolbar {
  display: flex;
  margin-top: 5px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.link-editor-toolbar button {
  display: inline-flex;
  min-height: 34px;
  padding: 0 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #aaa;
  border-radius: 999px;
  color: #111;
  background: #fff;
  font: 600 .72rem/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.link-editor-toolbar button:hover,
.link-editor-toolbar button:focus-visible {
  border-color: #a5208e;
  color: #a5208e;
  outline: none;
}

.link-editor-surface {
  min-height: 170px;
  padding: 12px 13px;
  overflow: auto;
  border: 1px solid #bbb;
  color: #111;
  background: #fff;
  cursor: text;
  font: 16px/1.55 Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
}

.link-editor-surface:focus {
  border-color: #a5208e;
  box-shadow: 0 0 0 2px rgba(165, 32, 142, .12);
  outline: none;
}

.link-editor-surface:empty::before {
  color: #999;
  content: attr(data-placeholder);
  pointer-events: none;
}

.link-editor-surface a {
  color: #a5208e;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
