.yzt-customer-deal {
  background: var(--yzt-paper);
  border: 1px solid var(--yzt-hairline);
  border-radius: calc(var(--yzt-card-radius) + 6px);
  overflow: hidden;
}

.yzt-customer-deal__head {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.5rem;
}

.yzt-customer-deal__head h3,
.yzt-notification-centre h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: .35rem 0;
}

.yzt-customer-deal__head p:last-child,
.yzt-notification-centre header p:last-child {
  color: var(--yzt-ink-soft);
  font-size: .8rem;
  margin: 0;
}

.yzt-customer-deal__head > span,
.yzt-notification-list__type,
.yzt-notification-list__new {
  background: var(--yzt-surface);
  border-radius: var(--yzt-button-radius);
  color: var(--yzt-ink-soft);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  padding: .4rem .65rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.yzt-deal-thread {
  background: color-mix(in srgb, var(--yzt-surface) 55%, transparent);
  border-block: 1px solid var(--yzt-hairline);
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 0;
  max-height: 42rem;
  overflow-y: auto;
  padding: 1.5rem;
}

.yzt-deal-message {
  display: flex;
}

.yzt-deal-message--admin {
  justify-content: flex-end;
}

.yzt-deal-message article {
  background: var(--yzt-paper);
  border: 1px solid var(--yzt-hairline);
  border-radius: var(--yzt-card-radius);
  max-width: min(88%, 42rem);
  padding: 1rem;
}

.yzt-deal-message--admin article {
  background: var(--yzt-ink);
  color: var(--yzt-canvas);
}

.yzt-deal-message header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.yzt-deal-message header > span {
  border: 1px solid currentColor;
  border-radius: var(--yzt-button-radius);
  font-size: .58rem;
  letter-spacing: .08em;
  opacity: .72;
  padding: .2rem .4rem;
  text-transform: uppercase;
}

.yzt-deal-message time {
  color: var(--yzt-ink-soft);
  font-size: .68rem;
  margin-left: auto;
}

.yzt-deal-message--admin time {
  color: color-mix(in srgb, var(--yzt-canvas) 65%, transparent);
}

.yzt-deal-message article > p {
  line-height: 1.65;
  margin: .75rem 0 0;
}

.yzt-deal-files {
  display: grid;
  gap: .4rem;
  list-style: none;
  margin: .8rem 0 0;
  padding: 0;
}

.yzt-deal-files a {
  background: color-mix(in srgb, currentColor 7%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: var(--yzt-control-radius);
  color: inherit;
  display: flex;
  flex-direction: column;
  padding: .65rem .75rem;
  text-decoration: none;
}

.yzt-deal-files span {
  font-size: .65rem;
  opacity: .68;
}

.yzt-deal-compose {
  padding: 1.5rem;
}

.yzt-deal-compose > label {
  display: flex;
  flex-direction: column;
  font-size: .8rem;
}

.yzt-deal-compose label span,
.yzt-deal-compose__lower label span {
  color: var(--yzt-ink-soft);
  font-size: .7rem;
  font-weight: 400;
  margin-top: .2rem;
}

.yzt-deal-compose textarea {
  margin-top: .6rem;
  width: 100%;
}

.yzt-deal-compose__lower {
  align-items: flex-end;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: .9rem;
}

.yzt-deal-compose__lower label {
  display: flex;
  flex-direction: column;
  font-size: .75rem;
}

.yzt-deal-compose__lower input {
  margin-top: .5rem;
  width: 100%;
}

.yzt-deal-compose__lower [data-deal-file-list] {
  color: var(--yzt-ink-soft);
  font-size: .68rem;
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}

.yzt-deal-compose__status {
  color: var(--yzt-ink-soft);
  font-size: .72rem;
  margin: .7rem 0 0;
  min-height: 1.1rem;
}

.yzt-deal-empty {
  background: var(--yzt-surface);
  border-block: 1px solid var(--yzt-hairline);
  padding: 2rem 1.5rem;
}

.yzt-deal-empty p {
  color: var(--yzt-ink-soft);
  margin: .35rem 0 0;
}

.yzt-deal-notice {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin: 0 1.5rem 1rem;
  padding: .85rem 1rem;
}

.yzt-deal-notice--success {
  background: color-mix(in srgb, var(--wp--preset--color--success) 11%, var(--yzt-paper));
  border-left: 3px solid var(--wp--preset--color--success);
}

.yzt-deal-notice--error {
  background: color-mix(in srgb, var(--wp--preset--color--danger) 10%, var(--yzt-paper));
  border-left: 3px solid var(--wp--preset--color--danger);
}

.yzt-notification-centre > header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.yzt-notification-list {
  display: grid;
  gap: .65rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.yzt-notification-list a {
  background: var(--yzt-paper);
  border: 1px solid var(--yzt-hairline);
  border-radius: var(--yzt-card-radius);
  color: var(--yzt-ink);
  display: grid;
  gap: .35rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  padding: 1rem;
  text-decoration: none;
}

.yzt-notification-list .is-unread a {
  border-left: 3px solid var(--yzt-brand);
}

.yzt-notification-list strong,
.yzt-notification-list small {
  grid-column: 2;
}

.yzt-notification-list small {
  color: var(--yzt-ink-soft);
}

.yzt-notification-list__new {
  color: var(--yzt-brand);
  grid-column: 3;
  grid-row: 1;
}

@media (max-width: 700px) {
  .yzt-customer-deal__head,
  .yzt-notification-centre > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .yzt-deal-message article {
    max-width: 96%;
  }

  .yzt-deal-message header {
    align-items: flex-start;
  }

  .yzt-deal-message time {
    flex-basis: 100%;
    margin-left: 0;
  }

  .yzt-deal-compose__lower {
    grid-template-columns: 1fr;
  }

  .yzt-deal-compose__lower button {
    width: 100%;
  }

  .yzt-notification-list a {
    grid-template-columns: 1fr auto;
  }

  .yzt-notification-list__type,
  .yzt-notification-list strong,
  .yzt-notification-list small {
    grid-column: 1;
  }
}
