

/* ====== กล่องเช็กอินหลัก ====== */
.bonus-card {
  max-width: 500px;
  margin: 0 auto;
  background: #e0f2fe;
  border: 2px solid #bae6fd;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  text-align: center;
}

.bonus-card h3 {
  margin-top: 0;
}

.deadline {
  font-size: 9px;
  color: #555;
  margin-bottom: 10px;
}

.progress-text {
  font-weight: bold;
  margin-bottom: 10px;
}

/* ====== แถวเหรียญเช็กอิน ====== */
.coin-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 15px;
}

.coin-row img {
  width: 30px;
  height: 30px;
}

/* ====== ปุ่มเช็กชื่อ/รับสิทธิ์ ====== */
button {
  display: block;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 9px;
  background: #22c55e;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #16a34a;
}

button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

/* ====== กล่องเงื่อนไขกิจกรรม ====== */
.condition-box {
  max-width: 500px;
  margin: 10px auto;
  padding: 10px;
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 10px;
}

.condition-box h4 {
  margin-top: 0;
  color: #166534;
}

.condition-box ul {
  padding-left: 20px;
  font-size: 9px;
}

.coupon-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.coupon-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}


.coupon-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.coupon-info h4,
.coupon-info p {
  margin: 4px 0;
}

.coupon-info button {
  margin-top: 10px;
  align-self: flex-start;
}

/* ====== กล่องคูปองหลังครบ 7 วัน ====== */
.coupon-section {
  max-width: 500px;
  margin: 30px auto;
  background: #fff8e1;
  padding: 15px;
  border: 2px solid #facc15;
  border-radius: 10px;
  margin-bottom: 80px; /* ✅ เพิ่มระยะห่างด้านล่าง */
}

.coupon-card img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.coupon-info h4 {
  margin: 0 0 8px;
}

/* ปุ่มรับสิทธิ์ */
#redeemBtn {
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  background: #22c55e;
  color: white;
  cursor: pointer;
  font-size: 10px;
}

#redeemBtn:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

/* ====== Overlay sold out ====== */
.sold-out-overlay {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 100px;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

/* ====== ป็อปอัปแจ้งเตือนกลางจอ ====== */
.custom-alert {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: none;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.custom-alert-box {
  background: white;
  padding: 24px;
  border-radius: 10px;
  text-align: center;
  max-width: 320px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.custom-alert-box button {
  margin-top: 12px;
  padding: 10px 20px;
  border: none;
  background-color: #7b4d8b;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.loading-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
