/* 全体の文字サイズ（16px → 18px 相当） */
html {
  font-size: 112.5%;
}

body,
body.sb-nav-fixed {
  font-size: 1rem;
  line-height: 1.6;
}

.sb-sidenav-menu .nav-link,
.sb-topnav .navbar-brand,
.sb-topnav .navbar-text {
  font-size: 1rem;
}

.form-label,
label {
  font-size: 1rem;
}

.form-control,
.form-select,
.dataTable-input,
.dataTable-selector,
.btn {
  font-size: 1rem;
}

.dataTable-table th,
.dataTable-table td,
#master-item th,
#master-item td,
.shop-setting th,
.shop-setting td {
  font-size: 1rem;
}

.accordion-button {
  font-size: 1rem;
}

.container-fluid > .d-flex > .h2,
.container-fluid > h1.h2,
.container-fluid > .h2 {
  font-size: 1.75rem;
}

/* 設定画面の補足テキスト（従来 10〜14px 固定） */
p[style*="font-size: 14px"],
span[style*="font-size: 12px"],
span[style*="font-size: 10px"],
.download-detail[style*="font-size: 14px"] {
  font-size: 1rem !important;
}

.sb-sidenav-footer .small {
  font-size: 0.875rem;
}

.edited {
  border-color: red !important;
}

.edit-target:focus {
  color: #212529;
  background-color: yellow;
  border-color: transparent;
  outline: 0;
  box-shadow: none;
}

.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  background-color: rgba(30, 30, 30, 0.8);
}

.loading div {
  color: white;
}

#master-item th, #add-master-table th {
  text-align: center;
  color: #fff;
  background: #8E8CB9 !important;
}

#master-item td, #add-master-table td {
  text-align: left !important;
}

#issue-history .dataTable-wrapper {
  width: 100%;
}

#issue-history .dataTable-top,
#issue-history .dataTable-bottom {
  padding: 0.5rem 0;
}

#issue-history .dataTable-input,
#issue-history .dataTable-selector {
  min-width: 8rem;
}

#master-item .fixed {
  position: sticky;
  left: 0;
  color: #fff;
  background: #2d8efd;
}

#master-item .fixed:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-right: 1px solid #fff;
}

.box-layout {
  padding: 20px;
  border: 1px solid #aaa;
  border-radius: 10px;
  margin-bottom: 20px;
}

.setting-list {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.form-check {
  /* border-bottom: 1px dashed #bbb; */
  margin: 8px 20px 8px 0;
}

.form-check .form-check-label, .form-check input {
  cursor: pointer !important;
}

.top-functions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.top-functions > * {
  margin-right: 20px;
}

.accordion-button {
  height: 38px;
}

.accordion-body {
  width: auto;
  /* border: 1px solid; */
  margin-bottom: 24px;
  overflow-x: scroll;
}

input.has-error {
  background-color: darkred;
}

.count-suffix::after {
  content: '回';
  margin-left: -70px;
  color: gray;
}

.days-suffix::after {
  content: '日';
  margin-left: -60px;
  color: gray;
}

.chara-suffix::after {
  content: '文字';
  margin-left: -80px;
  color: gray;
}

label:not(.form-check-label) {
  font-weight: bold;
}

.submit-button {
  min-width: 160px;
}

.shop-setting-wrap {
  overflow-x: auto;
}

.shop-setting {
  min-width: 800px;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
}

.shop-setting tr {
  padding: .35em;
  border-bottom: 2px solid #fff;
}

.shop-setting tbody tr:nth-child(odd) {
  background-color: #F9F8FF;
}

.shop-setting th,
.shop-setting td {
  padding: 1em 10px 1em 1em;
  border-right: 2px solid #fff;
}

/*.shop-setting th {*/
/*  font-size: .85em;*/
/*}*/
/*.shop-setting thead tr{*/
/*  background-color: #8E8CB9;*/
/*  color:#fff;*/
/*}*/
.fixed01 {
  position: sticky;
  top: 0;
  background-color: #8E8CB9;
  color: #fff;
  font-size: 1rem;
}

.fixed01:before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  width: 100%;
  height: 100%;
}

/*.shop-setting, .shop-setting td, .shop-setting th {*/
/*  border: 2px solid #ddd;*/
/*  border-collapse: collapse;*/
/*}*/

/*.shop-setting td {*/
/*  padding: 5px;*/
/*}*/

/*.shop-setting textarea {*/
/*  border: 2px solid #ddd;*/
/*}*/

.template-setting {
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
}

.template-setting > .template {
  min-width: 600px;
  height: 800px;
}

/* .template > .select-shop { }  Intentionally left blank (removed to avoid empty rule warning) */

.template-setting > .preview {
  min-width: 800px;
  height: 1130px;
  margin-left: 20px;
  overflow: hidden;
}

.pdf-container {
  height: 800px;
}

.template > .sample-list {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 20px;
}

.sample-list > .sample-outer {
  width: 175px;
  height: 230px;
  background-color: #ddd;
  text-align: center;
  padding-top: 10px;
  margin: 10px;
  border: solid 4px transparent;
}

.sample-outer > .sample {
  width: 150px;
  filter: drop-shadow(0 0 4px gray);
}

.sample-outer > .sample-title {
  position: relative;
  width: 100%;
  bottom: 25px;
  background-color: rgba(30, 30, 30, 0.8);
  color: white;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 0 6px 0;
}

.has-focus {
  border: solid 4px #0d6efd !important;
}

.sb-nav-link-icon {
  width: 20px;
  text-align: center;
}

.label {
  display: inline;
  padding: .2em .6em .3em;
  font-size: 0.875rem;
  font-weight: bold;
  line-height: 1;
  color: #d9534f;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25em;
  border: 1px solid #d9534f;
}

.label-danger {
  background-color: #d9534f;
  color: #ffffff;
}

.arrow {
  position: relative;
  display: inline-block;
  padding: 0 0 0 16px;
  color: #000;
  vertical-align: middle;
  text-decoration: none;
  font-size: 20px;
}

.arrow:before,
.arrow:after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  margin: auto;
  content: "";
  vertical-align: middle;
}

.arrow-rectangle:before {
  width: 30px;
  height: 30px;
  -webkit-border-radius: 25%;
  border-radius: 25%;
  background: dodgerblue;
}

.arrow-rectangle:after {
  left: 9px;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 8px solid transparent;
  border-left: 14px solid #fff;
}

.arrow-rectangle:active:before {
  background: darkblue;
}

.arrow-left {
  transform: rotate(180deg);
}

.arrow-top {
  transform: rotate(-90deg);
}

.arrow-bottom {
  transform: rotate(90deg);
}

.information {
  margin-top: 10px;
  font-size: 0.875rem;
}

.group-layout {
  background-color: #F9F8FF;
  border-radius: 5px;
  padding-bottom: 10px;
  padding-left: 10px;
}

.hide-scrollbar {
  /* for Microsoft Edge */
  -ms-overflow-style: none;
  /* for Firefox */
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  /* for Chrome and Safari */
  /* display: none; */
}

.notify-bar {
  width: 380px;
  height: 70px;
  right: 20px;
  top: 20px;
  position: absolute;
  padding: 10px;
  margin-bottom: 0;
  animation: SlideIn ease-in-out 7s;
  opacity: 0;
}

@media screen and (max-width: 400px) {
  .notify-bar {
    width: calc(100vw - 20px);
    right: 10px;
  }
}

/* Hover effect for image download links */
.dl_link {
  display: block;
  background-color: transparent;
  transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
}
.dl_link:hover,
.dl_link:focus-visible {
  background-color: rgba(200, 200, 200, 0.1);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.08);
}

/* Ensure image-link containers can hold absolute overlay anchors */
.receipt-link,
.detail-link,
.invoice-link,
.detail-and-receipt-link {
  position: relative;
}

/* Ensure overlay anchor is above the image */
.dl_link {
  z-index: 2;
}

/* Dim the image itself on hover for clearer feedback */
.receipt-link:hover img,
.detail-link:hover img,
.invoice-link:hover img,
.detail-and-receipt-link:hover img {
  filter: brightness(0.95);
  transition: filter 0.15s ease-in-out;
}
@keyframes SlideIn {
  0% {
    opacity: 0;
    transform: translateX(150px);
  }
  20% {
    opacity: 1;
    transform: translateX(0);
  }
  80% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(150px);
  }
}
.notify-bar p {
  margin-bottom: 0;
}

/* Slightly raise vertically centered Bootstrap modals */
.modal-dialog-above-center.modal-dialog-centered {
  margin-top: -20vh; /* move a bit above center */
}

.modal-backdrop {
  z-index: 10050 !important;
}

#modal {
  z-index: 10055 !important;
}

@media (max-height: 500px) {
  .modal-dialog-above-center.modal-dialog-centered {
    margin-top: -10vh; /* reduce shift on very short viewports */
  }
}
