/* Wallet Connection Styles */

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Fallback for browsers that support scroll-padding */
}

/* Modal backdrop and overlay styles */
.wallet-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  backdrop-filter: blur(5px);
}

.wallet-modal-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Wallet connection button styles */
.wallet-connect-btn.connected {
  background-color: var(--ca-button);
  color: var(--ca-button-text);
  border: 1px solid var(--ca-highlight);
  position: relative;
  transition: all 0.3s ease;
  cursor: pointer;
}

.wallet-connect-btn.connected::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #2ecc71;
  border-radius: 50%;
  margin-right: 6px;
}

.wallet-connect-btn.connected:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wallet-connect-btn.connecting {
  background-color: var(--ca-button);
  color: var(--ca-button-text);
  opacity: 0.8;
  cursor: wait;
}

.wallet-connect-btn.wrong-network {
  background-color: #ff9800;
  color: #fff;
  border: none;
}

.wallet-connect-btn.wrong-network::before {
  content: "⚠️";
  margin-right: 4px;
}

/* Wallet modal animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-in-out forwards;
}

.animate-fadeOut {
  animation: fadeOut 0.3s ease-in-out forwards;
}

/* Wallet option hover effects */
.wallet-option {
  transition: all 0.2s ease-in-out;
}

.wallet-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Wallet connection states */
.connection-state {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.connection-state.disconnected {
  background-color: #f9f9f9;
  border: 1px solid #ddd;
}

.connection-state.connecting {
  background-color: #fff8e6;
  border: 1px solid #ffd166;
}

.connection-state.connected {
  background-color: #e6ffee;
  border: 1px solid #2ecc71;
}

.connection-state.error {
  background-color: #ffebee;
  border: 1px solid #ef5350;
}

.connection-state.wrong_network {
  background-color: #fff0f0;
  border: 1px solid #ff9800;
}

/* Loading spinner for wallet connection */
.spinner {
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top: 2px solid var(--ca-highlight);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 80px;
  right: 16px;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--ca-highlight);
  color: var(--ca-button);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  max-width: 300px;
}

/* Wallet details modal styles */
.wallet-details {
  background-color: var(--ca-main-bg);
  transition: all 0.3s ease;
}

.wallet-details:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.wallet-details img {
  object-fit: contain;
}

/* Full address display in modal */
.font-mono {
  font-family: monospace;
}

/* Disconnect button styles */
#disconnect-wallet {
  transition: all 0.2s ease;
}

#disconnect-wallet:hover {
  transform: translateY(-2px);
}

/* Disabled button styles */
a.disabled {
  cursor: not-allowed !important;
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}
