.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
}

.modal-content {
  background-color: var(--brown-light);
  border: 2px solid var(--gold);
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  margin: 10% auto;
  padding: 2rem;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: var(--gold);
  cursor: pointer;
}

.stripe-btn {
  background-color: var(--gold);
  color: var(--brown-dark);
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 1rem;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.stripe-btn:hover {
  background-color: var(--gold-light);
}

.commission-info {
  background-color: rgba(212, 175, 55, 0.1);
  border-left: 4px solid var(--gold);
  padding: 1rem;
  margin: 1rem 0;
}

.commission-info p {
  margin: 0.5rem 0;
  color: var(--gold-light);
}

.help-text {
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-top: 0.5rem;
}

.payment-setup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  text-decoration: none;
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.payment-setup-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.88);
  color: var(--gold-light);
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  border-radius: 6px;
}

.btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* Payment modal specific styles */
.payment-modal-content {
  background-color: var(--brown-light);
  border: 2px solid var(--gold);
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1.5rem;
  color: var(--gold-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.payment-modal-header {
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.payment-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--gold);
}

.payment-modal-body {
  margin-bottom: 1.5rem;
}

.payment-modal-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

/* .setup-payment-btn: default slim outline — PayPal modal overrides below */
.setup-payment-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  background: transparent;
  color: var(--gold-light);
  border: 1.5px solid rgba(255, 215, 0, 0.55);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.setup-payment-btn:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.88);
  color: var(--gold-light);
}

.skip-setup-link {
  color: var(--gold-light);
  text-decoration: none;
  align-self: center;
  flex: 1;
  text-align: center;
}

.skip-setup-link:hover {
  text-decoration: underline;
}

.payment-tabs {
  display: flex;
  justify-content: space-between;
  margin: 1rem 0;
}

.payment-tab {
  flex: 1;
  padding: 0.8rem;
  text-align: center;
  border: 1px solid var(--gold);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.payment-tab.active {
  background-color: var(--gold);
  color: var(--brown-dark);
}

.payment-tab:hover {
  background-color: var(--gold-light);
}

.benefits-list {
  margin: 1rem 0;
  padding: 0 1rem;
}

.benefits-list h4 {
  margin-bottom: 0.5rem;
  color: var(--gold);
}

.payment-info-note {
  background-color: rgba(212, 175, 55, 0.1);
  border-left: 4px solid var(--gold);
  padding: 0.8rem;
  margin: 1rem 0;
  border-radius: 4px;
}

/* Redesigned payment setup modal styles */
.payment-modal-content {
  background-color: var(--brown-light);
  border: 2px solid var(--gold);
  border-radius: 8px;
  width: 95%;
  max-width: 500px;
  padding: 1.5rem;
  color: var(--gold-light);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  
  /* Fixed positioning to ensure proper centering */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.payment-modal-header {
  border-bottom: none;
  margin-bottom: 1rem;
  text-align: center;
}

.payment-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--gold);
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--gold-light);
  margin-top: 0.5rem;
}

.payment-modal-body {
  text-align: center;
}

.payment-options-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-option-card {
  background-color: var(--brown);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.3s;
}

.payment-option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.payment-option-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.payment-option-icon {
  font-size: 2rem;
  color: var(--gold);
  margin-right: 0.5rem;
}

.payment-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  color: var(--gold-light);
}

.payment-benefits li {
  margin-bottom: 0.5rem;
}

.cash-transaction-notice {
  background-color: var(--brown-dark);
  padding: 0.8rem;
  margin: 0.65rem 0 1rem 0;
  border-radius: 4px;
  border-left: 4px solid var(--gold);
  font-size: 0.9rem;
}

.cash-transaction-notice p {
  color: var(--gold-light);
  margin: 0;
}

.cash-transaction-notice strong {
  color: var(--gold);
}

.payment-option-divider {
  text-align: center;
  margin: 1rem 0;
}

.payment-option-divider span {
  background-color: var(--brown);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--gold);
  font-weight: bold;
}

.payment-info-note {
  background-color: rgba(212, 175, 55, 0.1);
  border-left: 4px solid var(--gold);
  padding: 0.8rem;
  margin: 1rem 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.payment-info-note i {
  color: var(--gold);
  font-size: 1.2rem;
}

/* Incomplete setup modal specific styles */
.incomplete-setup-illustration {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-align: center;
}

.incomplete-setup-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.incomplete-option {
  background-color: var(--brown);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.3s;
}

.incomplete-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.incomplete-option button {
  width: 100%;
}

/* Mobile-specific styles for payment modals */
@media screen and (max-width: 768px) {
  .payment-modal-content {
    width: 90%;
    max-width: 100%;
    margin: 10% auto;
    padding: 1rem;
  }
  
  .payment-modal-header h3 {
    font-size: 1.3rem;
  }
  
  .modal-subtitle {
    font-size: 0.85rem;
  }
  
  .benefits-list {
    padding: 0;
    font-size: 0.9rem;
  }
  
  .payment-info-note {
    padding: 0.6rem;
    flex-direction: column;
    text-align: center;
    font-size: 0.9rem;
  }
  
  #paypal-setup-modal #paypal-connect-form .setup-payment-btn {
    padding: 0.4rem 0.85rem !important;
    font-size: 0.9rem !important;
  }
  
  .incomplete-option {
    padding: 1rem;
  }
  
  .incomplete-setup-illustration {
    font-size: 2rem;
  }
  
  .checkmark-list li {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
  }
  
  .close-modal {
    top: 5px;
    right: 10px;
  }
}

/* Even smaller screens */
@media screen and (max-width: 480px) {
  .payment-modal-content {
    width: 95%;
    padding: 0.8rem;
    margin: 15% auto;
  }
  
  .payment-modal-header h3 {
    font-size: 1.2rem;
  }
  
  #paypal-setup-modal #paypal-connect-form .setup-payment-btn {
    padding: 0.38rem 0.75rem !important;
    font-size: 0.88rem !important;
  }
  
  .benefits-list h4 {
    font-size: 1rem;
  }
  
  .modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }
  
  .checkmark-list li {
    font-size: 0.85rem;
  }
}

/* PayPal account setup modal - Improved sizing so it fits the screen better */
#paypal-setup-modal .payment-modal-content {
  width: 80%; /* Reduced width */
  max-width: 400px; /* Smaller max-width */
  padding: 1rem; /* Reduced padding */
  max-height: 80vh; /* Maximum height relative to viewport height */
  overflow-y: auto; /* Add scrolling if content is too tall */
  
  /* Proper centering */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

#paypal-setup-modal .payment-modal-header h3 {
  font-size: 1.2rem; /* Smaller header font */
}

#paypal-setup-modal .modal-subtitle {
  font-size: 0.85rem; /* Smaller subtitle */
}

#paypal-setup-modal .benefits-list {
  padding-left: 0.5rem;
}

#paypal-setup-modal .checkmark-list li {
  margin-bottom: 0.3rem;
  font-size: 0.85rem; /* Smaller text for list items */
}

#paypal-setup-modal .help-text {
  font-size: 0.8rem; /* Smaller help text */
}

#paypal-setup-modal .payment-info-note {
  padding: 0.5rem;
  margin: 0.5rem 0;
}

/* Improve form spacing */
#paypal-setup-modal #paypal-connect-form .form-group {
  margin-bottom: 0.6rem;
}

/* PayPal modal actions: same idea as listing-success — slim outline buttons, centered, not full-width bars */
#paypal-setup-modal #paypal-connect-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

#paypal-setup-modal #paypal-connect-form .setup-payment-btn {
  flex: 0 1 auto !important;
  width: auto !important;
  max-width: 15rem;
  min-width: 0 !important;
  min-height: 2.35rem;
  margin: 0 !important;
  padding: 0.4rem 0.95rem !important;
  font-size: 0.92rem !important;
  font-weight: 600;
  line-height: 1.3;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  color: var(--gold-light) !important;
  border: 1.5px solid rgba(255, 215, 0, 0.55) !important;
  border-radius: 6px;
  box-sizing: border-box;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

#paypal-setup-modal #paypal-connect-form .setup-payment-btn:hover {
  background: rgba(255, 215, 0, 0.1) !important;
  border-color: rgba(255, 215, 0, 0.9) !important;
  color: var(--gold-light) !important;
}

#paypal-setup-modal #paypal-connect-form .setup-payment-btn.btn-secondary {
  /* Same visual weight as primary in this modal */
  color: var(--gold-light) !important;
  border-color: rgba(255, 215, 0, 0.5) !important;
  background: transparent !important;
}
/* Mobile-specific styles for PayPal modal */
@media screen and (max-width: 768px) {
  #paypal-setup-modal .payment-modal-content {
    width: 85%;
    padding: 0.8rem;
    max-height: 85vh;
  }
}
