.media-name-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, var(--surface), var(--paper));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(50, 65, 55, 0.09),
    0 4px 0 color-mix(in srgb, var(--line) 80%, #65736b),
    0 18px 48px rgba(15, 27, 20, 0.24);
}

.media-name-dialog::backdrop {
  background: rgba(14, 19, 16, 0.48);
  backdrop-filter: blur(2px);
}

.media-name-form { padding: 22px; }

.media-name-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.media-name-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 72%, white);
  border-radius: 9px;
  background: linear-gradient(155deg, var(--surface), var(--paper));
  box-shadow: inset 0 1px 0 white, 0 2px 0 var(--line), 0 4px 8px rgba(25, 40, 30, 0.08);
}

.media-name-icon img { width: 23px; height: 23px; object-fit: contain; }
.media-name-heading-copy { min-width: 0; }
.media-name-eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.media-name-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
}

.media-name-label {
  display: block;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.media-name-input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, #87948b);
  border-radius: 7px;
  outline: none;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 45%, white);
  box-shadow: inset 0 2px 5px rgba(24, 37, 29, 0.12), inset 0 1px 1px rgba(24, 37, 29, 0.08), 0 1px 0 white;
  font: inherit;
  user-select: text;
  -webkit-user-select: text;
}

.media-name-input:focus {
  border-color: var(--green);
  box-shadow: inset 0 2px 5px rgba(24, 37, 29, 0.1), 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
}

.media-name-error {
  min-height: 19px;
  margin: 5px 0 0;
  color: var(--danger, var(--red));
  font-size: 11px;
}

.media-name-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
}

.media-name-button {
  min-width: 88px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: linear-gradient(var(--surface), var(--paper));
  box-shadow: inset 0 1px 0 white, 0 2px 0 var(--line), 0 3px 6px rgba(25, 40, 30, 0.08);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.media-name-button.save {
  border-color: var(--green-dark);
  color: white;
  background: linear-gradient(color-mix(in srgb, var(--green) 85%, white), var(--green-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 2px 0 color-mix(in srgb, var(--green-dark) 78%, black), 0 4px 8px rgba(25, 40, 30, 0.13);
}

.media-name-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--green) 24%, transparent);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .media-name-form { padding: 18px; }
  .media-name-heading h2 { font-size: 17px; }
}
