#bca-launcher {
  position: fixed;
  z-index: 78;
  top: 88px;
  right: clamp(16px, 3vw, 40px);
}

#bca-launcher[hidden],
#bca-modal[hidden] {
  display: none !important;
}

#bca-modal {
  position: fixed;
  z-index: 420;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.bca-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 35, 28, .62);
  backdrop-filter: blur(4px);
}

.bca-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1050px, 100%);
  max-height: min(860px, calc(100vh - 44px));
  overflow: hidden;
  border: 1px solid #d9e3dc;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(12, 32, 23, .34);
}

.bca-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #e2e8e3;
  padding: 20px 22px 17px;
}

.bca-header span {
  display: block;
  margin-bottom: 3px;
  color: #668073;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.bca-header h2 {
  margin: 0;
  color: #203b31;
  font-size: 1.35rem;
}

.bca-header p {
  max-width: 720px;
  margin: 5px 0 0;
  color: #687970;
  font-size: .84rem;
  line-height: 1.45;
}

.bca-header .icon-button {
  flex: none;
  font-size: 1.6rem;
}

.bca-controls {
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(260px, 1.35fr) auto;
  gap: 12px;
  align-items: end;
  border-bottom: 1px solid #e6ebe7;
  background: #f7faf8;
  padding: 14px 22px;
}

.bca-controls label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #4f655a;
  font-size: .74rem;
  font-weight: 850;
}

.bca-controls select,
.bca-controls input {
  min-height: 43px;
  border: 1px solid #ccd9d1;
  border-radius: 10px;
  background: #fff;
  color: #293e34;
  padding: 8px 10px;
  font: inherit;
  font-size: 16px;
}

.bca-status {
  min-height: 39px;
  border-bottom: 1px solid #e9edea;
  padding: 11px 22px;
  color: #64766d;
  font-size: .78rem;
  font-weight: 750;
}

.bca-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding: 16px 22px 24px;
}

.bca-message {
  border: 1px solid #dce5df;
  border-radius: 13px;
  background: #fff;
  padding: 13px 14px;
}

.bca-message-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.bca-message-head > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bca-message-head strong {
  color: #284f40;
  font-size: .86rem;
}

.bca-message-head span,
.bca-message small {
  color: #74857c;
  font-size: .7rem;
}

.bca-message p {
  margin: 9px 0 8px;
  color: #334a3f;
  line-height: 1.5;
  white-space: pre-wrap;
}

.bca-restore {
  flex: none;
  min-height: 36px;
  padding: .45rem .65rem;
  font-size: .72rem;
}

.bca-empty {
  border: 1px dashed #c5d2ca;
  border-radius: 13px;
  background: #f7faf8;
  padding: 34px 20px;
  color: #697b72;
  text-align: center;
}

body.bca-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  #bca-launcher {
    top: auto;
    right: 16px;
    bottom: 86px;
  }

  .bca-controls {
    grid-template-columns: 1fr 1fr;
  }

  .bca-controls .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  #bca-modal {
    align-items: end;
    padding: 0;
  }

  .bca-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }

  .bca-header {
    padding: 16px;
  }

  .bca-controls {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }

  .bca-controls .button {
    grid-column: auto;
    width: 100%;
  }

  .bca-status {
    padding: 10px 16px;
  }

  .bca-list {
    padding: 13px 16px 20px;
  }

  .bca-message-head {
    flex-direction: column;
  }

  .bca-restore {
    width: 100%;
  }
}
