/* pages/ir.css */

body[data-path="/en/ir/"] {
  .splide {
    .splide__list {
      max-inline-size: calc(335 * 1rem / 16);
      @media (width >= 768px) {
        max-inline-size: unset;
      }
    }

    .splide__pagination {
      position: absolute;
      inset: auto 0 calc(-28 * 1rem / 16) 0;
      /* justify-content: end; */
      gap: calc(10 * 1rem / 16);
      padding: unset;
      @media (width >= 768px) {
        justify-content: end;
      }

      li {
        line-height: 0;
      }
    }

    .splide__pagination__page {
      inline-size: calc(40 * 1rem / 16);
      block-size: calc(8 * 1rem / 16);
      margin: unset;
      border-radius: unset;
      background-color: var(--color--border-gray);
      opacity: 1;
      transform: unset;
      @media (width >= 768px) {
        inline-size: calc(80 * 1rem / 16);
      }
    }

    .splide__pagination__page.is-active {
      background-color: var(--color--red);
    }

    @media (hover: hover) {
      .splide__pagination__page {
        transition: background-color 0.2s ease;
      }
      .splide__pagination__page:hover {
        background-color: var(--color--red);
      }
    }
  }

  .p-grid {
    .c-grid {
      @media (width >= 768px) {
        grid-template-columns: 1fr 370px;
      }
    }
  }

  .p-earning {
    padding-block-end: calc(28 * 1rem / 16);

    .p-earning__slider {
      position: relative;
      display: block;
      border-radius: calc(var(--border-radius--box) * 1rem / 16);
      background-color: var(--color--greige);
      overflow: hidden;
      @media (width >= 768px) {
        border-radius: calc(var(--border-radius--box) * 1px);
      }
    }

    .p-earning__slider::before {
      content: "";
      position: absolute;
      inset: 0 auto auto 0;
      display: block;
      inline-size: calc(140 * 1rem / 16);
      block-size: calc(140 * 1rem / 16);
      background-color: var(--color--red);
      transform: translate(-50%, 0) skew(-45deg, 0);
    }

    .p-earning__link {
      display: grid;
      grid-template-columns: 1fr;
      gap: calc(30 * 1rem / 16);
      padding-inline: calc(20 * 1rem / 16);
      padding-block: calc(30 * 1rem / 16);
      @media (width >= 768px) {
        grid-template-columns: auto 1fr;
        gap: 50px;
        padding-inline: 30px;
        /* padding-block: 30px 50px; */
        padding-block: 30px;
      }
    }

    .p-earning__image {
      text-align: center;

      .c-image {
        inline-size: calc(150 * 1rem / 16);
        box-shadow: 0 0 3px 0 rgba(var(--color-rgb--black), 0.15);
        @media (width >= 768px) {
          inline-size: 150px;
        }
      }
    }

    .p-earning__title {
    }

    .p-earning__text {
      block-size: 4lh;
      line-height: 1.8;
    }

    .p-earning__date {
    }
  }

  .p-ir-links {
    .c-box {
      padding-block-start: calc(60 * 1rem / 16);
      @media (width >= 768px) {
        padding-block-start: 80px;
      }
    }
  }
}

body[data-path="/en/ir/policy/plan/"] {

  .c-figure--w650 {
    @media (width >= 768px) {
      max-inline-size: 650px;
    }
  }
  .p-philosophy {
    .c-box {
      padding-block: calc(25 * 1rem / 16);
      @media (width >= 768px) {
        padding-block: 50px;
      }
    }

    .c-flex {
      @media (width >= 768px) {
        span:nth-of-type(1)::after {
          content: ": ";
        }
      }
      /* span:nth-of-type(2) {
        translate: 0 -0.05em;
      } */
    }
  }

  .p-vision-2030 {
    .p-vision-2030__title {
      h2 {
        translate: 0 -0.05em;
      }
    }

    @media (width >= 768px) {
      .p-vision-2030__title::before,
      .p-vision-2030__title::after {
        content: "";
        display: block;
        inline-size: calc(150 * 1rem / 16);
        block-size: 0;
        border-block-start: 1px solid var(--color--gray);
      }
    }
  }

  .p-sustainability {
    .c-table {
      colgroup {
        col:nth-of-type(1),
        col:nth-of-type(3) {
          inline-size: calc(300 * 1rem / 16);
          @media (width >= 768px) {
            inline-size: 300px;
          }
        }
      }
      tbody {
        td:nth-of-type(1) {
          text-align: center;

          .c-image {
            inline-size: calc(80 * 1rem / 16);
            block-size: calc(80 * 1rem / 16);
            @media (width >= 768px) {
              inline-size: 80px;
              block-size: 80px;
            }
          }
        }
        td:not(:nth-of-type(1)) {
          vertical-align: top;

          .c-text--body {
            line-height: 1.43;
            gap: 1em;
          }
        }
      }
    }
  }

  .p-refrigerator {
    .c-table {
      colgroup {
        col:nth-of-type(1) {
          inline-size: calc(400 * 1rem / 16);
          @media (width >= 768px) {
            inline-size: 400px;
          }
        }
      }
      tbody {
        td:nth-of-type(1) {
          font-size: calc(16 * 1rem / 16);
          font-weight: bold;
          text-align: center;
          @media (width >= 768px) {
            font-size: calc(18 * 1rem / 16);
          }
        }
        td:not(:nth-of-type(1)) {
          vertical-align: top;
        }
      }
    }
  }
}

body[data-path="/en/ir/policy/strength/"] {
  .p-map {
    position: relative;

    .p-map__pins,
    .p-map__pin {
      position: absolute;
      inset: 0;
    }

    .p-map__pins {
      z-index: 1;
    }

    .p-map__pin {
      opacity: 1;
      transition: opacity 0.4s ease 0s;
    }

    .p-map__pin[aria-hidden="true"] {
      opacity: 0;
    }

    .p-map__buttons {
      position: absolute;
      inset: auto calc(5 * 1rem / 16) calc(5 * 1rem / 16) auto;
      z-index: 2;
      scale: 0.5;
      transform-origin: bottom right;
      @media (width >= 768px) {
        inset: auto 18px 38px auto;
        scale: unset;
      }

      .c-button--filter[aria-pressed="true"] {
        border-color: var(--color--text-black);
        background-color: var(--color--text-black);
      }

      li:nth-of-type(2) .c-icon {
        background-color: #ef0008;
      }
      li:nth-of-type(3) .c-icon {
        background-color: #00baff;
      }
      li:nth-of-type(4) .c-icon {
        background-color: #ffba00;
      }
      li:nth-of-type(5) .c-icon {
        background-color: #db77ff;
      }
      li:nth-of-type(6) .c-icon {
        background-color: #00b181;
      }
    }

    @media (hover: hover) {
      .p-map__buttons {
        .c-button--filter:hover {
          border-color: var(--color--text-black);
          background-color: var(--color--text-black);
        }
      }
    }
  }
}


body[data-path="/en/ir/individual/results/"] {
}

body[data-path="/en/ir/library/earning/"] {
  .p-period-section {
    .p-period-section__summary {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding-inline: calc(20 * 1rem / 16);
      padding-block: calc(21 * 1rem / 16);
      border: 1px solid var(--color--border-gray);
      border-radius: calc(var(--border-radius--button) * 1rem / 16);
      box-shadow: 0 2px 4px 0 rgba(var(--color-rgb--black), 0.05);
      @media (width >= 768px) {
        padding-inline: 40px 30px;
        padding-block: 21px;
        border-radius: calc(var(--border-radius--button) * 1px);
      }
    }

    .p-period-section__label {
    }

    .p-period-section__icon {
      inline-size: calc(24 * 1rem / 16);
      aspect-ratio: 1;
      line-height: 1;
      @media (width >= 768px) {
        inline-size: 24px;
      }

      .c-icon--plus {
        display: block;
      }
      .c-icon--minus {
        display: none;
      }
    }

    .p-period-section__container {
      overflow: hidden;
    }

    .p-period-section__content {
      padding-block: calc(40 * 1rem / 16) calc(60 * 1rem / 16);
      @media (width >= 768px) {
        padding-block: 50px 80px;
      }
    }
  }

  .p-period-section[open] {
    .c-icon--plus {
      display: none;
    }
    .c-icon--minus {
      display: block;
    }
  }

  .p-period-section + .p-period-section {
    margin-block-start: calc(10 * 1rem / 16);
    @media (width >= 768px) {
      margin-block-start: 20px;
    }
  }

  @media (hover: hover) {
    .p-period-section {
      .p-period-section__label {
        transition: color 0.2s ease 0s;
      }
    }

    .p-period-section:hover {
      .p-period-section__label {
        color: var(--hover--color);
      }
    }
  }
}

body[data-path="/en/ir/stock/"] {
}

body[data-path="/en/ir/stock/outline/"] {
  .p-table1 {
    .c-table {
      tbody {
        th {
        }
        td {
          text-align: right;
        }
      }
    }
  }

  .p-table2 {
    .c-table {
      tbody {
        td:nth-of-type(2),
        td:nth-of-type(3) {
          text-align: right;
        }
      }
    }
  }
}

body[data-path="/en/ir/stock/meeting/"] {
  .p-media-grid {
    .c-media-grid {
      @media (width >= 768px) {
        grid-template-columns: 320px 1fr;
      }

      & > :only-child {
        grid-column: 1 / -1;
      }
    }
  }
}

body[data-path="/en/ir/stock/dividend/"] {
  .p-table {
    .c-table {
      tbody {
        th {
          text-align: left;
        }
        td {
          text-align: right;
        }
      }
    }
  }
}

body[data-path="/en/ir/stock/rating/"] {
}

body[data-path="/en/ir/stock/procedure/"] {
  .p-table {
    .c-table {
      tbody {
        th {
          text-align: left;
        }
      }
    }
  }
}

body[data-path="/en/ir/stock/analyst/"] {
}

body[data-path="/en/ir/calendar/"] {
}

body[data-path="/en/ir/news/"] {
  .p-news-filters {
    @media (width >= 768px) {
      .md\:c-grid--c2 {
        grid-template-columns: 280px 1fr;
      }
    }

    .c-select {
      select {
        background-color: var(--color--white);
      }
    }

    .c-button--filter[aria-pressed="true"] {
      pointer-events: auto;
    }
  }
}


body[data-path="/en/ir/library/highlight/"] {
  .p-header {
    @media (width >= 768px) {
      display: grid;
      grid-template-columns: 1fr 470px;
      align-items: center;
      margin-block: calc(40px - 4px) calc(50px - 4px);
    }

    .c-heading {
      @media (width >= 768px) {
        grid-column: 1 / 2;
        margin-block: unset;
      }
    }

    .c-button {
      @media (width >= 768px) {
        grid-column: 2 / 3;
        margin-inline: unset;
      }
    }
  }
}

body[data-path="/en/ir/disclosure/"] {
}

body[data-path="/en/ir/policy/message/"] {
    .p-signature {
    .c-image {
      max-inline-size: calc(280 * 1rem / 16);
      @media (width >= 768px) {
        max-inline-size: 346px;
      }
    }
  }
  .p-hero-image {
    margin-block-end: calc(40 * 1rem / 16);
    @media (width >= 768px) {
      position: relative;
      margin-block-end: 80px;
    }

    .c-hero-image {
      z-index: 1;
      margin-block-end: calc(60 * 1rem / 16);
      @media (width >= 768px) {
        margin-block-end: unset;
      }
    }

    .p-hero-image__text {
      @media (width >= 768px) {
        position: absolute;
        inset: 120px auto auto 50%;
        z-index: 2;
        line-height: 1.8;
        padding-inline: 1em;
        padding-block: 0.5em;
        background-color: var(--color--white);
        margin-right:15px;
      }

      /* span {
        @media (width >= 768px) {
          padding-inline: 1em;
          padding-block: 0.5em;
          background-color: var(--color--white);
          -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
        }
      } */
    }
  }
}