/* ==========================================================
💳 支付方式布局（固定3列 + 固定宽高 + 自适应）
路径：/public/assets/riniba_03/css/custom.css
========================================================== */

/* 👉 可以自由修改的参数（在这里调宽高和间距） */
:root {
  --pay-card-width: 180px;    /* ✅ 每个支付方式的宽度 */
  --pay-card-height: 36px;    /* ✅ 每个支付方式的高度 */
  --pay-card-gap: 18px;       /* ✅ 卡片间距 */
  --pay-card-radius: 10px;    /* ✅ 圆角大小 */
}


/* ========== 外层容器 ========== */
#paymentGroup {
  display: grid;
  grid-template-columns: repeat(3, var(--pay-card-width)); /* ✅ 一行固定3个 */
  justify-content: center;                                /* 居中显示 */
  align-items: center;
  gap: var(--pay-card-gap);                               /* 卡片之间间距 */
  width: 100%;
  max-width: calc(var(--pay-card-width) * 3 + var(--pay-card-gap) * 2); /* 控制整体宽度 */
  margin: 0 auto;
  box-sizing: border-box;
}

/* 平板：两列 */
@media (max-width: 991.98px) {
  #paymentGroup {
    grid-template-columns: repeat(2, var(--pay-card-width));
    max-width: calc(var(--pay-card-width) * 2 + var(--pay-card-gap));
  }
}

/* 手机：两列 */
@media (max-width: 575.98px) {
  #paymentGroup {
    grid-template-columns: repeat(2, var(--pay-card-width));
    justify-content: center; /* ✅ 居中排列 */
    gap: 12px;
  }
}


/* ========== 单个支付方式卡片 ========== */
#paymentGroup .payments {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: var(--pay-card-width);
  height: var(--pay-card-height);
  padding: 6px 14px;
  border: 1px solid #e6e8eb;
  border-radius: var(--pay-card-radius);
  background: #fff;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

/* 悬停效果 */
#paymentGroup .payments:hover {
  border-color: #d7dbe0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 选中状态 */
#paymentGroup .payments:has(.btn-check:checked) {
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.15) !important;
  background: #fafafa;
}

/* 隐藏原始radio */
#paymentGroup .payments .btn-check {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
}
#paymentGroup .payments * {
  pointer-events: none;
}

/* ========== 图标与文字 ========== */
#paymentGroup .paymentsvg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
}
#paymentGroup .paymentsvg svg {
  width: 28px;
  height: 28px;
}
#paymentGroup .payments span:last-child {
  font-size: 15px;
  line-height: 1.3;
  color: #374151;
  white-space: nowrap;
}

/* 点击微动 */
#paymentGroup .payments:active {
  transform: translateY(1px);
}

/* 去掉Bootstrap蓝边 */
#paymentGroup .btn-check:focus + .btn,
#paymentGroup .btn:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* ✅ 最后一行靠左对齐 */
#paymentGroup {
  justify-content: start;
}


/* ==========================================================
📱 修复手机布局：一行显示2个支付方式
========================================================== */
@media (max-width: 767.98px) {
  #paymentGroup {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* ✅ 一行两列 */
    justify-content: center !important;              /* ✅ 居中 */
    align-items: center !important;
    gap: 14px !important;                            /* ✅ 卡片间距 */
    width: 100% !important;
  }

  #paymentGroup .payments {
    width: 100% !important;    /* ✅ 撑满格子 */
    height: 42px !important;   /* ✅ 统一高度 */
    margin: 0 auto !important;
    justify-content: center !important; /* ✅ 图标 + 文字整体居中 */
    text-align: center !important;
  }

  #paymentGroup .paymentsvg {
    margin-right: 8px !important;
  }
}


