.attachment-input {
  display: none;
}

.attachment-picker[hidden] {
  display: none;
}

.attachment-picker {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  align-items: end;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}

.attachment-picker-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 18, 27, 0.58);
  backdrop-filter: blur(3px);
}

.attachment-picker-card {
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 20px 16px 14px;
  border: 1px solid rgba(125, 168, 196, 0.26);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(4, 20, 31, 0.28);
}

.attachment-picker-card h2 {
  margin: 0 0 18px;
  color: #20384b;
  font-size: 20px;
  text-align: center;
}

.attachment-picker-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.attachment-picker-action {
  min-width: 0;
  padding: 6px 4px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #25445c;
  text-align: center;
}

.attachment-picker-action:active {
  background: #edf6fc;
}

.attachment-picker-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 9px;
  border-radius: 18px;
  background: #e9f5fd;
  color: #2089c6;
}

.attachment-picker-icon svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
}

.attachment-picker-action strong,
.attachment-picker-action small {
  display: block;
}

.attachment-picker-action strong {
  font-size: 14px;
}

.attachment-picker-action small {
  min-height: 28px;
  margin-top: 3px;
  color: #6f8799;
  font-size: 10px;
  line-height: 1.3;
}

.attachment-picker-cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 0;
  border-radius: 15px;
  background: #edf3f8;
  color: #31566f;
  font-size: 15px;
  font-weight: 700;
}

.attachment-picker-action:focus-visible,
.attachment-picker-cancel:focus-visible {
  outline: 3px solid rgba(34, 158, 217, 0.35);
  outline-offset: 2px;
}

:root[data-theme="dark"] .attachment-picker-card {
  border-color: rgba(117, 174, 207, 0.2);
  background: #152633;
}

:root[data-theme="dark"] .attachment-picker-card h2,
:root[data-theme="dark"] .attachment-picker-action {
  color: #eef8ff;
}

:root[data-theme="dark"] .attachment-picker-action:active {
  background: #203b4d;
}

:root[data-theme="dark"] .attachment-picker-icon {
  background: #1d4259;
  color: #62c8ff;
}

:root[data-theme="dark"] .attachment-picker-action small {
  color: #a9c0cf;
}

:root[data-theme="dark"] .attachment-picker-cancel {
  background: #263e4e;
  color: #eaf7ff;
}

@media (min-width: 700px) {
  .attachment-picker {
    align-items: center;
  }
}
