@media screen, print {
  body {
    --metadata-label-width: calc(9em * var(--metadata-label-width-multiplier, 1));
  }
  body.is-phone {
    --metadata-label-width: calc(7.5em * var(--metadata-label-width-multiplier, 1));
  }

  .metadata-container {
    --metadata-divider-width: 0 !important;
  }
  .metadata-properties-heading {
    width: 100%;
  }
  .metadata-property-key-input,
  .metadata-input {
    border-bottom: none !important;
    box-shadow: none !important;
  }
  .metadata-link {
    width: 100%;
  }

  // Side panels
  .workspace > .workspace-split:not(.mod-root) .metadata-container .metadata-properties {
    --metadata-divider-width: 0px;
    --metadata-gap: 8px;
  }

  // Editor panel
  .mod-root .metadata-container .metadata-show-source-button,
  .mod-root .metadata-container .metadata-add-button {
    gap: 8px;
    padding-inline-start: 8px;
    margin-left: -4px;
    margin-top: var(--metadata-gap);
  }

  // Metadata: Style Settings
  body.metadata-heading-off .metadata-properties-heading {
    display: none;
  }
  body.metadata-heading-off .hover-popover .metadata-container {
    display: none;
  }

  body.metadata-add-property-off .metadata-add-button {
    display: none;
  }
  body.metadata-icons-off .metadata-property-icon {
    display: none;
  }

  body.metadata-link-nowrap .metadata-link .metadata-link-inner {
    white-space: normal;
  }

  .markdown-source-view .metadata-container,
  .markdown-preview-view .metadata-container {
    transform: none;
  }

  // Metadata: Block
  body.metadata-block {
    --metadata-background: var(--background-primary-alt);
    --metadata-border-width: var(--border-width);
    --metadata-padding: 12px 16px;

    &.is-phone .metadata-container {
      --metadata-padding: 8px 12px;
    }

    .metadata-container {
      border-radius: var(--radius-s);
    }

    .metadata-properties-heading.is-collapsed {
      margin-bottom: 0;
    }

    .metadata-properties-heading .collapse-indicator {
      inset-inline-start: -16px;
    }

    .workspace-split:not(.mod-root) .metadata-container {
      padding: 8px !important;
    }
  }

  // Metadata: Cupertino
  body.metadata-cupertino {
    --metadata-gap: 0;
    --metadata-padding: 0;
    --metadata-property-radius: var(--radius-m);
    --metadata-property-radius-hover: var(--radius-m);
    --metadata-property-radius-focus: var(--radius-m);

    .metadata-container {
      .metadata-properties-heading {
        display: none;
      }

      .metadata-properties {
        border-radius: var(--radius-m);
        background-color: var(--background-secondary);

        .multi-select-pill {
          font-weight: var(--font-medium);
          font-size: var(--font-ui-small);
        }
      }

      .metadata-property {
        min-height: 44px;
      }
      .metadata-property-icon {
        --icon-size: var(--icon-s);
      }
      .metadata-property-key,
      .metadata-property-value {
        padding: 4px 8px 4px 12px;
        align-items: center;
      }
    }

    .workspace-split:not(.mod-root) .metadata-container {
      padding: 8px !important;
    }

    .metadata-container .metadata-show-source-button,
    .metadata-container .metadata-add-button {
      display: flex;
      transition: var(--anim-duration-moderate) var(--anim-motion-baseline);
      margin-top: 4px;
      margin-left: 0;
      padding-block: 4px;
      padding-inline-start: 12px;
      width: fit-content;
    }

    .markdown-reading-view {
      .metadata-container:not(:hover) .metadata-show-source-button,
      .metadata-container:not(:hover) .metadata-add-button {
        opacity: 0;
        margin-top: 0;
        padding-block: 0;
        height: 0;
      }
    }
  }
}
