
/* 見出し */
.content h1{
  padding: 0.2em;
  text-align: center;
  width:85%;
  max-width: 350px;
  color: var(--primary-color);
  border-bottom: solid 2px var(--primary-color);
  margin: 0.4em auto 0.8em auto;
  font-size: 1.4em;
}
.content h2{
  padding: 0.8em;
  background-color: #f8f8ff;
  color: var(--primary-color);
  border-left: solid 5px var(--primary-color);
  font-size: 1.2em;
}
.content h3 {
  width: 50%;
  min-width: 200px;
  font-size: 1em;
	padding: 0.5em 0.5em 0.5em 2.5em;
  border-bottom: #1e78e6 1px solid;
  color:#003b83;
	position: relative;
}
.content h3:before {
  position: absolute;
  top: 20%;
  left: 20px;
  width: 6px;
  height: 60%;
  content: '';
  border-radius: 3px;
  background: #1e78e6;
}
.content p {
	padding: 0.5em 2em;
}

/* 入力フォーム */
textarea{
  width:100%;
  box-sizing: border-box;
  font-size: 1rem;
}
input{
  display: inline-block;
  font-size: 1rem;
}
input[type="radio"]{
  margin-left: 0.4em;
  cursor: pointer;
}

input[type="checkbox"]{
  margin-left: 0.4em;
}
input[type="file"]{
  cursor: pointer;
}
select{
  font-size: 1rem;
}
label {
  cursor: pointer;
  white-space: nowrap;
}
/*画像 */
.content img{
  border: 1px solid #d5d5d5;
}
table img {
  max-width: 200px;
  max-height: 200px;
  margin: 0.3em;
  box-sizing: border-box;
}

/* flex */
.flex {
  display: flex;
  flex-wrap: wrap;
}
.column {
  width: 100%;
  padding: 0.5em;
}
@media (min-width: 900px) {
  .column {
    width: 48%;
  }
}

/* カード*/
.card{
  box-sizing: border-box;
  padding: 0.7em;
  margin: 0.8em auto;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #333;
}
.card-shadow{
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

/* ボタン*/
button{
  cursor: pointer;
  transition: 0.3s;
}
button:hover {
  opacity: 0.5;
}

.btn{
  display: inline-block;
  border-radius: 3px;
  text-decoration: none;  
  border:0px;
  margin: 0.5em;
  padding: 0.4em;
  min-width:250px;
  font-size: 1em;
}
.btn-small{
  height:2em;
  line-height: 2em;
  margin: 0 0.3em;
  padding:0 0.8em;
  font-size: 0.8em;
  min-width:auto;
  display: inline-block;
  vertical-align: middle;
}

.btn-primary{
  background: linear-gradient(to top, var(--primary-color), #3366bb);
  color: #fff;
}
.btn-blue{
  background: linear-gradient(to top, #3366bb, #577be9);
  color: #fff;
}
.btn-yellow{
  background: linear-gradient(to top, #d4a017, #f0c14b);
  color: #333;
}
.btn-red{
  background: linear-gradient(to top, #f53e07,#ed7f6e );
  color: #fff;
}
.btn-white{
  background: #fff;
  color:var(--primary-color);
  border:1px solid var(--primary-color);
}
.btn-gray{
  background: linear-gradient(to top, #ddd,#eee);
  color:#555;
  border:1px solid #ddd;
}
.btn-green{
  background: linear-gradient(to top, #027926,#08a638 );
  color: #fff;
}

/* テーブル */
table{
  width:100%;
  box-sizing: border-box;
  border-collapse: collapse;
  margin: 0.5em auto;
}
th {
  background-color: #f5f5f5;
  color: #333;
  padding: 0.5em;
  border: 1px solid #ccc;
  font-weight: normal;
  text-align: left;
}
thead th{
  text-align: center;
}
tbody th{
  width: 30%;
}
td {
  background-color: #fff;
  border: 1px solid #ccc;
  padding: 0.5em;
}

/* テーブルレスポンシブ */
/* ２カラムを１カラムに */
@media screen and (max-width: 640px) {
  .table-vertical-responsive table tr {
    width: 100%;
    box-sizing: border-box;
  }
  .table-vertical-responsive table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .table-vertical-responsive table th {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
  .table-vertical-responsive td:first-child {
    background: #eee;
    padding-left: 0.5em;
  }
}

/* 多カラムを１カラムに */
@media screen and (max-width: 640px) {
  .table-horizontal-responsive table thead {
  display: none;
  }
  .table-horizontal-responsive table tr {
  width: 100%;
  box-sizing: border-box;
  }
  .table-horizontal-responsive table td {
  display: block;
  text-align: left !important;
  padding-left: 1em;
  width: 100%;
  box-sizing: border-box;
  }
  .table-horizontal-responsive table td:first-child {
  background: #eee;
  padding-left: 1em;
  }
  .table-horizontal-responsive table td:before {
  content: attr(data-label)"：" ;
  display: inline;
  font-weight: bold;
  margin-right: 0.5em;
  }
}

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 1em;
  margin-bottom: 1em;
}
.pagination__link {
  color: #333;
  padding: 0.4em 0.8em;
  text-decoration: none;
  border: 1px solid #ddd;
  background-color: #fff;
  margin: 0 0.4em;
  border-radius: 3px;
}
@media screen and (max-width: 500px) {
  .pagination__link {
    padding: 0.4em;
    margin: 0 0.2em;
  }
} 
.pagination__link:hover {
  background-color: #ddd;
}
.pagination__link--current {
  pointer-events: none;
  background-color: #225da5;
  color: white;
  border: 1px solid #225da5;
}
.pagination__link--disabled {
  pointer-events: none;
  background-color: #eee;
  color: #888;
}

/*バッジ*/
.badge{
  display: inline-block;
  font-size: 0.7em;
  padding: 0.25em 0.5em;
  margin: 0 0.5em;
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateY(-0.1em);
}
.badge-red{
  background-color: #ff0000;
  color: #ffffff;
}
.badge-gray{
  background-color: #9594a9;
  color: #ffffff;
}
.badge-green{
  background-color: #10b62f;
  color: #ffffff;
}

/* メッセージ未読数 */
.unread-count{
  padding:0 0.3em;
  background-color: #ff0000;
  color: #ffffff;
  font-size: 0.8em;
  border-radius: 0.6em;
  vertical-align: middle;
}

/* 評価レビュー星 */
.review-stars{
  position: relative;
  display: inline-flex;
  vertical-align:middle;
  height:2em;
  width:5em;
}
.gold-stars{
  position: absolute;
  height:2em;
  left:0;
  color: #ffb906;
  display: inline-block;
  overflow: hidden;
  width: calc(var(--score)*1em);
}
.gray-stars{
  position: absolute;
  height:2em;
  right:0;
  color: #c4c4c4;
  display: inline-block;
  overflow: hidden;
  width: calc(5em - var(--score)*1em);
  direction: rtl;
}

/* 検索条件 */
.filtering{
  margin:0;
  padding:2em 1em;
  background-color: #f7f7f7;
  border-radius: 5px;
}
.filtering input#price-max {
  width:3em;
}
.filtering input#price-min {
  width:3em;
}
.filtering-column {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5em;
}
@media (min-width: 900px) {
  .filtering-column {
    width: 50%;
  }
}

/* アイコン */
.icon{
  max-width: 1.9em;
  max-height: 1.9em;
  margin: 0.2em 0.3em;
  border: 0!important;
  box-sizing: border-box;
  vertical-align: middle;
}

/* ヘルプ（?ボタンで説明表示） */
.help {
  position: relative;
  display: inline-block;
  margin-left: 0.25em;
}
.help__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2em;
  height: 1.2em;
  padding: 0;
  font-size: 0.85em;
  line-height: 1;
  color: #666;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 50%;
  cursor: pointer;
}
.help__trigger:hover {
  color: #333;
  background: #ddd;
}
.help__content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.25em;
  padding: 0.5em 0.75em;
  min-width: 200px;
  max-width: 280px;
  font-size: 0.9em;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
}
.help__content--open {
  display: block;
}

/*警告表示*/
.alert {
  position: relative;
  padding: 1em;
  margin: 0.5em 0;
  border: 1px solid transparent;
  border-radius: 0.2em;
}
.alert-warning {
  color: #664d03; 
  background-color: #fff3cd;
  border-color: #ffecb5;
}
.alert-danger {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
}
.alert-success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
}
.alert-info {
  color: #055160;
  background-color: #cff4fc;
  border-color: #b6effb;
}

/* 文字数表示（汎用） */
/* .char-count {
  margin-top: 0.25em;
  font-size: 0.9em;
  color: #6c757d;
} */

/* スピナー（ローディング表示・汎用） */
.spinner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.spinner-overlay[hidden] {
  display: none !important;
}
.spinner-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
}
.spinner-overlay__content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.spinner-overlay__message {
  margin: 0;
  font-size: 0.95rem;
  color: #333;
  max-width: 280px;
  text-align: center;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: var(--primary-color, #1e78e6);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}
