/* ========================
   SECTION WRAPPER
======================== */
.campaign-form-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px 20px;
  background-color: #fff;
}

/* ========================
   MAIN FORM CONTAINER
======================== */
.campaign-form-wrapper {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1fr 1fr; /* two columns on desktop */
  column-gap: 40px;
  row-gap: 10px;
}

/* ========================
   TITLE
======================== */
.campaign-title {
  grid-column: span 2;
  text-align: flex-start;
}

.campaign-title h2 {
  font-size: 26px;
  font-weight: bold;
  margin: 0; /* ❌ Remove top/bottom gap */

  color: #000;
}

.campaign-title h2 span,
.campaign-title p span {
  color: #7a0000;
}

.campaign-title p {
  font-size: 15px;
  margin: 4px 0 0 0; /* Small controlled gap below header */
  padding: 0;
  color: #555;
}

/* ========================
   LEFT SIDE – USER DATA
======================== */
.campaign-user-data .input-group {
  margin-bottom: 15px;
}

.campaign-user-data h3 {
  font-size: 14px;
  margin-bottom: 5px;
}

.campaign-user-data .input-group input,
.campaign-user-data select {
  width: 90%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #333;
  outline: none;
}

.anonymous-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 13px;
}

.anonymous-checkbox label {
  display: inline-block;
  width: auto;
  white-space: normal;
  overflow: visible;
}

.mass-intention textarea {
  width: 90%;
  padding: 10px;
  border: 1px solid #000;
  border-radius: 6px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.4;
}

.char-counter {
  font-size: 12px;
  color: #555;
  text-align: right;
  margin-top: 3px;
  margin-right: 50px;
}

/* ========================
   RIGHT SIDE – TRANSACTION DATA
======================== */
.campaign-transaction-data .input-group {
  margin-bottom: 15px;
}

.campaign-transaction-data h3 {
  font-size: 14px;
  margin-bottom: 5px;
}

.campaign-transaction-data input[type="text"],
.campaign-transaction-data input[type="file"] {
  width: 95%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #333;
  outline: none;
}

/* ========================
   QR PAYMENT
======================== */
.campaign-transaction-data input[type="radio"] {
  margin-right: 5px;
}

.campaign-transaction-data label {
  font-size: 13px;
}

.campaign-transaction-data input[type="radio"]:checked + label {
  font-weight: bold;
  color: #7a0000;
}

/* ========================
   FILE UPLOAD BUTTON
======================== */
#receiptCampaign {
  display: none;
}

.input-group label[for="receiptCampaign"],
.btn-upload {
  background-color: #7a0000;
  color: #fff;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-block;
  transition: 0.3s ease;
}

.btn-upload {
  margin-left: 100px;
}

.btn-upload:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(122, 0, 0, 0.3);
}

.btn-update-ref {
  background-color: #7a0000;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  /* Removed fixed margin-left to allow flexbox to handle layout */
  margin-left: 0;
}

.btn-update-ref:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(122, 0, 0, 0.3);
}

/* ========================
   CHECKBOXES
======================== */
.checkbox {
  margin-bottom: 5px;
  gap: 5px; /* small space between box and text */
}

.checkbox label {
  font-size: 13px;
  color: #333;
  line-height: 1.6;
}
.checkbox span {
  font-size: 13px;
  color: #1911ff; /* highlight terms/policies */
  cursor: pointer;
}

.checkbox span:hover {
  text-decoration: underline;
}

.input-group span,
span.required {
  color: #7a0000;
  font-weight: 1000;
}

/* ========================
   BUTTONS
======================== */
.campaign-buttons {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  flex-wrap: wrap;
}

.campaign-buttons button {
  padding: 10px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back {
  background-color: #c62828;
  color: #fff;
}

.btn-donate {
  background-color: #4caf50;
  color: #fff;
}

.btn-donate:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(76, 175, 80, 0.3);
}

.btn-back:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(198, 40, 40, 0.3);
}

/* ========================
   ERROR MESSAGE
======================== */
.error-message {
  color: #d32f2f;
  font-size: 0.9em;
  margin-top: 4px;
  display: none;
}

.is-invalid + .error-message {
  display: block;
}

/* ========================
   MODERN QR DISPLAY
======================== */
.qr-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  max-width: 240px; /* Sensible max width */
  margin: 10px 0 20px 0; /* Spacing around the card */
  transition: transform 0.3s ease;
}

.qr-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: #7a0000; /* GCash Blue highlight on hover */
}

.qr-header {
  margin-bottom: 15px;
  border-bottom: 2px dashed #eee;
  padding-bottom: 10px;
}

.payment-label {
  font-weight: 800;
  color: #007dfe; /* GCash Blue */
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.qr-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-image {
  width: 100%;       /* Responsive width */
  height: auto;      /* Maintain aspect ratio */
  max-width: 200px;  /* Sensible size for the QR itself */
  border-radius: 8px;
  border: 1px solid #eee;
}

.qr-instruction {
  margin-top: 12px;
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* Make the container a flex row */
.input-group-row {
    display: flex;
    gap: 20px; /* Space between the two inputs */
    margin-bottom: 20px;
    margin-top: 0;
    width: 100%;
}

/* Ensure both inputs take up equal width */
.input-wrapper {
    flex: 1; /* Each takes 50% width */
    display: flex;
    flex-direction: column;
}

/* Style for disabled Back button */
.btn-back:disabled {
    background-color: #ccc; /* Grey background */
    color: #666;            /* Grey text */
    border-color: #999;
    cursor: not-allowed;    /* Shows 'stop' cursor */
    opacity: 0.7;
    pointer-events: none;   /* Prevents clicking completely */
}

/* Ensure the submit button also looks disabled */
.btn-donate:disabled {
    background-color: #4e8750; /* A lighter/faded version of your red/brown color */
    cursor: not-allowed;
}

/* Responsive: Stack them on mobile phones */
@media (max-width: 600px) {
    .input-group-row {
        flex-direction: column;
        gap: 0;
    }
    .input-wrapper {
        margin-bottom: 15px;
    }
}

/* Mobile Adjustment for QR */
@media (max-width: 600px) {
  .qr-card {
    max-width: 100%; /* Full width on small screens */
    margin: 0 auto 20px auto; /* Center it */
  }
  
  .qr-image {
    max-width: 180px; /* Slightly smaller on mobile to save space */
  }
}

/* ========================
   RESPONSIVENESS
======================== */

/* Tablet (≤ 900px) */
@media (max-width: 900px) {
  .campaign-form-wrapper {
    grid-template-columns: 1fr;
    max-width: 700px;
  }

  .campaign-title {
    text-align: center;
    grid-column: span 1;
  }

  .campaign-user-data,
  .campaign-transaction-data {
    padding: 0 40px;
  }

  .campaign-user-data .input-group input,
  .campaign-user-data select,
  .mass-intention textarea,
  .campaign-transaction-data input[type="text"],
  .campaign-transaction-data input[type="file"],
  .campaign-transaction-data select {
    width: 95%;
  }

  .btn-upload {
    margin-left: 0;
    width: 50%;
  }

  .campaign-buttons button {
    width: auto;
    min-width: 120px;
    margin-bottom: 50px;
  }
}

/* Mobile (≤ 600px) */
@media (max-width: 600px) {
  .campaign-form-section {
    padding: 25px 10px;
  }

  .campaign-form-wrapper {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .campaign-title h2 {
    font-size: 20px;
  }

  .campaign-title p {
    font-size: 13px;
  }

  .campaign-user-data .input-group input,
  .campaign-user-data select,
  .mass-intention textarea,
  .campaign-transaction-data input[type="text"],
  .campaign-transaction-data input[type="file"] {
    width: 90%;
    font-size: 14px;
  }

  .campaign-transaction-data select {
    width: 120%;
    font-size: 14px;
  }

  .btn-upload {
    font-size: 14px;
    padding: 8px;
    margin-left: 0;
  }

  .campaign-buttons {
    width: auto;
    gap: 10px;
  }

  .campaign-buttons button {
    width: auto;
    min-width: 120px;
    margin-bottom: 50px;
  }
}
