/**
 * NFRT brand styling for standalone CiviCRM public pages.
 * Loaded only by the frontend page-shell override in this extension,
 * after core/Greenwich CSS, so plain selectors here win the cascade.
 *
 * Brand tokens (from www.nfrt.org.nz):
 *   green bright  #6AB000  (header strip, accents)
 *   green         #4B7D00  (buttons, links)
 *   green dark    #3F7100  (hover)
 *   font          Lato 300/400/700
 */

:root {
  --nfrt-green-bright: #6AB000;
  --nfrt-green: #4B7D00;
  --nfrt-green-dark: #3F7100;
  --nfrt-bg: #f5f7f0;
  --nfrt-text: #222222;
  --nfrt-muted: #666666;
  --nfrt-border: #d9ddd2;
}

html.crm-standalone-frontend,
html.crm-standalone-frontend body {
  margin: 0;
  padding: 0;
  background: var(--nfrt-bg);
}

html.crm-standalone-frontend body {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  color: var(--nfrt-text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.nfrt-main {
  flex: 1 0 auto;
}

/* ---- Header ---------------------------------------------------------- */

.nfrt-topstrip {
  height: 6px;
  background: var(--nfrt-green-bright);
}

.nfrt-header {
  background: #ffffff;
  border-bottom: 1px solid #e7e7e7;
}

.nfrt-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nfrt-logo-link {
  display: inline-block;
  line-height: 0;
}

.nfrt-logo-link img {
  height: 62px;
  width: auto;
}

.nfrt-secure {
  color: var(--nfrt-muted);
  font-size: 14px;
  white-space: nowrap;
}

.nfrt-secure .crm-i {
  color: var(--nfrt-green);
  margin-right: 4px;
}

/* ---- Page container / card ------------------------------------------ */

#crm-container.crm-public {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 16px 56px;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
}

.crm-public .crm-page-title-wrapper {
  text-align: center;
}

.crm-public h1.crm-page-title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 1.9em;
  color: var(--nfrt-text);
  margin: 28px 0 10px;
}

.crm-public h1.crm-page-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--nfrt-green-bright);
  margin: 12px auto 0;
  border-radius: 2px;
}

.crm-public #crm-main-content-wrapper {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(40, 60, 20, 0.08);
  padding: 30px 38px 34px;
  margin-top: 18px;
}

/* Intro / footer copy on the form */
.crm-public #intro_text,
.crm-public .contribution_intro_text-section {
  color: #444444;
  font-size: 1.02em;
  line-height: 1.55;
  margin-bottom: 1.4em;
}

.crm-public #footer_text,
.crm-public .contribution_footer_text-section {
  color: var(--nfrt-muted);
  font-size: 0.9em;
  text-align: center;
  margin-top: 1.2em;
}

/* ---- Form layout: stacked labels, comfortable fields ----------------- */

.crm-public .crm-section .label {
  float: none;
  width: auto;
  text-align: left;
  font-weight: 700;
  padding: 0;
  margin: 0 0 5px;
}

.crm-public .crm-section .content {
  margin-left: 0;
  padding: 0;
}

.crm-public .crm-section {
  margin-bottom: 18px;
}

.crm-public input[type="text"],
.crm-public input[type="email"],
.crm-public input[type="tel"],
.crm-public input[type="number"],
.crm-public input[type="password"],
.crm-public textarea,
.crm-public select {
  box-sizing: border-box;
  width: 100%;
  /* !important: core sizes public inputs with later max-width:100% rules */
  max-width: 440px !important;
  padding: 10px 12px;
  font: inherit;
  color: var(--nfrt-text);
  border: 1px solid #c7ccbf;
  border-radius: 6px;
  background: #ffffff;
}

.crm-public textarea {
  max-width: 100%;
  min-height: 110px;
}

.crm-public input:focus,
.crm-public textarea:focus,
.crm-public select:focus {
  outline: 2px solid var(--nfrt-green-bright);
  outline-offset: 1px;
  border-color: var(--nfrt-green);
}

/* select2 sets an inline width (~225px) from the original element */
.crm-public .select2-container {
  width: 100% !important;
  max-width: 440px;
}

/* Section separators ("Your Details", "Your dedication") */
.crm-public fieldset {
  border: none;
  border-top: 1px solid var(--nfrt-border);
  margin: 26px 0 0;
  padding: 14px 0 0;
}

.crm-public fieldset legend {
  font-weight: 700;
  font-size: 1.08em;
  color: var(--nfrt-green-dark);
  padding-right: 10px;
}

/* ---- Price options as selectable cards ------------------------------- */

/* Markup is <span class="price-set-option-content"><input/><label/></span>
   (input is a sibling BEFORE the label), so the span is the card. */
.crm-public .price-set-row {
  margin: 8px 0;
}

.crm-public .price-set-row .price-set-option-content {
  display: block;
  border: 1.5px solid var(--nfrt-border);
  border-radius: 6px;
  padding: 11px 14px;
  transition: border-color 0.15s, background 0.15s;
}

/* input + label live inside a .crm-option-label-pair wrapper */
.crm-public .price-set-row .crm-option-label-pair {
  display: flex;
  align-items: center;
  gap: 10px;
}

.crm-public .price-set-row .price-set-option-content:hover {
  border-color: var(--nfrt-green-bright);
}

.crm-public .price-set-row .price-set-option-content:has(input:checked) {
  border-color: var(--nfrt-green);
  background: #f3f8ea;
  font-weight: 700;
}

.crm-public .price-set-row input[type="radio"] {
  accent-color: var(--nfrt-green);
  margin: 0;
  flex-shrink: 0;
}

.crm-public .price-set-row .price-set-option-content label {
  cursor: pointer;
  margin: 0;
  flex: 1;
  font-weight: inherit;
  font-size: 1.05em;
}

/* ---- Submit button ---------------------------------------------------- */

.crm-public .crm-submit-buttons {
  margin-top: 26px;
  text-align: center;
}

.crm-public button.crm-form-submit,
.crm-public button.crm-button {
  display: inline-block;
  width: 100%;
  background: var(--nfrt-green);
  color: #ffffff;
  font-family: inherit;
  font-size: 1.15em;
  font-weight: 700;
  padding: 15px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-shadow: none;
  box-shadow: none;
  transition: background 0.15s;
}

.crm-public button.crm-form-submit:hover,
.crm-public button.crm-form-submit:focus,
.crm-public button.crm-button:hover,
.crm-public button.crm-button:focus {
  background: var(--nfrt-green-dark);
  color: #ffffff;
}

/* Secondary/cancel buttons stay quiet */
.crm-public button.crm-button.cancel {
  width: auto;
  background: #eeeeee;
  color: #444444;
  font-weight: 400;
}

/* ---- Links, messages, misc ------------------------------------------- */

.crm-public a,
.crm-public a:link,
.crm-public a:visited {
  color: var(--nfrt-green);
}

.crm-public a:hover {
  color: var(--nfrt-green-dark);
}

.crm-public .messages.error,
.crm-public .status.error {
  border-radius: 6px;
}

/* "empowered by CiviCRM" — keep, but quiet and centred */
.crm-public .crm-public-footer {
  text-align: center;
  margin-top: 26px;
  font-size: 12px;
  color: #999999;
}

/* ---- Site footer ------------------------------------------------------ */

.nfrt-footer {
  flex-shrink: 0;
  background: #ffffff;
  border-top: 1px solid #e7e7e7;
}

.nfrt-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 22px 20px 26px;
  text-align: center;
  color: var(--nfrt-muted);
  font-size: 13px;
  line-height: 1.6;
}

.nfrt-footer-inner a {
  color: var(--nfrt-green);
  text-decoration: none;
}

.nfrt-footer-inner a:hover {
  text-decoration: underline;
}

/* ---- Mobile ------------------------------------------------------------ */

@media (max-width: 640px) {
  .nfrt-logo-link img {
    height: 46px;
  }

  .nfrt-secure {
    font-size: 12px;
  }

  .crm-public #crm-main-content-wrapper {
    padding: 20px 18px 24px;
  }

  .crm-public h1.crm-page-title {
    font-size: 1.5em;
  }

  .crm-public input[type="text"],
  .crm-public input[type="email"],
  .crm-public input[type="tel"] {
    max-width: 100%;
  }
}
