.edm-attachments-trigger {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  border: 0;
  border-radius: 999px;
  background: #d71920;
  color: #fff;
  box-shadow: 0 18px 40px rgb(0 0 0 / 28%);
  cursor: pointer;
  font: 800 13px/1.2 Inter, Arial, sans-serif;
  letter-spacing: 0;
  padding: 14px 18px;
}

.edm-attachments-trigger:hover {
  background: #aa1117;
}

.edm-attachments-overlay {
  align-items: center;
  background: rgb(0 0 0 / 55%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 1400;
}

.edm-attachments-modal {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 35%);
  color: #171717;
  max-height: min(92vh, 860px);
  max-width: 1040px;
  overflow: auto;
  width: min(100%, 1040px);
}

.edm-attachments-header {
  align-items: flex-start;
  background: #0b0b0d;
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 24px;
}

.edm-attachments-kicker {
  color: #ffb4b8;
  font: 800 12px/1.2 Inter, Arial, sans-serif;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.edm-attachments-header h2 {
  font: 900 24px/1.15 Inter, Arial, sans-serif;
  letter-spacing: 0;
  margin: 0;
}

.edm-attachments-close {
  background: #fff;
  border: 0;
  border-radius: 8px;
  color: #0b0b0d;
  cursor: pointer;
  font: 900 20px/1 Inter, Arial, sans-serif;
  height: 36px;
  width: 36px;
}

.edm-attachments-body {
  display: grid;
  gap: 18px;
  padding: 22px 24px 24px;
}

.edm-attachments-row {
  display: grid;
  gap: 8px;
}

.edm-attachments-row label,
.edm-attachments-upload-card label {
  color: #30343b;
  font: 800 13px/1.2 Inter, Arial, sans-serif;
}

.edm-attachments-row select {
  appearance: none;
  background: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  color: #171717;
  font: 700 14px/1.3 Inter, Arial, sans-serif;
  min-height: 44px;
  padding: 0 12px;
}

.edm-attachments-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.edm-attachments-upload-card {
  background: #f8f9fb;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.edm-attachments-upload-card input {
  background: #fff;
  border: 1px dashed #b8beca;
  border-radius: 8px;
  color: #30343b;
  font: 700 13px/1.3 Inter, Arial, sans-serif;
  padding: 10px;
}

.edm-attachments-upload-card button,
.edm-attachments-delete {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: 900 12px/1.2 Inter, Arial, sans-serif;
  min-height: 38px;
}

.edm-attachments-upload-card button {
  background: #d71920;
  color: #fff;
}

.edm-attachments-upload-card button:hover,
.edm-attachments-delete:hover {
  filter: brightness(0.9);
}

.edm-attachments-list {
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  overflow: hidden;
}

.edm-attachments-list-header,
.edm-attachments-list-item {
  display: grid;
  gap: 12px;
  grid-template-columns: 150px minmax(180px, 1fr) 96px 160px;
  padding: 12px 14px;
}

.edm-attachments-list-header {
  background: #0b0b0d;
  color: #fff;
  font: 900 12px/1.2 Inter, Arial, sans-serif;
  text-transform: uppercase;
}

.edm-attachments-list-item {
  align-items: center;
  border-top: 1px solid #e4e7ec;
  color: #30343b;
  font: 700 13px/1.3 Inter, Arial, sans-serif;
}

.edm-attachments-badge {
  background: #ffe7e9;
  border: 1px solid #ffc5ca;
  border-radius: 999px;
  color: #9d1117;
  display: inline-flex;
  font: 900 11px/1.2 Inter, Arial, sans-serif;
  justify-content: center;
  padding: 6px 10px;
  width: fit-content;
}

.edm-attachments-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.edm-attachments-download {
  align-items: center;
  background: #0b0b0d;
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font: 900 12px/1.2 Inter, Arial, sans-serif;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  text-decoration: none;
}

.edm-attachments-delete {
  background: #f2f4f7;
  color: #9d1117;
  min-height: 34px;
  padding: 0 10px;
}

.edm-attachments-empty,
.edm-attachments-message {
  background: #fff8e5;
  border: 1px solid #ffd77a;
  border-radius: 8px;
  color: #7a4b00;
  font: 800 13px/1.4 Inter, Arial, sans-serif;
  padding: 12px 14px;
}

.edm-attachments-message.is-error {
  background: #fff0f0;
  border-color: #ffb5b5;
  color: #9d1117;
}

.edm-attachments-message.is-ok {
  background: #eefbf1;
  border-color: #b7eac2;
  color: #116329;
}

@media (max-width: 820px) {
  .edm-attachments-grid,
  .edm-attachments-list-header,
  .edm-attachments-list-item {
    grid-template-columns: 1fr;
  }

  .edm-attachments-list-header {
    display: none;
  }

  .edm-attachments-actions {
    justify-content: flex-start;
  }

  .edm-attachments-trigger {
    bottom: 16px;
    left: 16px;
    right: 16px;
    width: auto;
  }
}
