html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* 手機版底部導覽列的間距由 _Layout.cshtml 的 body padding-bottom 統一控制,此處不再重複設定 margin-bottom,避免與其衝突造成雙重留白 */

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* LINE Login Button Styles */
.btn-line {
  background-color: #06C755;
  border-color: #06C755;
  color: white;
  transition: all 0.3s ease;
}

.btn-line:hover {
  background-color: #05B34D;
  border-color: #05B34D;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.3);
}

.btn-line:active,
.btn-line:focus {
  background-color: #04A043;
  border-color: #04A043;
  color: white;
  box-shadow: 0 0 0 0.25rem rgba(6, 199, 85, 0.25);
}

/* ===========================================================
   通用「表格轉手機卡片」樣式
   用法：<table class="table table-mobile-cards">,並在每個 <td> 加上
   data-label="欄位名稱" 屬性。手機寬度以下會自動把每一列轉成卡片，
   欄位名稱以 data-label 顯示在左側。
   =========================================================== */
@media (max-width: 767.98px) {
    .table-mobile-cards.table,
    .table-mobile-cards tbody,
    .table-mobile-cards tr,
    .table-mobile-cards td {
        display: block;
        width: 100%;
    }
    .table-mobile-cards thead {
        display: none;
    }
    .table-mobile-cards tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(0,0,0,.125);
        border-radius: 1rem;
        padding: 0.5rem;
        background-color: #fff;
        box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
        overflow: hidden;
    }
    .table-mobile-cards td {
        text-align: right !important;
        padding-left: 45% !important;
        position: relative;
        border: none;
        border-bottom: 1px solid #f8f9fa;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }
    .table-mobile-cards td:last-child {
        border-bottom: 0;
    }
    .table-mobile-cards td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        width: 40%;
        text-align: left;
        font-weight: 600;
        color: #6c757d;
        font-size: 0.85rem;
    }
    .table-mobile-cards td > div {
        justify-content: flex-end !important;
    }
    .table-mobile-cards td.text-truncate {
        white-space: normal !important;
        max-width: none !important;
        text-align: right;
    }
    .table-mobile-cards td .btn-group,
    .table-mobile-cards td .btn-group-sm {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
