/**
 * 八达通查询余额弹窗样式
 * 与清机弹窗样式统一
 */

/* layui弹窗皮肤 */
.octBalanceLayer {
  width: 90% !important;
  max-width: 10rem !important;
  border: none !important;
  border-radius: 0.3rem !important;
  box-shadow:
    0 0.275rem 0.375rem -0.175rem rgba(0, 0, 0, 0.2),
    0 0.6rem 0.95rem 0.075rem rgba(0, 0, 0, 0.14),
    0 0.225rem 1.15rem 0.2rem rgba(0, 0, 0, 0.12) !important;
  /* 强制垂直居中 */
  top: 50% !important;
  transform: translateY(-50%) !important;
  overflow: hidden;
}

.octBalanceLayer .layui-layer-content {
  padding: 0 !important;
  overflow: visible !important;
}

/* 弹窗容器 */
.oct-balance-dia {
  background: #fff;
  border-radius: 0.3rem;
  min-width: 8rem;
  max-width: 10rem;
}

/* 弹窗头部 */
.oct-balance-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: var(--styleColor);
  border-radius: 0.3rem 0.3rem 0 0;
}

.oct-balance-title {
  font-size: 0.45rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

.oct-balance-close {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.oct-balance-close:hover {
  color: #fff;
}

/* 弹窗主体 */
.oct-balance-body {
  padding: 0.5rem;
  min-height: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 图标容器 */
.oct-balance-icon-wrapper {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.3rem;
}

.oct-balance-icon-wrapper.error {
  color: #f44336;
}

/* Loading SVG图标 */
.oct-balance-loading-icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--styleColor);
  animation: oct-balance-spin 0.8s linear infinite;
}

/* 成功图标 - 八达通图片 */
.oct-balance-success-icon {
  width: 2rem;
  height: auto;
  border-radius: 0.2rem;
  margin: 0 auto 0.4rem;
  display: block;
}

/* 错误SVG图标 */
.oct-balance-error-icon {
  width: 1.5rem;
  height: 1.5rem;
}

@keyframes oct-balance-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 加载状态 */
.oct-balance-loading {
  text-align: center;
  width: 100%;
}

.oct-balance-loading-text {
  color: #666;
  font-size: 0.4rem;
  margin: 0 0 0.5rem;
}

/* 拍卡提示 */
.oct-balance-tap-hint {
  margin-top: 0.3rem;
  text-align: center;
}

.oct-balance-tap-img {
  width: 100%;
  max-width: 6rem;
  height: auto;
  border-radius: 0.2rem;
  margin-bottom: 0.3rem;
}

.oct-balance-tap-text {
  font-size: 0.4rem;
  color: #666;
  margin: 0;
}

/* 固定中英文提示 */
.oct-balance-tap-text-zh {
  font-size: 0.55rem;
  font-weight: 600;
  color: #333;
  margin: 0.3rem 0 0.3rem;
}

.oct-balance-tap-text-en {
  font-size: 0.4rem;
  color: #666;
  margin: 0;
}

/* 成功状态 */
.oct-balance-success {
  text-align: left;
  width: 100%;
  padding: 0.3rem 0;
}

.oct-balance-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.oct-balance-info-row {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.15rem;
  white-space: nowrap;
}

.oct-balance-info-label {
  font-size: 0.36rem;
  color: #666;
}

.oct-balance-info-value {
  font-size: 0.52rem;
  font-weight: 700;
  color: #333;
}

.oct-balance-result {
  font-size: 0.42rem;
  color: #666;
  margin: 0.8rem 0 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
}

.oct-balance-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--styleColor);
}

/* 错误状态 */
.oct-balance-error-section {
  text-align: center;
  width: 100%;
}

.oct-balance-error {
  color: #f44336;
  font-size: 0.4rem;
  margin: 0.3rem 0 0;
  text-align: center;
}

/* 弹窗底部 */
.oct-balance-footer {
  padding: 0.4rem 0.5rem;
  border-top: 0.025rem solid #eee;
}

.oct-balance-btn {
  width: 100%;
  height: 1.2rem;
  background: var(--styleColor);
  border: none;
  border-radius: 0.2rem;
  color: #fff;
  font-size: 0.45rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    opacity 0.2s;
}

.oct-balance-btn:hover {
  filter: brightness(0.9);
}

.oct-balance-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
