@import "modal.css";
@import "btn.css";

@font-face {
  font-family: "Noto Sans TC";
  src: url("../fonts/NotoSansTC-VariableFont_wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

.capsule {
  background-color: rgb(201, 203, 207);
  border-radius: 50px;
  color: rgb(255, 255, 255);
  padding: 3px 10px;
}
html,
body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

/* .color-body {
  background-color: var(--bs-gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: "Noto Sans TC", system-ui, sans-serif;
} */

/* .color-body {
  background-color: var(--bs-gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto; 
  height: 100vh; 
  font-family: "Noto Sans TC", system-ui, sans-serif;
} */

.color-body {
  height: calc(100vh - 62px); /* 扣掉 nav 高度，假設 nav 高 80px */
  margin-top: 62px; /* 整個容器往下推，讓出 nav 的空間 */
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bs-gray-100);
  display: flex;
  flex-direction: column;
  font-family: "Noto Sans TC", system-ui, sans-serif;
}

body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}
body.modal-open nav {
  padding-right: inherit !important;
}

body.modal-open .main-content {
  padding-right: 15px;
}

.main-content {
  flex: 1;
}
.bg-admin {
  background-color: slateblue;
}
.card-img-wrapper {
  /* border-radius: 0.375rem 0px 0px 0.375rem; */
  position: relative;
  flex: 0 0 auto;
  width: 250px;
  height: 200px;
}
.card-img-left {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.badge {
  font-size: 0.875rem;
  padding: 6px 10px;
  border-radius: 6px;
  color: black;
  font-weight: normal;
  border-width: 1px;
  border-style: solid;
}
.card-img-wrapper .badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  font-weight: 500;
  border-width: 1px;
  border-style: solid;
}

/* .navbar > .container-fluid {
  flex-wrap: nowrap;
} */

tr {
  height: 50px;
}
td {
  vertical-align: middle;
}
th {
  vertical-align: middle;
}

/* .table {
  --bs-table-hover-bg: seashell;
} */

.card {
  border-width: 1px;
  /* border: 1px solid rgba(0, 0, 0, 0.175); */
  border-radius: 12px;
  overflow: hidden;
  position: relative; /* ::before 的 absolute 要以卡片為基準 */
  cursor: pointer;
}
.card-animation {
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.card-animation:hover {
  box-shadow:
    rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,
    rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
  /* transform: translateY(-3px); */
}
.card-gradient::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.3) 5%,
    rgba(0, 0, 0, 0) 20%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card-img-mask {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* .card-gradient:hover::before {
  opacity: 1;
} */

/* 滑到整張卡片時,圖片出現遮罩 */
.card-gradient:hover .card-img-mask {
  opacity: 1;
}

.card:hover .btn-float-show {
  display: block;
}

.card-select {
  border: 1px solid blueviolet;
  box-shadow: 0 0 0 3.5px rgba(95, 75, 228, 0.2);
}

.btn-float {
  /* position: absolute; */
  z-index: 99;
  display: none;
  --bs-btn-bg: #fff;
  padding: 10px 30px;
  font-weight: 500;
  border-radius: 999px;
}

.card .card-title {
  font-weight: bold;
  margin-bottom: 0px;
}

.card-select-animation:hover {
  cursor: pointer;
  box-shadow: 0 0 0 5px rgba(95, 75, 228, 0.2);
}

.item-row {
  cursor: pointer;
}

.col.d-flex.flex-column {
  min-width: 0 !important;
}
.card-body {
  min-width: 0 !important;
  padding: 15px 15px 15px 15px;
}
.card-footer {
  padding: 7px 12px 9px 12px;
}

.btn-round {
  border-radius: 50%;
  width: 50px;
  height: 50px;
}

.btn-icon {
  border: none;
}

.btn-icon:focus {
  outline: none;
  border: none;
  box-shadow: 0 0 0 3.5px rgba(10, 110, 253, 0.2);
}

.btn-icon:active {
  outline: none;
  border: none;
  box-shadow: 0 0 0 3.5px rgba(10, 110, 253, 0.2);
}

.btn-float-top {
  top: 40px;
  right: 40px;
}

.btn-float-bottom {
  bottom: 40px;
  right: 40px;
}

.navbar-brand {
  font-size: large;
}

.navbar-footer {
  font-size: medium;
}

.select-mode-mask {
  position: absolute;
  z-index: 2;
  display: block;
  background-color: rgba(255, 243, 228, 0.8);
  border: 3px dashed rgb(255, 154, 30);
  inset: -10px;
  z-index: 10;
}

.lost-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.5rem;
  row-gap: 0.25rem;
  margin-bottom: 0;
}
.lost-meta dt {
  font-weight: normal;
}
.lost-meta dd {
  margin: 0;
}

.toast {
  --bs-toast-max-width: 450px;
  --bs-toast-font-size: 1rem;
  --bs-toast-box-shadow: 0 0.5rem 1rem rgba(105, 90, 205, 0.25);
  --bs-toast-border-color: slateblue;
  --bs-toast-header-border-color: slateblue;
  --bs-toast-header-color: slateblue;
  --bs-toast-bg: rgba(var(--bs-body-bg-rgb), 1);
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  max-width: 90%;
}

@media (max-width: 1100px) and (min-width: 992px) {
  /* .card-img-wrapper {
    width: 215px;
    height: 215px;
  } */
  .card-body {
    padding: 15px;
  }
}

@media (max-width: 504px) {
  .card-img-wrapper {
    width: 150px;
    height: 150px;
  }
  .card-body {
    padding: 10px;
    font-size: small;
  }
  .card-body h5 {
    font-size: medium;
  }

  .btn-round {
    border-radius: 50%;
    width: 40px;
    height: 40px;
  }

  .btn-float-top {
    top: 25px;
    right: 25px;
  }

  .btn-float-bottom {
    bottom: 25px;
    right: 25px;
  }

  .navbar-footer {
    font-size: small;
  }

  .badge {
    font-size: small;
    padding: 4px 8px;
  }
  .btn-float {
    padding: 8px 15px;
    font-weight: normal;
  }
  .campus-truncate {
    display: none;
  }
}

@media (max-width: 375px) {
  .navbar-ssm-brand {
    font-size: medium;
  }
  .navbar-ssm-brand img {
    height: 23px !important;
  }
  .navbar-ssm-toggler {
    font-size: medium;
    padding: 4px;
  }
}

.select-mode-container {
  user-select: none;
  -webkit-user-select: none;
}

/* .lost-card { overflow: hidden; }
.lost-card-img {
    position: relative;
    flex: 0 0 180px;
    width: 180px;
    aspect-ratio: 1 / 1;
    background: #e9edf2;
}
.lost-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lost-card-img .badge { position: absolute; left: 10px; top: 10px; }
.lost-card .card-body { flex: 1 1 auto; min-width: 0; }

@media (max-width: 575.98px) {
    .lost-card-img { flex-basis: 120px; width: 120px; }
} */

/* .btn {
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
} */

.lost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr));
  justify-content: center; /* 剩餘空間平均留在左右兩側 */
  gap: 1.5rem;
}
.lost-grid > .lost-item {
  container-type: inline-size;
  width: 100%;
  max-width: 670px;
  justify-self: center;
}

/* 依「卡片本身」的寬度縮小圖片,不是依螢幕寬度 */
@container (max-width: 500px) {
  @media (min-width: 505px) {
    .card-img-wrapper {
      width: 215px;
      height: 215px;
    }
  }
}

.lf-search {
  --lf-ink: #1f2937;
  --lf-label: #3f4a5a;
  --lf-line: #c9d0da;
  --lf-primary: #0f6e8c;
}

/* 標籤 */
.lf-search label {
  margin-bottom: 3px;
  margin-left: 3px;
  color: var(--lf-label);
}

/* 輸入框與下拉選單共用 */
.lf-search .form-control,
.lf-search .form-select {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 14px;
  color: var(--lf-ink);
  background-color: #fff;
  border: 1px solid var(--lf-line);
  border-radius: 10px;
  box-shadow: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.lf-search .form-control::placeholder {
  color: #7a8493;
}

/* 下拉箭頭：換成較淡的灰色，並留出右側空間 */
.lf-search .form-select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235B6472' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-size: 16px 12px;
  background-position: right 12px center;
}

/* 游標移入與聚焦 */
.lf-search .form-control:hover,
.lf-search .form-select:hover {
  border-color: #a9b3c1;
}
.lf-search .form-control:focus,
.lf-search .form-select:focus {
  border-color: var(--lf-primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 110, 140, 0.18);
}

/* 日期欄位之間的「至」 */
.lf-search .lf-date-sep {
  font-size: 14px;
  color: #5b6472;
}
