/* Public giving confirmation modal — navy, gold, cyan */
.giving-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(7, 19, 38, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.giving-modal-backdrop.is-open {
  opacity: 1;
}

.giving-modal {
  position: fixed;
  z-index: 1090;
  inset: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(920px, calc(100vw - 1.5rem));
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.08), transparent 28%),
    linear-gradient(160deg, #071326 0%, #0d1f3d 58%, #0a1830 100%);
  border: 1px solid rgba(215, 173, 69, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  color: #f4f8ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.giving-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.giving-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.giving-modal-head h2 {
  margin: 0.35rem 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: #fff;
}

.giving-modal-close {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.giving-modal-close:hover {
  background: rgba(34, 211, 238, 0.14);
  border-color: rgba(34, 211, 238, 0.45);
}

.giving-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 1.25rem;
  scrollbar-color: rgba(215, 173, 69, 0.45) transparent;
}

.giving-modal-foot {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 0.9rem 1.5rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 19, 38, 0.55);
}

.giving-section {
  margin-bottom: 1.35rem;
}

.giving-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ce-gold, #d7ad45);
}

.giving-section-title i {
  color: var(--ce-cyan, #22d3ee);
}

.giving-modal .form-label,
.giving-page-card .form-label,
.giving-page-wrapper .form-label,
#givingPageForm .form-label {
  color: #f8fafc !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.35rem !important;
  letter-spacing: 0.01em;
}

.giving-modal .form-control,
.giving-modal .form-select,
.giving-page-card .form-control,
.giving-page-card .form-select,
#givingPageForm .form-control,
#givingPageForm .form-select {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border-radius: 0.75rem !important;
  min-height: 2.75rem !important;
  font-size: 0.95rem !important;
}

.giving-modal .form-control:focus,
.giving-modal .form-select:focus,
.giving-page-card .form-control:focus,
.giving-page-card .form-select:focus,
#givingPageForm .form-control:focus,
#givingPageForm .form-select:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(34, 211, 238, 0.7) !important;
  box-shadow: 0 0 0 0.2rem rgba(34, 211, 238, 0.2) !important;
  color: #ffffff !important;
}

.giving-modal .form-control::placeholder,
.giving-page-card .form-control::placeholder,
#givingPageForm .form-control::placeholder {
  color: rgba(244, 248, 255, 0.5) !important;
}

.giving-modal .form-select option,
.giving-page-card .form-select option,
#givingPageForm .form-select option {
  background-color: #071326 !important;
  color: #ffffff !important;
}

.giving-category-grid {
  display: grid;
  gap: 0.55rem;
}

.giving-category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 9.5rem;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.85rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.giving-category-row label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff !important;
}

.giving-category-row input {
  text-align: right;
  font-weight: 700;
  color: #ffffff !important;
}

.giving-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: 0.85rem;
  background: rgba(215, 173, 69, 0.12);
  border: 1px solid rgba(215, 173, 69, 0.28);
}

.giving-total-bar span {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ce-gold, #d7ad45);
}

.giving-total-bar strong {
  font-size: 1.15rem;
  color: #fff;
}

.giving-outros-wrap {
  margin-top: 0.75rem;
}

.giving-outros-wrap.d-none {
  display: none !important;
}

.giving-file-hint {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: rgba(244, 248, 255, 0.55);
}

.giving-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.giving-form-error {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  background: rgba(220, 53, 69, 0.16);
  border: 1px solid rgba(220, 53, 69, 0.35);
  color: #ffb4bc;
  font-size: 0.84rem;
}

.giving-form-success {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.7rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: #b8f4ff;
  font-size: 0.84rem;
}

.giving-modal-foot .btn-outline-giving {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(255, 255, 255, 0.28);
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.42);
  --bs-btn-hover-color: #fff;
}

@media (max-width: 767.98px) {
  .giving-modal {
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
    transform: translateY(100%);
  }

  .giving-modal.is-open {
    transform: translateY(0);
  }

  .giving-category-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .giving-category-row input {
    text-align: left;
  }

  .giving-modal-foot {
    position: sticky;
    bottom: 0;
    z-index: 2;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .giving-modal-foot .btn {
    flex: 1;
    min-height: 2.85rem;
  }
}

/* Standalone Giving Page & Receipt styles */
.giving-page-wrapper {
  max-width: 880px;
  margin: 0 auto;
}

.giving-page-card {
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.08), transparent 28%),
    linear-gradient(160deg, #071326 0%, #0d1f3d 58%, #0a1830 100%);
  border: 1px solid rgba(215, 173, 69, 0.28);
  border-radius: 1.25rem;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  color: #f4f8ff;
  padding: 2rem 2.25rem;
}

@media (max-width: 767.98px) {
  .giving-page-card {
    padding: 1.25rem 1rem;
    border-radius: 1rem;
  }
}

.giving-share-card {
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.giving-share-card-info {
  flex: 1;
  min-width: 260px;
}

.giving-share-card-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.giving-share-card-info h3 i {
  color: #25d366;
  font-size: 1.2rem;
}

.giving-share-card-info p {
  font-size: 0.84rem;
  color: rgba(244, 248, 255, 0.75);
  margin-bottom: 0;
}

.giving-share-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-whatsapp {
  background-color: #25d366;
  color: #0b1426;
  font-weight: 700;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-whatsapp:hover {
  background-color: #20ba5a;
  color: #000;
  transform: translateY(-1px);
}

.giving-receipt-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.giving-receipt-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.15);
  border: 2px solid #25d366;
  color: #25d366;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  margin-bottom: 1.25rem;
}

.giving-receipt-ref-badge {
  display: inline-block;
  background: rgba(215, 173, 69, 0.15);
  border: 1px solid rgba(215, 173, 69, 0.4);
  color: var(--ce-gold, #d7ad45);
  font-family: monospace;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  margin: 0.75rem 0 1.5rem;
}

.giving-receipt-table {
  width: 100%;
  max-width: 540px;
  margin: 0 auto 1.75rem;
  text-align: left;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  overflow: hidden;
}

.giving-receipt-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.giving-receipt-table tr:last-child {
  border-bottom: none;
}

.giving-receipt-table td {
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  color: rgba(244, 248, 255, 0.9);
}

.giving-receipt-table td:first-child {
  font-weight: 600;
  color: rgba(244, 248, 255, 0.65);
  width: 40%;
}

.giving-receipt-table tr.total-row {
  background: rgba(215, 173, 69, 0.12);
}

.giving-receipt-table tr.total-row td {
  font-weight: 800;
  color: #fff;
  font-size: 1rem;
}

.giving-receipt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Autocomplete Typeahead Dropdown */
.giving-autocomplete-wrap {
  position: relative;
}

.giving-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1060;
  background: #0d1f3d;
  background: linear-gradient(165deg, #0c1c38 0%, #081326 100%);
  border: 1px solid rgba(215, 173, 69, 0.45);
  border-radius: 0.85rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  max-height: 280px;
  overflow-y: auto;
  scrollbar-color: rgba(215, 173, 69, 0.45) transparent;
  padding: 0.4rem;
}

.giving-autocomplete-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  border: none;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: background-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.giving-autocomplete-item:hover,
.giving-autocomplete-item:focus {
  background: rgba(34, 211, 238, 0.14);
  outline: none;
}

.giving-autocomplete-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(215, 173, 69, 0.2);
  color: var(--ce-gold, #d7ad45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.giving-autocomplete-text {
  flex: 1;
  min-width: 0;
}

.giving-autocomplete-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.giving-autocomplete-sub {
  font-size: 0.76rem;
  color: rgba(244, 248, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.giving-autocomplete-loading,
.giving-autocomplete-empty {
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: rgba(244, 248, 255, 0.6);
  text-align: center;
}

.giving-autofill-notice {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  margin-top: 0.35rem;
  animation: fadeIn 0.25s ease;
}

.giving-saved-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(215, 173, 69, 0.08);
  border: 1px dashed rgba(215, 173, 69, 0.35);
  border-radius: 0.75rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1.25rem;
}

.giving-saved-profile-text {
  font-size: 0.82rem;
  color: rgba(244, 248, 255, 0.85);
}

.giving-saved-profile-text strong {
  color: var(--ce-gold, #d7ad45);
}

.giving-saved-profile-btn {
  background: rgba(215, 173, 69, 0.2);
  border: 1px solid rgba(215, 173, 69, 0.4);
  color: var(--ce-gold, #d7ad45);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 0.4rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.giving-saved-profile-btn:hover {
  background: var(--ce-gold, #d7ad45);
  color: #071326;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}