/* 共通 */
body, html {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans JP", sans-serif;
  background-color: #fff;
  /* background-color: #fbfcfe; */
  /* background-color: #fefefe; */
  color: #333;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.page-content {
  flex: 1;
  padding: 24px;
  padding-bottom: 120px;
}

.title {
  margin: 16px 0 8px;
  font-size: 22px;
}
.description {
  font-size: 14px;
  color: #666;
  margin: 15px 0px 20px 0px;
}

.page-footer {
  flex: 1;
  padding: 24px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  /* padding: 0 16px; */
}

/* メインボタン */
.primary-button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  margin-bottom: 25px;
}
.secondary-button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  background-color: #7d7d7d;
  color: white;
  border: none;
  border-radius: 8px;
  margin-bottom: 25px;
}
.primary-button:active {
  background-color: #0056b3;
}
.secondary-button:active {
  background-color: #5f5f5f;
}
/* .primary-button:active, .secondary-button:active {
  background-color: #eaff00;
  color: black;
} */
.pager {
  display: flex;
  gap: 10px;
}

/* リンク*/
.link-button {
  font-size: 14px;
  color: #007bff;
  /* text-decoration: underline; */
}


/* 入力フォーム */
.form-group {
  display: block;
  width: 100%;
  margin: 15px 0;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: .9em;
}

.form-label,
.textbox-1 {
    color: #333;
}


.textbox-1 {
    width: 100%;
    padding: 8px 10px;
    /* border: 1px solid #969da3; */
    /* border: 1px solid #e3e8f0; */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    line-height: 1.5;
    box-sizing: border-box; 
}
.textbox-1::placeholder {
    color: #999;
}

.selectbox-1 {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: 100%;
}
.selectbox-1::after {
    position: absolute;
    right: 15px;
    width: 10px;
    height: 7px;
    background-color: #535353;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    content: '';
    pointer-events: none;
}
.selectbox-1 select {
    appearance: none;
    min-width: 230px;
    width: 100%;
    height: 2.8em;
    padding: .4em calc(.8em + 30px) .4em .8em;
    /* border: 1px solid #969da3; */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    color: #333333;
    font-size: 1em;
    cursor: pointer;
}

/* ログイン画面 */
.login-container {
  width: 100%;
  text-align: center;
}
.login-title {
  font-size: 26px;
  margin-bottom: 8px;
}

/* トップ画面 */
.intro-hero {
  height: 60dvh;
  background-color: #ebeefc;
  display: flex;
  align-items: center;
  justify-content: center;
  /* color: white; */
  font-size: 18px;
}
.intro-hero img {
  max-width: 90%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.intro-content {
  flex: 1;
  padding: 24px;
  padding-bottom: 120px;
  text-align: center;
}

.intro-title {
  margin: 16px 0 8px;
  font-size: 22px;
}

.intro-description {
  font-size: 14px;
  color: #666;
  margin: 15px 10px 40px 10px;
}


/* QR読み取り画面 */
.qr-reader {
  height: 100dvh;
}
#reader video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}


/* 免許証選択画面 */
.radio-area {
  margin-bottom: 50px;
}
.radio-3 {
    border: none;
    padding: 0;
    margin: 0;
}

.radio-3 label {
    display: flex;
    align-items: center;
    gap: 0 .5em;
    position: relative;
    margin-bottom: .4em;
    padding: .5em .7em;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    background-color: #ecf1fe26;
    cursor: pointer;
}

.radio-3 label:has(:checked) {
    background-color: #ebeefc;
    color: #333;
    border: 1px solid #ebeefc;
}

.radio-3 label:has(:checked)::after {
    border-radius: 50%;
    content: '';
    border: 1px solid #e0e0e0;
}

.radio-3 label::before {
    border-radius: 50%;
    content: '';
    border: 1px solid #e0e0e0;
}

.radio-3 label::before {
    width: 14px;
    height: 14px;
    background-color: #fff;
}

.radio-3 label:has(:checked)::after {
    position: absolute;
    top: 50%;
    left: calc(8px + .7em);
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background-color: #007bff;
}

.radio-3 input {
    display: none;
}

.radio-sub-text {
  font-size: 14px;
  color: #007bff;
}

.notice-area {
    padding: 15px;
    border-radius: 15px;
    background-color: #ebeefc;
}
.list-1-label {
  font-size: .9em;
  font-weight: bold;
}
.list-1 {
  list-style-type: disc;
  padding: 5px 10px 10px 25px;
  margin: 0;
}
.list-1 li {
    padding: .3em .3em .3em 0;
    font-size: 14px;
}

.list-1 li::marker {
    color: #007bff;
    font-size: 1.1em;
}


/* 撮影画面 */
/* カメラ領域 */
.camera-wrapper {
  position: relative;
  width: 100%;
  height: 100dvh;
  background: black;
  overflow: hidden;
}

/* カメラ映像 */
#camera {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 免許証カード枠 */
/* .card-frame {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 3px solid #007bff;
  border-radius: 12px;
  box-shadow: 0 0 0 2000px rgba(0,0,0,0.5);
  pointer-events: none;
}
.card-guide {
  position: absolute;
  transform: translate(-50%, -50%);
  opacity: 0.35;
  pointer-events: none;
} */
.card-area{
  position:absolute;
  top:45%;
  left:50%;

  width:90%;
  aspect-ratio:1/1.6;

  transform:translate(-50%,-50%);
}
.card-guide{
  position:absolute;
  inset:0;

  width:100%;
  height:100%;

  /* object-fit:cover; */
  opacity:0.95;
}
.card-frame{
  position:absolute;
  inset:0;

  border:3px solid #007bff;
  border-radius:12px;
  box-shadow:0 0 0 2000px rgba(0,0,0,0.5);
  opacity:0.0;
}


/* 横画面 */
@media (orientation: landscape) {
  /* .card-frame,.card-guide {
    top: 50%;
    left: 45%;
    height: 90%;
    aspect-ratio: 1.6 / 1;
  } */
  .card-area{
    top:50%;
    left:45%;
    height:90%;
    width:auto;
    aspect-ratio:1.6/1;
  }
  .guide-landscape{
    display:block;
  }
  .guide-portrait{
    display:none;
  }
  .camera-page-footer {
    padding: 0 24px;
    position: fixed;
    height: 100%;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

}
/* 縦画面 */
@media (orientation: portrait) {
  /* .card-frame{
    top: 45%;
    left: 50%;
    width: 90%;
    aspect-ratio: 1 / 1.6;
  }
  .card-guide{
    top: 45%;
    left: 50%;
    height: 90%;
    aspect-ratio: 1.6 / 1;
    transform: translate(-50%, -50%) rotate(90deg);
  } */
  .guide-landscape{
    display:none;
  }
  .guide-portrait{
    display:block;
  }


  .camera-page-footer {
    padding: 24px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
/* 撮影ボタン */
.camera-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid white;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  /* cursor: pointer; */
  padding: 0;
}
.camera-btn span {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  transition: transform 0.1s;
}
/* 押した時 */
.camera-btn:active span {
  transform: scale(0.9);
}


/* ポップアップ */
.popup-background{
    position: fixed;
    z-index : 500;
    top : 0;
    left : 0;
    height : 100dvh;
    width : 100vw;
    justify-content: center;
    align-items: center;
    background-color: gray;
    opacity : 0.5
}
.popup{
    position: fixed;
    z-index: 1000;
    /* height: 85%; */
    /* height: fit-content;
    min-height: 350px;
    width: 90%; */
    max-width: 500px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow: auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0px 0px 3px 1px gray;
}
.popup > .close-button{
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color : gray;
    padding: 10px;
    font-size: 1.5em;
    z-index: 2000;
    cursor: pointer;
}
.popup > .content{
    padding: 35px 10px 10px 10px;
    height: calc(100% - 45px);
    min-height: 350px;
    text-align: center;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
/* 横画面 */
@media (orientation: landscape) {
  .popup {
    width: fit-content;
    min-width: 350px;
    height: 90%;
  }
}
/* 縦画面 */
@media (orientation: portrait) {
  .popup {
    height: fit-content;
    min-height: 350px;
    width: 90%;
  }  
  .popup > .content {
    min-height: 350px;
  }
}

/*hide popup*/
.popup-flag{
    display:none;
}
.popup-flag:not(:checked) + .popup-background{
    display:none;
}
.popup-flag:not(:checked) + * + .popup{
    display:none;
}
.camera_popup_flag{
    /* display:none; */
    position: absolute;
    left: -9999px;
}
.camera_popup_flag:not(:checked) ~ .popup-background{
    display:none;
}
.camera_popup_flag:not(:checked) ~ .popup{
    display:none;
}

.preview-img {
  width: 100%;
  height: auto;
  min-height: 150px;
  background: black;
}


/* ローディング画面 */
.loading {
  text-align: center;
}
.loading-message {
  text-align: center;
  margin: 20px 0;
}



/* 結果表示 */
.result-form-group {
  border-bottom: 1px solid #e6e5e6;
}
.result-image {
  width: 100%;
  height: auto;
  min-height: 200px;
  object-fit: contain;
  display: block;
  background-color: black;
  margin-bottom: 10px;
}
.result-input {
  border: none;
  background: transparent;
  outline: none; 
  pointer-events: none; 
  width: 100%;
  font-size: 16px;
}

.checkbox-3 {
    border: none;
    pointer-events: none;
    width: fit-content;
    padding: 5px; 
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}
.checkbox-3 label {
    display: flex;
    align-items: center;
    gap: 0 .5em;
    position: relative;
    max-width: 80px;
    margin-bottom: 3px;
    padding: 5px;
    border: 1px solid #e6e5e6;
    border-radius: 3px;
    cursor: pointer;
    background-color: #e6e5e6;
}
.checkbox-3 label:has(:checked) {
    border: 1px solid #ebeefc;
    background-color: #ebeefc;
    color: #333;
    font-size: 16px;
}
.checkbox-3 label::before {
    width: 14px;
    height: 14px;
    border-radius: 1px;
    background-color: #fff;
    border: 1px solid #e6e5e6;
    content: '';
}
.checkbox-3 label:has(:checked)::after {
    position: absolute;
    top: 11px;
    left: 10px;
    transform: rotate(45deg);
    width: 4px;
    height: 8px;
    border: solid #007bff;
    border-width: 0 2px 2px 0;
    content: '';
}
.checkbox-3 input {
    display: none;
}