/* The container */
.container2 {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  line-height: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color:#fefefe;
  
}

/* Hide the browser's default radio button */
.container2 input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

/* Create a custom radio button */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
  border-radius: 50%;
}

/* On mouse-over, add a grey background color */
.container2:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the radio button is checked, add a blue background */
.container2 input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the indicator (the dot/circle - hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the indicator (dot/circle) when checked */
.container2 input:checked ~ .checkmark:after {
  display: block;
}

/* Style the indicator (dot/circle) */
.container2 .checkmark:after {
 	top: 9px;
	left: 9px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: white;
}
/*SELECT*/
.select-dropdown,
.select-dropdown * {
  margin: 0;
  padding: 0;
  position: relative;
  box-sizing: border-box;
}
.select-dropdown {
  position: relative;
  background-color: #E6E6E6;
  border-radius: 4px;
}
.select-dropdown select {
  font-size: 1rem;
  font-weight: normal;
  max-width: 100%;
  padding: 8px 24px 8px 10px;
  border: none;
  background-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
  appearance: none;
}
.select-dropdown select:active, .select-dropdown select:focus {
  outline: none;
  box-shadow: none;
}
.select-dropdown:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 0;
  height: 0;
  margin-top: -2px;
  border-top: 5px solid #aaa;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
}



/*COUPLE*/
.coupon-popup-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 9998;
}
.coupon-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.coupon-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 400px;
  max-width: 90vw;
  background: #0e0d0f;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.8);
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}
.coupon-popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.coupon-popup h3 {
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 12px;
  color: #eee;
}

.coupon-search {
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 12px;
  border: 1px solid #44475a;
  margin-bottom: 12px;
  outline: none;
  background-color: #2e2e3a;
  color: #ddd;
  transition: border-color 0.3s;
  width: 100%;
}
.coupon-search::placeholder {
  color: #888;
}
.coupon-search:focus {
  border-color: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
  background-color: #3b3b4e;
  color: #fff;
}

.coupon-list {
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(80vh - 150px);
}

/* scrollbar */
.coupon-list::-webkit-scrollbar {
  width: 8px;
}
.coupon-list::-webkit-scrollbar-track {
  background: #222227;
  border-radius: 10px;
}
.coupon-list::-webkit-scrollbar-thumb {
  background-color: #44475a;
  border-radius: 10px;
}

/* รายการบล็อก */
.coupon-item {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid #44475a;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #ddd;
}
.coupon-item:last-child {
  border-bottom: none;
}
.coupon-item:hover {
  background-color: #3a3a52;
  color: #fff;
}

/* ไอคอน */
.coupon-item .icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin-right: 12px;
  border-radius: 8px;
  object-fit: contain;
  filter: brightness(1.2);
}

/* รายละเอียด */
.coupon-item .details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.coupon-item .details .title {
  font-weight: 700;
  font-size: 15px;
  color: #eee;
}
.coupon-item .details .desc {
  font-size: 13px;
  color: #aaa;
  margin-top: 4px;
  line-height: 1.2;
}
.coupon-item .details .itemcode {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
  font-style: italic;
}

/* custom radio แบบสี่เหลี่ยมติ๊กถูก */
.coupon-item label {
  position: relative;
  padding-left: 36px;
  cursor: pointer;
  user-select: none;
  color: #ddd;
  min-width: 24px;
}

.coupon-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.coupon-item .checkmark {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 22px;
  width: 22px;
  background-color: #222227;
  border: 2px solid #44475a;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.coupon-item:hover .checkmark {
  border-color: #4caf50;
}

.coupon-item input[type="radio"]:checked ~ .checkmark {
  background-color: #4caf50;
  border-color: #4caf50;
}

.coupon-item .checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.coupon-item input[type="radio"]:checked ~ .checkmark:after {
  display: block;
}

/* coupon: disabled state */
.coupon-item.disabled {
  opacity: 0.55;
  filter: grayscale(0.8);
  cursor: not-allowed;
}
.coupon-item.disabled:hover { background-color: inherit; color: #bbb; }
.coupon-item.disabled input { pointer-events: none; }


/* ปุ่มกลุ่ม */
.btn-group {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

/* ปุ่มยกเลิก */
.cancel-btn {
  flex: 1;
  background-color: #555555;
  border: none;
  border-radius: 14px;
  color: #eee;
  font-weight: 600;
  font-size: 16px;
  padding: 12px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.cancel-btn:hover {
  background-color: #333333;
}

/* ปุ่มนำไปใช้ */
.apply-btn {
  flex: 2;
  background-color: #4caf50;
  border: none;
  border-radius: 14px;
  color: #eee;
  font-weight: 700;
  font-size: 16px;
  padding: 12px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.apply-btn:hover {
  background-color: #388e3c;
}