/*
 * Design refinements on top of the legacy bllor-ngo styles in style.css.
 * The legacy class names stay as they are (merchant custom CSS targets them), so this
 * file only adds rules. Colours come from the store's primary colour.
 */

/* Header */
.header {
  border-bottom: 1px solid #f0eef0;
}
.header .header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  text-decoration: none;
}
.header .header-logo .logo-img {
  max-height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.header .logo-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--headerTextColor);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Footer: the legacy col-md-3 columns are kept; only the ones with content are rendered,
   and they share the row equally. */
.footer .footer-columns {
  align-items: flex-start !important;
}
@media (min-width: 768px) {
  .footer .footer-columns > .col-md-3 {
    flex: 1 1 0;
    width: auto;
  }
}
@media (max-width: 767.98px) {
  .footer .footer-columns > :first-child {
    margin-top: 0 !important;
  }
}
.footer .container {
  padding: 28px 24px !important;
}
.footer .footer-title {
  font-weight: 700;
}
.footer .footer-menu {
  padding: 0;
  margin-bottom: 0;
}
.footer .footer-menu li + li {
  margin-top: 6px;
}
.footer .footer-menu .fa-fw {
  color: var(--primaryColor);
  margin-inline-end: 6px;
}
.footer .payment-method-list img {
  height: 36px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
}

/* Default home page (components/home-default.jinja) */
.home-hero {
  padding: 8px 0 12px;
}
.home-hero-box {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 56px 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--primaryColor) 18%, transparent) 0, transparent 45%),
    radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--primaryColor) 14%, transparent) 0, transparent 40%),
    color-mix(in srgb, var(--primaryColor) 6%, #fff);
}
.home-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-size: 30px;
  color: #fff;
  background: var(--primaryColor);
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--primaryColor) 60%, transparent);
}
.home-hero-title {
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.3;
  color: #1f1d20;
  margin-bottom: 12px;
}
.home-hero-text {
  max-width: 560px;
  margin: 0 auto 28px;
  font-size: 18px;
  color: #5b565c;
}
.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.home-hero-actions .btn {
  min-width: 200px;
  border-radius: 12px;
}
.home-steps .home-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  height: 100%;
  padding: 24px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 6px -10px rgba(0, 0, 0, .03), 0 4px 48px -16px rgba(0, 0, 0, .12);
}
.home-steps .home-step-icon {
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 20px;
  color: var(--primaryColor);
  background: color-mix(in srgb, var(--primaryColor) 10%, #fff);
}
.home-steps .home-step-title {
  font-size: 18px;
  margin-bottom: 4px;
  color: #1f1d20;
}
.home-steps .home-step-text {
  color: #6b666c;
  font-size: 15px;
}
/* Section titles in the primary colour, as in bllor (e.g. "You may also like" on the project page). */
.section-title {
  color: var(--primaryColor);
}
/* Only the fallback home page; merchant sections keep bllor's section titles. */
[data-home-latest] .section-title,
.home-steps .section-title {
  margin-bottom: 24px;
  color: #1f1d20;
}
@media (max-width: 575px) {
  .home-hero-box {
    padding: 40px 16px;
  }
  .home-hero-actions .btn {
    width: 100%;
  }
}

/* Donation cards and the project page.
   The grid cards (.norma-product) keep the legacy bllor look from style.css; see the
   "Donation cards: legacy look" section at the end of this file. */
.block-product {
  color: #2b282c;
}
.block-product .norma-product {
  display: flex;
  flex-direction: column;
  height: 100%;
}
/* The form fills the rest of the card and its buttons sit at the bottom, so cards in
   one row line up whether they show an amount picker, a units picker or nothing. */
.block-product .norma-product [data-donation-form] {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.block-product .norma-product [data-donation-form] > .actions,
.block-product .norma-product > [data-donation-closed] {
  margin-top: auto;
  padding-top: 15px;
}
.block-product .norma-product.without-details {
  flex-wrap: nowrap;
}
.block-product .thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  font-size: 44px;
  color: rgba(255, 255, 255, .85);
  background: linear-gradient(135deg, var(--primaryColor), color-mix(in srgb, var(--primaryColor) 65%, #000));
}
.product--single-page .thumb .label {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

/* Project page image placeholder */
.product--single-page .thumb-placeholder {
  height: 220px;
  font-size: 64px;
}
.product--single-page .thumb-placeholder-wrap {
  border-radius: 16px;
}
.product--single-page .thumb-placeholder-wrap::after {
  display: none;
}

@media (max-width: 991.98px) {
  /* The two project cards join into one on small screens. */
  [data-donation-page] .custom-top-bottom {
    padding-bottom: 4px;
  }
  [data-donation-page] .custom-res-bottom {
    padding-top: 8px;
  }
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 48px 16px;
}
.empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 50%;
  font-size: 28px;
  color: var(--primaryColor);
  background: color-mix(in srgb, var(--primaryColor) 10%, #fff);
}
.empty-state-text {
  font-size: 18px;
  color: #4e4a4f;
  margin-bottom: 20px;
}

/* Donation cards and the project page: legacy look.
   Matches bllor: card title over the image, figures in a grey box with the percentage
   on the bar, amount suggestions beside the input, plain icon actions in markup order. */
.norma-product {
  position: relative;
  color: var(--primaryColor);
}
.norma-product .thumb img {
  height: 130px;
}
/* The title sits in the bottom of the image, as content-thumb did inside the thumb. */
.norma-product .donation-card-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  z-index: 99;
  overflow: hidden;
  pointer-events: none;
}
.norma-product .donation-card-title h3 {
  margin: 0;
  color: #fff;
}
.norma-product .donation-card-title a,
.norma-product .donation-card-title a:hover {
  color: #fff;
  pointer-events: auto;
}

/* Figures: what was collected on one side, what is left on the other, bar below. */
.block-product .progress-product {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  color: var(--primaryColor);
  background: #f8f7f8;
  border-radius: 16px;
  padding: 10px;
  margin-bottom: 10px;
}
.block-product .progress-product .progress-summary {
  display: contents;
}
.block-product .progress-product .progress-collected {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0;
}
.block-product .progress-product .progress-remaining {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-size: inherit;
}
.block-product .progress-product .large,
.block-product .progress-product .progress-remaining strong {
  font-size: inherit;
  font-weight: bold;
  color: inherit;
}
.block-product .progress-product .progress-muted {
  font-size: inherit;
}
.block-product .progress-product .progress {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 1rem;
  margin-top: 10px;
  border-radius: 16px;
  background: #f1eff1;
}
.block-product .progress-product .progress .progress-bar {
  min-width: 10%;
  border-radius: 0;
}
/* The percentage reads on the bar, white on the filled part. */
.block-product .progress-product .progress-pct {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
  align-self: end;
  z-index: 1;
  min-width: 10%;
  height: 1rem;
  padding: 0 2px;
  font-size: .75rem;
  font-weight: normal;
  line-height: 1rem;
  text-align: center;
  color: #fff;
}

/* Amount: suggestions and the input side by side. */
.block-product .donation-amount > .row > .col-6 {
  flex: 0 0 auto;
  width: 50%;
  max-width: 50%;
}
.block-product .donation-amount .form-label {
  color: var(--primaryColor);
  font-size: inherit;
  font-weight: inherit;
  margin-bottom: .5rem;
}
.block-product .donation-amount .donation-amount-options {
  gap: .5rem !important;
  margin-bottom: 0;
}
.block-product .donation-amount button,
.block-product .donation-amount button:hover {
  flex: 0 1 auto;
  width: 50px;
  min-height: 0;
  padding: 3px 5px;
  color: #9d959f;
  font-weight: inherit;
  background: #fff;
  border-color: #f1eff1;
  border-radius: 8px;
}
.block-product .donation-amount button.active {
  color: var(--primaryColor);
  background: #fff;
  border-color: var(--primaryColor);
}
.block-product .donation-amount .input-amount,
.block-product .donation-amount .input-amount:focus-within {
  min-height: 0;
  border-color: #f1eff1;
  border-radius: 8px;
  box-shadow: none;
}
.block-product .donation-amount .input-amount span {
  color: #000;
}

/* Actions: cart, donate, gift, share in markup order, as plain icons. */
.block-product .actions {
  gap: 0;
}
.block-product .actions > .w-50 {
  order: 0;
  flex: 0 0 auto;
}
.block-product .actions .btn-primary {
  min-height: 0;
  font-weight: inherit;
}
.block-product .actions > .btn-link,
.block-product .actions .floating-action-button > .btn-link,
.block-product .actions > .btn-link:hover,
.block-product .actions .floating-action-button > .btn-link:hover {
  display: inline-block;
  flex: none;
  width: auto;
  height: auto;
  border: 0;
  background: transparent;
}
.block-product .actions .icon-svg {
  width: 35px;
  height: 35px;
}

/* Project page: Vitrin's shared variant and custom-field components, styled like the
   bllor fields (primary label above a full-width rounded input, select with a chevron box). */
.content-options .custom-field {
  position: relative;
}
.content-options .custom-field__label,
.content-options .product-options__label {
  display: block;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: normal;
  color: var(--primaryColor);
}
.content-options .custom-field__required {
  color: #dc3545;
}
.content-options .custom-field__hint {
  margin: 0 0 4px;
  font-size: 13px;
  color: #6b666c;
}
.content-options .custom-field__input {
  display: block;
  width: 100%;
  height: 42px;
  padding: .375rem .75rem;
  color: #000;
  background: #fff;
  border: 1px solid #f1eff1;
  border-radius: 8px;
  box-shadow: none;
  outline: 0;
}
.content-options .custom-field__input:focus {
  border-color: #dcdbdb;
}
.content-options .custom-field__textarea {
  height: auto;
  min-height: 84px;
}
.content-options .custom-field__select {
  height: 46px;
  padding-inline-end: 52px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}
.content-options .custom-field--dropdown::after {
  content: "\f078";
  font: var(--fa-font-solid);
  font-size: 20px;
  color: rgba(0, 0, 0, .83);
  position: absolute;
  bottom: 1px;
  inset-inline-end: 1px;
  width: 40px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  border-inline-start: 1px solid #f1eff1;
  pointer-events: none;
}
/* Checkbox fields. product-details.css still styles bllor's checkbox markup under the same
   #product-custom-user-option-fields id (hidden input, the next span drawn as an 18px box,
   label and options side by side); those rules are undone here for Vitrin's markup. */
.content-options #product-custom-user-option-fields.custom-field--checkbox {
  display: block;
}
.content-options .custom-field__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.content-options .custom-field__option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  margin: 0;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 3px;
  cursor: pointer;
  transition: border-color .15s ease-in-out;
}
.content-options .custom-field__option:hover {
  border-color: var(--primaryColor);
}
.content-options #product-custom-user-option-fields .custom-field__checkbox {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primaryColor);
  cursor: pointer;
}
.content-options #product-custom-user-option-fields .custom-field__option-label {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  position: static;
  color: #000;
  cursor: pointer;
}
.content-options #product-custom-user-option-fields .custom-field__option-label::after {
  content: none;
}
.content-options .custom-field__option-price {
  color: var(--primaryColor);
  white-space: nowrap;
}

/* Cart: style.css hides each line's price with !important (bllor took prices from Zid's
   cart list); the theme renders them itself, so show them at every width. */
.cart-product-row-wrapper .cart-product-row .cart-product-prices {
  display: block !important;
  text-align: center;
}
.cart-product-row-wrapper .cart-product-prices .totals {
  font-weight: 700;
  color: var(--primaryColor);
}
.cart-product-row-wrapper .cart-product-price-each {
  font-size: 13px;
  color: #6b666c;
}
.cart-product-row-wrapper .custom-field-row {
  font-size: 14px;
  color: #6b666c;
}
.cart-product-row-wrapper .custom-field-name::after {
  content: ":";
  margin-inline-end: 4px;
}
.cart-product-row-wrapper .custom-field-price {
  margin-inline-start: 4px;
  color: var(--primaryColor);
}
.cart-product-delete a.is-loading {
  pointer-events: none;
  color: var(--primaryColor);
}
@media screen and (max-width: 767px) {
  .cart-product-row-wrapper .cart-product-row .cart-product-prices {
    display: flex !important;
  }
}
