/*
Theme Name: TVガイド
Version: 1.0
Description: TVガイド専用スクラッチテーマ
*/

.tvg-articles-link-color a:not(.group) {
  color: #2f8fea;
  text-decoration: underline;
}
.tvg_title-template-default a.group,
.tvg_series-template-default a.group,
.tvg_episode-template-default a.group,
.tvg-articles-link-color a.group {
  display: grid;
  margin: 8px 0 24px;
}
.tvg_title-template-default a.group button,
.tvg_series-template-default a.group button,
.tvg_episode-template-default a.group button,
.tvg-articles-link-color a.group button {
  color: #fff;
}


.editor p {
  line-height: 1.6em;
  outline: none;
  font-size: 15px;
  padding: 0 16px 16px;
  word-wrap: break-word;
  word-break: break-all
}

.editor p:first-of-type{
  margin-top: 0;
}

.editor p:last-of-type{
  margin-bottom: 0;
}

.editor h2 {
  --tw-text-opacity: 1;
  display: flex;
  align-items: center;
  color: rgb(255 255 255 / var(--tw-text-opacity, 1));
  font-weight: 700;
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  background: rgb(0 0 0 / var(--tw-bg-opacity, 1));
}

.editor h3 {
  position: relative;
  font-size: 17px;
  font-weight: 700;
  padding: 0 0 0 12px;
  margin: 40px 16px 20px
}

.editor h3:after {
  position: absolute;
  left: 0;
  top: 4px;
  width: 4px;
  height: 16px;
  content: "";
  background: linear-gradient(180deg,#226dff,#d458ff)
}

.editor h4 {
  font-size: 15px;
  font-weight: 500;
  padding: 0;
  margin: 20px 16px
}

.editor .image-tool img {
  margin: 0 auto;
}

/* AnyButton color override for imported EditorJS content */
.editor .anyButton__btn {
  background: #00CD0A;
  border-color: #00CD0A;
}

.editor .anyButton__btn--default {
  background-color: #00CD0A;
  border-color: #00CD0A;
}

.editor .anyButton__title {
  color: #00CD0A;
}

.editor .anyButtonContainer__anyButtonHolder:hover .anyButton__btn {
  background: #00A226;
  border-color: #00A226;
}

.editor .anyButtonContainer__anyButtonHolder:hover .anyButton__title {
  color: #00A226;
}

.editor table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.1)
}

.editor table td,.editor table th {
  padding: 12px;
  border-right: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  text-align: left;
  vertical-align: top;
  min-width: 100px;
  word-wrap: break-word;
  transition: background-color .2s ease
}

.editor table td:focus,.editor table th:focus {
  outline: 2px solid #007bff;
  outline-offset: -2px;
  background: #e3f2fd
}

.editor table td:empty:before,.editor table th:empty:before {
  content: " "
}

.editor table td:last-child,.editor table th:last-child {
  border-right: none
}

.editor table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 1
}

.editor table td {
  background: #fff;
  color: #212529
}

.editor table td:hover,.editor table tr:hover {
  background: #f8f9fa
}

.editor table tr:last-child td,.editor table tr:last-child th {
  border-bottom: none
}

@media(min-width: 768px) {
  .editor h2 {
    border-radius: 0.5rem;
    font-size: 21px;
    margin-inline: -12px;
    padding-block: 1rem;
  }

  .editor h3 {
    margin: 40px 0 20px
  }

  .editor h4 {
    margin: 20px 12px
  }

  .embed-tool {
    padding: 0 0 20px
  }

  .editor table td,.editor table th {
    padding:8px;
    min-width: 80px;
    font-size: 14px
  }
}

.wp-block-embed {
  padding-bottom: 20px;
}

.wp-block-embed iframe,
.wp-block-embed .wp-block-embed__wrapper iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}

/* ニュース/作品詳細の本文内で長いURLを折り返す */
.single-post .editor,
.single-tvg_title .editor,
.single-tvg_series .editor,
.single-tvg_episode .editor {
  overflow-wrap: anywhere;
  word-break: break-word;
}
