.app-wrapper {
  max-width: 720px;
}

.btn-main {
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.form-label.required::after {
  content: " *";
  color: #dc3545;
  font-weight: 600;
}

.phone-group input {
  text-align: center;
}

.footer-text {
  font-size: .8rem;
}

.zipcode-display {
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(16, 88, 58, 0.16);
  border-radius: 0.375rem;
  background-color: #eef3f0;
  color: #5f6f68;
  padding: 0.375rem 0.75rem;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
}

.zipcode-display.has-value {
  color: #15392b;
  background-color: #f8fbf9;
}

.zipcode-display.is-invalid {
  border-color: #dc3545;
}

#zipcodeManual {
  font-weight: 600;
}

#inlineBarcodeContainer {
  padding: 18px 14px;
  border: 1px solid rgba(16, 88, 58, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(242, 248, 244, 0.92));
  box-shadow: 0 14px 30px rgba(24, 57, 41, 0.06);
}

#inlineBarcode {
  max-width: 100%;
}

#identityLines,
#aspStatusLine {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(223, 243, 232, 0.45);
}

#companySuggest,
#repair-company-suggest,
.list-group.position-absolute {
  border-radius: 16px;
  border: 1px solid rgba(16, 88, 58, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

/* --- 放大條碼 Modal 樣式 --- */

/* 讓 Modal 滿版顯示，背景全白 */
.barcode-fullscreen .modal-dialog {
  max-width: 100%;
  margin: 0;
  height: 100%;
  padding: 0;
}

.barcode-fullscreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #fff !important;
  opacity: 1 !important;
}

.barcode-fullscreen.show {
  display: block;
}

.barcode-fullscreen .modal-content {
  height: 100%;
  border: none;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 243, 0.96));
  position: relative;
}

.barcode-fullscreen .modal-header {
  box-shadow: none;
  padding: 16px 18px 0;
}

.barcode-fullscreen .btn-close {
  opacity: 1;
}

/* 隱藏預設的 Header，我們改用浮動的關閉按鈕 */
.barcode-fullscreen .modal-header {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1060;
  border: none;
  background: transparent;
}

/* 內容區域：設定為相對定位，佔滿剩餘空間 */
.barcode-fullscreen .modal-body {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* 防止旋轉後出現卷軸 */
  padding: 0;
}

/* 核心旋轉容器 */
.rotated-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  /* 1. translate(-50%, -50%) 先將中心點對齊螢幕中心
     2. rotate(90deg) 旋轉 90 度 */
  transform: translate(-50%, -50%) rotate(90deg);

  /* 旋轉後 width 對應到螢幕高度，85vh 代表條碼長度佔螢幕高度 85% */
  width: 85vh;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.barcode-modal-open {
  overflow: hidden;
}

/* 調整條碼 SVG 大小 */
.barcode-fullscreen #barcodeSvg {
  width: 100% !important;
  /* 讓條碼寬度撐滿容器 */
  height: auto !important;
  /* 高度自動維持比例 */
  max-height: 150px;
  /* 限制條碼的粗細，避免太粗 */
}

/* 模仿圖2：會員編號字體放大 */
.big-member-id {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: block;
  color: #000;
}

/* 說明文字 */
.rotate-instruction {
  margin-top: 1rem;
  color: #667a6f;
  font-size: 1rem;
}

/* 永遠讓放大條碼向右 90 度，跟裝置旋轉無關 */
.barcode-rotated {
  transform: rotate(90deg);
}

html,
body {
  width: 100%;
  height: 100%;
}

/* 手機橫向時，把整個畫面轉回直的 */
body.force-portrait {
  transform: none;
  width: 100%;
  height: 100%;
  overflow: auto;
}

@media (max-width: 576px) {
  .app-wrapper {
    max-width: none;
  }

  #inlineBarcodeContainer {
    padding: 14px 10px;
    border-radius: 18px;
  }
}
