/* website_frontend/css/donation.css */

/* website_frontend/css/donation.css
   Donation page-specific styles ONLY (no website.css dependency)
   Keep global typography/buttons/forms in site.css
*/
.hidden { display: none !important; }
#formWrapper { display: block; }

/* =========================================================
   Donation sections (General donation + Pledge intro)
========================================================= */

.donation-section {
  background: linear-gradient(
    180deg,
    rgba(255, 250, 240, 0.9),
    rgba(244, 224, 193, 0.7)
  );
}

.donation-grid {
  /* This is the key piece that website.css was providing */
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center; /* match screenshot layout */
}

.donation-copy {
  display: grid;
  gap: 1rem;
}

/* Bullet list */
.donation-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.donation-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--color-gray-dark);
  line-height: 1.5;
}

.donation-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--temple-saffron);
}

/* Right column wrapper */
.donation-panel {
  display: grid;
  gap: 1rem;
  align-items: start;
}

/* The pledge/general donation card tone */
.pledge-card {
  border: 1px solid rgba(123, 31, 27, 0.18);
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96),
    rgba(247, 229, 199, 0.88)
  );
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(45, 28, 16, 0.14);
}

/* Card header (used by both general donation + pledge card) */
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--temple-leaf);
}

.card-title {
  margin: 0.25rem 0 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--temple-maroon);
}

.card-tag {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(123, 31, 27, 0.12);
  color: var(--temple-maroon);
}

/* Quick donation buttons row */
.donation-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.donation-quick .btn {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  font-size: 1.1rem;
}

/* Other amount row */
.donation-other {
  margin-top: 1.25rem;
}

.donation-other label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.donation-other .inline-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
}

.donation-other input {
  height: 54px;
  border-radius: 16px;
}

.donation-other .btn {
  height: 54px;
  padding: 0 28px;
}

/* Pledge check button (kept for safety if you rely on it) */
.check-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 9999px;
  min-height: 40px;
}

/* Hint text */
.hint {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  color: var(--color-gray-light);
  line-height: 1.5;
}

/* Only for pledge section (keep same vertical centering) */
#pledge .donation-grid {
  align-items: center;
}

/* =========================================================
   Pledge multi-step form screen styles (scoped)
========================================================= */

#lookupScreen.donation-screen {
  display: block;
  min-height: auto;
}

/* Full-width second screen wrapper */
.form-screen {
  display: flex;
  justify-content: center;
  padding: 3rem 2rem;
  box-sizing: border-box;
  max-width: 800px;
  min-height: 100vh;
  height: auto;
}

/* If you use "screen" wrappers in pledge flow */
.screen {
  display: contents;
}

.screen-form > .panel {
  grid-column: 1 / -1;
  max-width: 1100px;
  margin: 0 auto;
}

.form-section {
  border-bottom: 1px solid var(--color-gray-lighter);
}

.form-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-gray-dark);
}

/* Form container (only inside .form-screen) */
.form-screen .panel {
  width: 100%;
  background: var(--color-surface-white);
  border-radius: 16px;
  border: 1px solid var(--color-gray-lighter);
  padding: 3rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);

  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 6rem);
}

/* Scrollable form content area */
.form-body {
  overflow-y: auto;
  padding-right: 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 32px 32px;
}

/* The big pledge form container */
#userForm {
  max-width: 820px;
  height: 90vh;
  margin: 24px auto;
  background: #fffbe6;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);

  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
}

/* Ensure CTA stays clickable even if something disables fields */
#userForm .btn {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* Submit button appearance */
#submitBtn {
  background: var(--color-primary);
  color: #fff;
  border: none;
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.25);
}

#submitBtn:hover {
  background: var(--color-primary-dark);
}

#userForm::-webkit-scrollbar {
  width: 8px;
}

/* Scope "compact inputs" ONLY to the pledge multi-step form */
.page-donation #userForm input,
.page-donation #userForm select,
.page-donation #userForm textarea {
  padding: 6px 10px;
  height: auto;
  line-height: 1.2;
}

/* Form wrapper should NOT be flex-row */
#formWrapper {
  display: block !important;
  padding: 24px;
}

#formWrapper > * {
  margin-left: auto;
  margin-right: auto;
}

.form-logo {
  display: block;
  width: 72px;
  height: auto;
  margin: 0 auto 16px;
  object-fit: contain;
}

.form-temple-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-gray-dark);
}

.form-intro {
  flex-shrink: 0;
  max-width: 720px;
  margin: 0 auto 1.25rem;
  text-align: center;
}

.form-intro::after {
  content: "";
  display: block;
  border-bottom: 1px solid var(--color-primary-dark);
  width: 240px;
  height: 1px;
  margin: 0.5rem auto 0;
}



/* =========================================================
   Pledge
========================================================= */
.pledge-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.pledge-poster {
  margin-top: 16px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(123, 31, 27, 0.18);
  background: rgba(255,255,255,0.6);
}

.pledge-poster img {
  width: 100%;
  height: auto;
  display: block;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 980px) {
  .donation-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .donation-quick {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-donation .form-body {
    padding: 0 16px 24px !important;
  }

  .page-donation #userForm {
    margin: 0 auto !important;
    height: auto;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  #lookupScreen.donation-screen {
    display: block !important;
    min-height: auto !important;
  }
}
