/*
 * Copyright 2020 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:root {
  /* au.com brand colors */
  --color-orange: #ff4e00;
  --color-orange-hover: #e64500;
  --color-red-accent: #ff0800;
  --background-color: #fff;
  --light-color: #f3f3f3;
  --dark-color: #505050;
  --text-color: #333;
  --link-color: #1662d0;
  --link-hover-color: #0f4da0;
  --border-color: #f3f3f3;

  /* fonts — matches "noto-sans-cjk-jp" + @font-family-local from reference project */
  --body-font-family: 'Noto Sans JP', 'Noto Sans JP Fallback', 'Noto Sans JP Fallback Meiryo',
    roboto, 'Droid Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', meiryo, 'Noto Sans JP', sans-serif;
  --heading-font-family: 'Noto Sans JP', 'Noto Sans JP Fallback', 'Noto Sans JP Fallback Meiryo',
    roboto, 'Droid Sans', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', meiryo, 'Noto Sans JP', sans-serif;

  /* body sizes */
  --body-font-size-m: 16px;
  --body-font-size-s: 14px;
  --body-font-size-xs: 12px;

  /* heading sizes */
  --heading-font-size-xxl: 32px;
  --heading-font-size-xl: 28px;
  --heading-font-size-l: 24px;
  --heading-font-size-m: 20px;
  --heading-font-size-s: 18px;
  --heading-font-size-xs: 16px;

  /* layout */
  --sidebar-width: 180px;
  --nav-height-mobile: 44px;
  --nav-height: 50px;
  --content-max-width: 980px;
  --spacing-small: 24px;
  --spacing-medium: 48px;
  --spacing-large: 80px;
}

/* inline fallback — used before fonts.css loads (LCP) */
@font-face {
  font-family: 'Noto Sans JP Fallback';
  src: local('Hiragino Kaku Gothic ProN');
  size-adjust: 99%;
}

@font-face {
  font-family: 'Noto Sans JP Fallback Meiryo';
  src: local('Meiryo');
  size-adjust: 97%;
}

@media (width >=980px) {
  :root {
    --body-font-size-m: 16px;
    --body-font-size-s: 14px;
    --body-font-size-xs: 12px;
    --heading-font-size-xxl: 36px;
    --heading-font-size-xl: 32px;
    --heading-font-size-l: 28px;
    --heading-font-size-m: 22px;
    --heading-font-size-s: 20px;
    --heading-font-size-xs: 18px;
  }
}

body {
  display: none;
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-m);
  line-height: 1.6;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.appear {
  display: block;
}

/* Mobile: top header takes up space */
header {
  height: var(--nav-height-mobile);
}

/* Tablet: top header */
@media (width >=980px) {
  header {
    height: var(--nav-height);
  }
}

/* PC: sidebar header - no vertical space needed */
@media (width >=1200px) {
  header {
    height: 0;
  }
}

header .header,
footer .footer {
  visibility: hidden;
}

header .header[data-block-status="loaded"],
footer .footer[data-block-status="loaded"] {
  visibility: visible;
}

/* PC layout: content shifts right for sidebar */
@media (width >=1200px) {
  main {
    padding-left: var(--sidebar-width);
  }

  footer {
    padding-left: var(--sidebar-width);
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
  font-family: var(--heading-font-family);
  font-weight: 600;
  line-height: 1.25;
  scroll-margin: 40px;
}

h1 {
  font-size: var(--heading-font-size-xxl);
}

h2 {
  font-size: var(--heading-font-size-xl);
}

h3 {
  font-size: var(--heading-font-size-l);
}

h4 {
  font-size: var(--heading-font-size-m);
}

h5 {
  font-size: var(--heading-font-size-s);
}

h6 {
  font-size: var(--heading-font-size-xs);
}

p,
dl,
ol,
ul,
pre,
blockquote {
  margin-top: 0.8em;
  margin-bottom: 0.25em;
}

code,
pre {
  font-size: var(--body-font-size-s);
}

pre {
  padding: 16px;
  border-radius: 8px;
  background-color: var(--light-color);
  overflow-x: auto;
  white-space: pre;
}

main>div {
  margin: 40px 16px;
}

input,
textarea,
select,
button {
  font: inherit;
}

/* links */
a:any-link {
  color: var(--link-color);
  text-decoration: none;
  overflow-wrap: break-word;
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* buttons */
a.button:any-link,
button {
  box-sizing: border-box;
  display: inline-block;
  max-width: 100%;
  margin: 12px 0;
  border: 2px solid transparent;
  border-radius: 2.4em;
  padding: 0.5em 1.2em;
  font-family: var(--body-font-family);
  font-style: normal;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  background-color: var(--color-orange);
  color: var(--background-color);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.button:hover,
a.button:focus,
button:hover,
button:focus {
  background-color: var(--color-orange-hover);
  cursor: pointer;
}

button:disabled,
button:disabled:hover {
  background-color: var(--light-color);
  cursor: unset;
}

a.button.secondary,
button.secondary {
  background-color: unset;
  border: 2px solid currentcolor;
  color: var(--text-color);
}

main img {
  max-width: 100%;
  width: auto;
  height: auto;
}

.icon {
  display: inline-block;
  height: 24px;
  width: 24px;
}

.icon img {
  height: 100%;
  width: 100%;
}

/* visually hidden — accessible to screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* sections */
main>.section {
  margin: 40px 0;
}

main>.section>div {
  max-width: var(--content-max-width);
  margin: auto;
  padding: 0 3%;
}

main>.section:first-of-type {
  margin-top: 0;
}

@media (width >=980px) {
  main>.section>div {
    padding: 0 32px;
  }
}

/* section metadata */
main .section.light,
main .section.highlight {
  background-color: var(--light-color);
  margin: 0;
  padding: 40px 0;
}

main .section.gray-bg {
  background-color: #f7f7f7;
  margin: 0;
  padding: 40px 0;
}

/* Gray band limited to content column (same color as gray-bg); uses pseudo so multiple block rows stay one band */
main .section.gray-bg-content {
  position: relative;
  margin: 0;
  padding: 40px 0;
  background: transparent;
}

main .section.gray-bg-content::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, var(--content-max-width));
  top: 0;
  bottom: 0;
  background-color: #f5f5f7;
  z-index: 0;
  pointer-events: none;
}

main .section.gray-bg-content>div {
  position: relative;
  z-index: 1;
}

main .section.white-bg {
  background-color: var(--background-color);
  margin: 0;
  padding: 40px 0;
}

main .section.narrow>div {
  max-width: 720px;
}

main .section.full-width>div {
  max-width: unset;
  padding: 0;
}

main .section.gray-bg-content.full-width::before {
  left: 0;
  width: 100%;
  transform: none;
}

main>.section.spacing-large {
  margin-bottom: var(--spacing-large);
}

main>.section.spacing-medium {
  margin-bottom: var(--spacing-medium);
}

main>.section.spacing-small {
  margin-bottom: var(--spacing-small);
}

/* Disclaimer / 免責事項 — small muted body text */
main .section.disclaimer {
  font-size: var(--body-font-size-xs);
  color: #888;
}

main .section.disclaimer :is(h1, h2, h3, h4, h5, h6) {
  font-size: var(--body-font-size-xs);
  font-weight: normal;
  color: #888;
}

main .section.disclaimer a:any-link {
  color: #06a;
}

main .section.disclaimer a:any-link:hover {
  color: #048;
}

main .section.disclaimer a:any-link::after {
  content: '';
  display: inline-block;
  background-image: url('/icons/icon_sprite.png');
  background-position: -92.5px -83px;
  background-size: 121px 118px;
  height: 9px;
  width: 9px;
  margin-top: 4.5px;
  margin-left: 4px;
  margin-right: 2px;
  background-repeat: no-repeat;
}

/* Text Small — default (richtext) content at 12px */
main .section.text-small > .default-content-wrapper {
  font-size: var(--body-font-size-xs);
}

/* Plain text links: skip automatic link→button decoration (data-skip-button-decoration on section) */
main .section.no-button-links a.button:any-link {
  display: inline;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  font-weight: inherit;
  line-height: inherit;
  text-align: inherit;
  white-space: normal;
  background: none;
  color: var(--link-color);
  cursor: pointer;
  overflow: visible;
  text-overflow: clip;
}

main .section.no-button-links a.button:hover,
main .section.no-button-links a.button:focus {
  background: none;
  color: var(--link-hover-color);
  text-decoration: underline;
}

/* no-button-links: trailing link icons (decorateNoButtonLinkIcons in aem.js) */
main .section.no-button-links a.no-button-link-icon::after {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  margin-left: 0.28em;
}

/* Sprite: target="_blank" only (see getNoButtonLinkIconKind) */
main .section.no-button-links a.no-button-link-icon--external::after {
  width: 10px;
  height: 10px;
  border: 0;
  vertical-align: -0.14em;
  background: url('/icons/icon_sprite.png') -92.5px -83px / 121px 118px no-repeat;
  transform: none;
}

/* Right chevron: in-site, other in-site paths, external URL without target=_blank */
main .section.no-button-links a.no-button-link-icon--internal::after {
  width: 0.6em;
  height: 0.6em;
  box-sizing: border-box;
  border: 0;
  border-right: max(1px, 0.1em) solid currentcolor;
  border-top: max(1px, 0.1em) solid currentcolor;
  background: none;
  transform: rotate(45deg) translateY(-0.1em);
}

/* Same-document fragment (#…) */
main .section.no-button-links a.no-button-link-icon--anchor::after {
  width: 0.6em;
  height: 0.6em;
  box-sizing: border-box;
  border: 0;
  border-right: max(1px, 0.1em) solid currentcolor;
  border-top: max(1px, 0.1em) solid currentcolor;
  background: none;
  vertical-align: 0.25em;
  transform: rotate(135deg) translateY(-0.08em);
}

main .section.disclaimer>div {
  width: min(calc(100% - 40px), calc(var(--content-max-width) - 80px));
}

/* Trademark Tax — small body text in default text color */
main .section.trademark-tax {
  font-size: var(--body-font-size-xs);
  color: #333;
}

main .section.trademark-tax :is(h1, h2, h3, h4, h5, h6) {
  font-size: var(--body-font-size-xs);
  font-weight: normal;
  color: #333;
}

main .section.trademark-tax a:any-link {
  color: #06a;
}

main .section.trademark-tax a:any-link:hover {
  color: #048;
}

main .section.trademark-tax a:any-link::after {
  content: '';
  display: inline-block;
  background-image: url('/icons/icon_sprite.png');
  background-position: -92.5px -83px;
  background-size: 121px 118px;
  height: 9px;
  width: 9px;
  margin-top: 4.5px;
  margin-left: 4px;
  margin-right: 2px;
  background-repeat: no-repeat;
}

main .section.trademark-tax>div {
  width: min(calc(100% - 40px), calc(var(--content-max-width) - 80px));
}

/* Section-level text alignment for Text blocks */
main .section.text-center>.default-content-wrapper,
main .section.text-center>.button-wrapper {
  text-align: center;
}

main .section.text-right>.default-content-wrapper,
main .section.text-right>.button-wrapper {
  text-align: right;
}

/* Text block: em + strong together — no italic, red, keep bold */
main .section .default-content-wrapper em strong,
main .section .default-content-wrapper strong em {
  font-style: normal;
  font-weight: bold;
  color: var(--color-red-accent);
}

main>.section.breadcrumbs-container,
main>.section.local-navigation-container {
  margin: 0;
}

/* ----------------------------------------------------------------
   Title styles per pagetype (<meta name="pagetype" content="...">)
   - (empty)   : default — no extra class on <body>
   - "top"     : body.pagetype-top
   - "product" : body.pagetype-product
   ---------------------------------------------------------------- */

/* pagetype: top  — based on au.com #auserviceInner2024 h2 */
body.pagetype-top main h2 {
  font-size: 28px;
  font-weight: bold;
  text-align: left;
  padding-left: 10px;
  padding-top: 35px;
  padding-bottom: 15px;
  border-bottom: 1px solid #333;
  position: relative;
  margin-bottom: 20px;
}

/* pagetype: top — based on au.com #campaign h3 */
body.pagetype-top main h3 {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  padding-left: 10px;
  margin: 0 auto 20px;
}

@media (width >=980px) {
  body.pagetype-top main h2 {
    font-size: 32px;
    padding-left: 0;
    padding-top: 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #333;
    margin-bottom: 40px;
  }

  body.pagetype-top main h3 {
    font-size: 24px;
    padding-left: 0;
    margin-bottom: 30px;
  }

  body.pagetype-top main h4 {
    font-size: 24px;
    padding-left: 0;
    margin-bottom: 20px;
  }
}

/* pagetype: product — based on au.com /mobile/ h1 (.cmp-au-com-title__border__orange__h1) */
body.pagetype-product main h1 {
  font-size: 24px;
  font-weight: normal;
  line-height: 1.4;
  color: #333;
  border-left: 4px solid #eb5505;
  padding-left: 6px;
  margin: 0;
}

body.pagetype-product main h2 {
  font-size: 22px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  color: #333;
  margin: 0;
  margin-bottom: 30px;
}

body.pagetype-product main h3 {
  font-size: 20px;
  font-weight: normal;
  line-height: 1.4;
  color: #333;
  margin: 0;
  margin-bottom: 20px;
}

body.pagetype-product main h4 {
  font-size: 16px;
  font-weight: bold;
  line-height: 1.4;
  color: #333;
  margin: 0;
}

@media (width >=980px) {
  body.pagetype-product main h1 {
    font-size: 30px;
    padding-left: 11px;
  }

  body.pagetype-product main h2 {
    font-size: 22px;
    margin-bottom: 50px;
  }

  body.pagetype-product main h3 {
    font-size: 20px;
    margin-bottom: 30px;
  }
}