/* ===== MODAL WRAPPER ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none; /* keep this */
  padding: 20px;

  /* layout */
  display: none;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.5);

  /* animation base */
  opacity: 0;
  transition: opacity 0.25s ease;
}

/* SHOW STATE */
.modal.active {
  display: flex;
  opacity: 1;
}

/* ===== MODAL BOX ===== */
.modal-content {
  width: 100%;

  /* CONTROL WIDTH PROPERLY */
  max-width: 420px; /* desktop */
  margin: 0 16px; /* prevents edge touching on mobile */

  background: #fff;
  border-radius: 14px;
  padding: 22px;

  text-align: center;

  box-shadow: var(--shadow);

  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal.active .modal-content {
  transform: translateY(0);
}

/* ===== TITLE ===== */
.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary);
}

/* ===== MESSAGE ===== */
.modal-content p {
  font-size: 14px;
  line-height: 1.5;
  color: #d32f2f;
  margin-bottom: 18px;
}

/* ===== CHECKBOX ===== */
.modal-content label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  font-size: 14px;
  cursor: pointer;

  margin-bottom: 20px;
}

.modal-content input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ===== BUTTON ===== */
#okBtn {
  width: 100%;
  height: 42px;

  border: none;
  border-radius: 8px;

  background: var(--primary);
  color: #fff;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: background 0.2s ease;
  outline: none;
}

#okBtn:hover {
  background: var(--hover);
}

/* ===== MOBILE ===== */
@media (max-width: 576px) {
  .modal-content {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    max-width: 100%; /* allow full width */
    margin: 0 12px; /* breathing space */
    padding: 18px;
    border-radius: 10px;
  }
}

/* WRAPPER */
.discount-wrapper {
  width: 100%;
  padding: 20px 16px;
  box-sizing: border-box;
}

/* FORM */
.discount-form {
  max-width: 600px;
  margin: 0 auto;
}

/* LABEL */
.discount-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary);
}

/* ROW */
.discount-row {
  display: flex;
  gap: 10px;
  width: 100%;
}

/* INPUT */
.discount-input {
  flex: 1;
  height: 42px;
  padding: 5px 12px;

  border: 1px solid #ddd;
  border-radius: 8px;

  font-size: 14px;
  outline: none;

  min-width: 0; /* 🔥 prevents overflow */
}

/* BUTTON */
.discount-btn {
  height: 42px;
  padding: 0 20px;

  border: none;
  border-radius: 8px;

  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  white-space: nowrap;
}

/* HOVER */
.discount-btn:hover {
  background: var(--hover);
}

/* 📱 MOBILE STACK */
@media (max-width: 480px) {
  .discount-row {
    flex-direction: column;
  }

  .discount-btn {
    width: 100%;
  }
}

.container-custom {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 16px;
}

/* ===== GRID SYSTEM ===== */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* MOBILE */
@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ===== FORM ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--form-label);
}

/* ===== INPUTS ===== */
.input,
.select {
  height: 42px;
  padding: 0 12px;

  border: 1px solid var(--border-color);
  border-radius: 8px;

  background: #fff;
  font-size: 14px;

  outline: none;
  transition: all 0.2s ease;
}

.input:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(193, 85, 241, 0.15);
}

/* TEXTAREA */
.textarea {
  padding: 10px;
  min-height: 80px;
  resize: vertical;
}

/* ===== BUTTON ===== */
.btn-primary {
  height: 44px;
  border: none;
  border-radius: 8px;

  background: var(--primary);
  color: var(--text-white);

  font-weight: 600;
  cursor: pointer;

  transition: 0.2s;
}

.btn-primary:hover {
  background: var(--hover);
}

/* ===== SECTION CARD ===== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

/* ===== DISCOUNT BAR ===== */
.discount-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.discount-bar input {
  flex: 1;
  min-width: 0;
}

/* MOBILE STACK */
@media (max-width: 480px) {
  .discount-bar {
    flex-direction: column;
  }
}

/* ===== TEXT ===== */
.text-danger {
  color: #d32f2f;
}

.text-muted {
  color: var(--muted);
  font-size: 13px;
}

/* ===== CHECKBOX ===== */
.checkbox-group {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

/* ===== CARD TYPE ===== */
.card-types {
  display: flex;
  gap: 10px;
  align-items: center;
}

.card-types img {
  height: 28px;
}

/* ===== DISCOUNT RESULT CARD (IMPROVED READABILITY) ===== */
.discount-result {
  max-width: 520px;
  margin: 12px auto;
  padding: 14px 16px;

  border-radius: 12px;
  border: 1px solid #eee;
  background: #fff;

  display: flex;
  flex-direction: column;
  gap: 8px;

  font-size: 15px; /* increased base size */
  line-height: 1.4;
}

/* success / error states */
.discount-result.success {
  border-left: 5px solid #22c55e;
}

.discount-result.error {
  border-left: 5px solid #ef4444;
  background: #fff5f5; /* subtle red tint for error */
}

/* top row */
.discount-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* badge */
.discount-result .badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #333;
}

/* discount value */
.discount-top strong {
  font-size: 18px; /* bigger discount highlight */
  font-weight: 800;
  color: var(--primary);
}

/* meta info */
.discount-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #444;
}

/* error heading */
.discount-heading-warning {
  font-size: 18px;
  font-weight: 700;
  color: #ef4444;
  text-align: center;
}

/* mobile optimization */
@media (max-width: 480px) {
  .discount-result {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }

  .discount-top strong {
    font-size: 20px;
  }
  .register_form select {
    font-size: 13px;
  }
}
#hcaptcha-container {
  display: flex;
  /* justify-content: center; */
  width: 100%;
  max-width: 100%;
}

/* IMPORTANT: prevent iframe overflow */
#hcaptcha-container iframe {
  max-width: 100% !important;
}
