/* Application styles */

trix-toolbar {
  background-color: #fff;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"']) {
  display: flex;
  position: relative;
  align-items: center;
  width: 100%;
  min-height: 4rem;
  padding: 0.75rem 4rem 0.75rem 4.25rem;
  border: 1px solid #94a3b8;
  border-radius: 0.375rem;
  background: #f8fafc;
  color: #334155;
  line-height: 1.35;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"'])::before {
  content: "▶";
  display: grid;
  position: absolute;
  left: 1rem;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #334155;
  color: #fff;
  font-size: 0.75rem;
  padding-left: 0.125rem;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"'])::after {
  content: "動画";
  position: absolute;
  right: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"']) .attachment__caption {
  min-width: 0;
  text-align: left;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"']) .attachment__name {
  overflow-wrap: anywhere;
  font-weight: 600;
}

.walk-form trix-editor figure:is(.attachment--mp4, [data-trix-attachment*='"contentType":"video/mp4"']) .attachment__size {
  color: #64748b;
}

@media (max-width: 639px) {
  .walk-form--editing trix-toolbar.is-stuck {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding-inline-start: max(1.25rem, env(safe-area-inset-left));
    padding-inline-end: max(1.25rem, env(safe-area-inset-right));
    border-radius: 0;
  }

  .walk-form trix-toolbar .trix-button-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.375rem;
    overflow-x: visible;
  }

  .walk-form trix-toolbar .trix-button-group {
    margin: 0;
  }

  .walk-form trix-toolbar .trix-button-group--history-tools {
    display: flex;
  }
}
