/*!
 * CMS Ver.3.2 から導入されたブロックエディター対応のための暫定処置
 * カスケードレイヤーにより詳細度を低くしてテーマスタイルを上書きしないよう対策
 */
@layer acms-editor, editor-override;
@import "/themes/system/css/acms-editor.min.css" layer(acms-editor);

/* ユニット上下余白の変数定義 */
:root {
  --unit-margin-top: 0;
  --unit-margin-bottom: 30px;
}

@layer editor-verride {
  /* エントリー内テーブルのスタイルをリセット*/
  .acms-entry table:not(:where([class~=not-editor-style],[class~=not-editor-style] *)) th,
  .acms-entry table:not(:where([class~=not-editor-style],[class~=not-editor-style] *)) td {
    min-width: auto;
    border: none;
  }
  .acms-entry table:not(:where([class~=not-editor-style],[class~=not-editor-style] *)) td.buttonTd {
    white-space: nowrap;
  }
}

.entry-column .column-block-editor {
  /* ブロックエディターの .acms-grid 対応 */
  margin-right: 10px;
  margin-left: 10px;

  * {
    margin-right: 0;
    margin-left: 0;
  }

  /* ブロックエディター内での既存ユニットスタイル上書き */
  ul,ol {
    p {
      margin: 0;
    }
  }
}

/* 元々のスタイルがイマイチなので全ユニットのキャプション余白を上書きしています */
.entry-column .media-image-block figcaption,
.entry-column .acms-admin-block-editor-image figcaption,
.entry-column [class*=column-image] .caption,
.entry-column [class*=column-media] .caption,
.entry-column [class*=column-eximage] .caption {
  margin: 4px 0 10px 0;
}

/* js-biggerlink */
.js-biggerlink {
  position: relative;
  a::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
  }
}

/* https://developer.a-blogcms.jp/blog/ のカード型ブログ一覧スタイル調整 */
.blog-list {
  .card-inner {
    position: static;
  }
  .card-link {
    height: calc(100% - 5px);
  }

  .card-sm .card-readmore-wrap,
  .card-readmore-wrap {
    bottom: 20px;
    p {
      margin: 0;
    }
  }

  .card-inner-readmore .after {
    position: relative;
    &:after {
      pointer-events: none;
      bottom: 0;
    }
  }

  .card-readmore {
    background-color: white;
  }

  .card-user {
    word-break: keep-all;
  }
}
