/* Event Form Embed Styles */
:root {
  --efe-primary: #BD2135;
  --efe-black: #000000;
  --efe-white: #FFFFFF;
  --efe-gray: #F5F5F5;
  --efe-border: #E2E8F0;
  --efe-light-red: rgba(189, 33, 53, 0.1);
  --efe-success: #16a34a;
}

/* Base form styles */
.efe-container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--efe-white);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  width: 100%;
  max-width: 32rem;
  margin: 2rem auto;
  position: relative;
}

/* Event Summary Styles */
.efe-event-summary {
  padding: 2rem;
  border-bottom: 1px solid var(--efe-border);
  text-align: center;
}

.efe-event-summary h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--efe-black);
  margin: 0 0 0.5rem 0;
}

.efe-event-summary h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--efe-primary);
  margin: 0 0 0.25rem 0;
}

.efe-event-summary h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--efe-black);
  margin: 0;
}

/* Form sections */
.efe-form-section {
  padding: 2rem;
}

.efe-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--efe-black);
  margin: 0 0 1.5rem 0;
}

.efe-form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.efe-form-row .efe-form-group {
  flex: 1;
}

.efe-form-group {
  margin-bottom: 1.5rem;
}

.efe-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--efe-black);
  margin-bottom: 0.5rem;
}

.efe-form-label.required:after {
  content: " *";
  color: var(--efe-primary);
}

.efe-form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--efe-border);
  border-radius: 6px;
  font-size: 0.875rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.efe-form-control:focus {
  outline: none;
  border-color: var(--efe-primary);
  box-shadow: 0 0 0 3px var(--efe-light-red);
}

.efe-form-control.error {
  border-color: var(--efe-primary);
}

.efe-error-message {
  color: var(--efe-primary);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.efe-form-control.error + .efe-error-message {
  display: block;
}

/* Address Autocomplete Styles */
.efe-address-container {
  position: relative;
}

.efe-address-toggle {
  text-align: right;
  margin-bottom: 1rem;
}

.efe-address-toggle button {
  background: none;
  border: none;
  color: var(--efe-primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
}

.efe-address-toggle button:hover {
  text-decoration: none;
}

.efe-address-toggle button:focus {
  outline: 2px solid var(--efe-primary);
  outline-offset: 2px;
}

.efe-address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--efe-white);
  border: 1px solid var(--efe-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.efe-address-suggestion {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid var(--efe-border);
  transition: background-color 0.15s;
}

.efe-address-suggestion:last-child {
  border-bottom: none;
}

.efe-address-suggestion:hover,
.efe-address-suggestion.highlighted {
  background-color: var(--efe-gray);
}

.efe-address-suggestion.selected {
  background-color: var(--efe-light-red);
  color: var(--efe-primary);
}

.efe-manual-address {
  display: none;
}

.efe-manual-address.visible {
  display: block;
}

.efe-address-loading {
  padding: 0.75rem;
  text-align: center;
  color: #666;
  font-style: italic;
}

.efe-address-error {
  padding: 0.75rem;
  text-align: center;
  color: var(--efe-primary);
  font-size: 0.875rem;
}

/* Radio groups */
.efe-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.efe-radio-label {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--efe-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.efe-radio-label:hover {
  background-color: var(--efe-gray);
  border-color: var(--efe-primary);
}

.efe-radio-label input[type="radio"] {
  margin-right: 0.75rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--efe-primary);
}

/* Multi-select */
.efe-multi-select {
  min-height: 120px;
  padding: 8px;
}

.efe-multi-select option {
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: 4px;
  cursor: pointer;
}

.efe-multi-select option:checked {
  background: linear-gradient(0deg, var(--efe-light-red), var(--efe-light-red));
  color: var(--efe-primary);
  font-weight: 500;
}

.efe-multi-select option:hover {
  background-color: rgba(189, 33, 53, 0.05);
}

/* Conditional fields */
.efe-conditional-field {
  display: none;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--efe-primary);
}

.efe-conditional-field.visible {
  display: block;
  animation: efe-slideDown 0.3s ease;
}

/* Buttons */
.efe-button {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.875rem;
}

.efe-button-primary {
  background: var(--efe-primary);
  color: var(--efe-white);
}

.efe-button-primary:hover:not(:disabled) {
  background: #9C1B2B;
}

.efe-button-secondary {
  background: var(--efe-gray);
  color: var(--efe-black);
  border: 1px solid var(--efe-border);
}

.efe-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form navigation */
.efe-form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--efe-border);
}

.efe-submit-button {
  width: 100%;
}

/* Animations */
@keyframes efe-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes efe-slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 640px) {
  .efe-container {
    margin: 1rem;
    max-width: none;
  }
  
  .efe-form-row {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .efe-form-section {
    padding: 1rem;
  }
  
  .efe-event-summary {
    padding: 1rem;
  }
  
  .efe-multi-select {
    min-height: 150px;
  }
}

/* Focus visible styles for accessibility */
.efe-form-control:focus-visible {
  outline: 2px solid var(--efe-primary);
  outline-offset: 2px;
}

.efe-button:focus-visible {
  outline: 2px solid var(--efe-primary);
  outline-offset: 2px;
}

/* Screen reader only content */
.efe-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Multi-step form styles */
.efe-card {
  background: var(--efe-white);
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  width: 100%;
  max-width: 32rem;
  margin: 2rem auto;
  position: relative;
}

.efe-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--efe-border);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.efe-progress-fill {
  height: 100%;
  background: var(--efe-primary);
  transition: width 0.3s ease;
}

.efe-progress-steps {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
}

.efe-step-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--efe-border);
}

.efe-step-indicator.active {
  background: var(--efe-primary);
}

.efe-step-indicator.completed {
  background: var(--efe-success);
}

.efe-form-section {
  display: none;
  animation: efe-fadeIn 0.5s ease;
  padding: 2rem;
}

.efe-form-section.active {
  display: block;
}

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

.efe-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.efe-radio-label {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--efe-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.efe-radio-label:hover {
  background-color: var(--efe-gray);
  border-color: var(--efe-primary);
}

.efe-radio-label input[type="radio"] {
  margin-right: 0.75rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--efe-primary);
}

.efe-conditional-field {
  display: none;
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--efe-primary);
}

.efe-conditional-field.visible {
  display: block;
  animation: efe-slideDown 0.3s ease;
}

@keyframes efe-slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.efe-nav-button {
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.efe-button-prev {
  background: var(--efe-gray);
  color: var(--efe-black);
  border: 1px solid var(--efe-border);
}

.efe-button-next, .efe-button-submit {
  background: var(--efe-primary);
  color: var(--efe-white);
  border: none;
}

.efe-button-next:hover, .efe-button-submit:hover {
  background: #9C1B2B;
}

.efe-button-submit {
  width: 100%;
}

/* Update form navigation for multi-step */
.efe-form-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0 2rem 2rem;
  border-top: 1px solid var(--efe-border);
}

/* Mobile styles for multi-step */
@media (max-width: 640px) {
  .efe-card {
    margin: 1rem;
    max-width: none;
  }
  
  .efe-form-section {
    padding: 1rem;
  }
  
  .efe-form-navigation {
    padding: 0 1rem 1rem;
  }
}

/* Payment-specific styles */
.efe-payment-container {
  padding: 1rem 0;
}

.efe-payment-summary {
  background: var(--efe-gray);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--efe-border);
}

.efe-payment-summary h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--efe-black);
}

.efe-payment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.efe-payment-item:last-child {
  margin-bottom: 0;
}

.efe-payment-description {
  color: var(--efe-black);
  font-size: 0.875rem;
}

.efe-payment-amount {
  font-weight: 600;
  color: var(--efe-black);
  font-size: 0.875rem;
}

.efe-payment-fees {
  border-top: 1px solid var(--efe-border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.efe-payment-fees .efe-payment-description {
  color: #6b7280;
  font-style: italic;
}

.efe-payment-fees .efe-payment-amount {
  color: #6b7280;
}

.efe-payment-total {
  border-top: 2px solid var(--efe-primary);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.efe-payment-total .efe-payment-description {
  font-size: 1rem;
}

.efe-payment-total .efe-payment-amount {
  font-size: 1.125rem;
  color: var(--efe-primary);
}

/* Checkbox styles */
.efe-checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s;
}

.efe-checkbox-container:hover {
  background: var(--efe-light-red);
}

.efe-checkbox-container input[type="checkbox"] {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--efe-border);
  border-radius: 4px;
  background: var(--efe-white);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}

.efe-checkbox-container input[type="checkbox"]:checked {
  background: var(--efe-primary);
  border-color: var(--efe-primary);
}

.efe-checkbox-container input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--efe-white);
  font-size: 0.875rem;
  font-weight: 700;
}

.efe-checkbox-container input[type="checkbox"]:focus {
  outline: 2px solid var(--efe-primary);
  outline-offset: 2px;
}

.efe-checkbox-label {
  font-weight: 500;
  color: var(--efe-black);
  line-height: 1.4;
}

/* Payment methods */
.efe-payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.efe-payment-method {
  cursor: pointer;
  position: relative;
  display: block;
}

.efe-payment-method input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.efe-payment-method-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.75rem;
  border: 2px solid var(--efe-border);
  border-radius: 8px;
  background: var(--efe-white);
  text-align: center;
  transition: all 0.2s;
  min-height: 100px;
  justify-content: center;
}

.efe-payment-method:hover .efe-payment-method-card {
  border-color: var(--efe-primary);
  background: var(--efe-light-red);
}

.efe-payment-method input[type="radio"]:checked + .efe-payment-method-card {
  border-color: var(--efe-primary);
  background: var(--efe-primary);
  color: var(--efe-white);
}

.efe-payment-method input[type="radio"]:checked + .efe-payment-method-card small {
  color: var(--efe-white);
  opacity: 0.9;
}

.efe-payment-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.efe-payment-method-card span {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.efe-payment-method-card small {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.2;
}

.efe-payment-notice {
  text-align: center;
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid var(--efe-border);
}

.efe-payment-notice p {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: #64748b;
}

.efe-payment-secure {
  font-size: 0.75rem;
  color: var(--efe-success);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

/* Responsive payment styles */
@media (max-width: 48rem) {
  .efe-payment-methods {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .efe-payment-method-card {
    flex-direction: row;
    text-align: left;
    min-height: auto;
    padding: 0.75rem;
  }
  
  .efe-payment-icon {
    font-size: 1.25rem;
    margin-bottom: 0;
    margin-right: 0.5rem;
  }
  
  .efe-payment-method-card > div {
    flex: 1;
  }
}

/* Donation Popup Theme Integration for Payment Step */
.dp-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(189,33,53,0.10), 0 1px 6px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
}

.dp-title {
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.dp-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #222;
}

.dp-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dp-summary .dp-total {
  font-weight: 800;
  font-size: 24px;
  color: var(--efe-primary);
}

/* Checkbox styling to match donation popup */
.dp-checkbox-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}

.dp-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: .2s;
  position: relative;
}

.dp-checkbox:checked {
  background: var(--efe-primary);
  border-color: var(--efe-primary);
}

.dp-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.dp-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(189,33,53,.25);
}

/* Payment method grid layout */
.dp-payment-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
  justify-items: center;
  margin-bottom: 16px;
}

.dp-payment-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  min-width: 140px;
  max-width: 160px;
  min-height: 120px;
  text-align: center;
  border-radius: 16px !important;
  transition: .3s all ease;
  justify-content: center;
  border: 1.5px solid #d4d4d4;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 16px;
}

.dp-payment-chip:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(189,33,53,.2);
}

.dp-payment-chip img, .dp-payment-chip svg {
  margin-bottom: 6px;
}

.dp-payment-chip span {
  font-weight: 600;
  font-size: 14px;
}

.dp-payment-chip small {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.8;
  margin-top: 2px;
}

.dp-payment-chip.selected {
  background: var(--efe-primary);
  border-color: var(--efe-primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(189,33,53,.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(189,33,53,.4);
}

/* Icon color inversion when payment method is selected */
.dp-payment-chip.selected img {
  filter: invert(1);
}

.dp-payment-chip.selected svg .wallet-svg-main {
  fill: #fff;
  stroke: #fff;
}

.dp-payment-chip.selected svg .wallet-svg-circle {
  fill: var(--efe-primary);
}

.dp-payment-chip.selected svg .wallet-svg-bar {
  fill: var(--efe-primary);
}

/* Keep original wallet explainer text color when selected */
.dp-payment-chip.selected .dp-wallet-explainer {
  color: #fff;
}

/* Wallet explainer text */
.dp-wallet-explainer {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
  text-align: center;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

/* Fee checkbox positioning */
.dp-fee-checkbox-container {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Total display styling */
.dp-total-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dp-total-amount {
  font-size: 18px;
  font-weight: 700;
  color: #000000;
  flex: 1;
  text-align: center;
  margin-right: 16px;
}

.dp-trust {
  text-align: center;
  font-size: 12px;
  color: #555;
  margin-top: 6px;
}

/* Responsive adjustments for payment methods */
@media (max-width: 600px) {
  .dp-payment-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .dp-payment-chip {
    min-width: 100%;
    max-width: 100%;
    min-height: 100px;
    padding: 12px 16px;
  }
}

@media (max-width: 400px) {
  .dp-payment-chip {
    min-width: 100%;
    max-width: 100%;
    min-height: 90px;
    padding: 8px 12px;
  }
}