/**
 * Premium Wallet Modal Enhancements
 *
 * First impression matters - this modal is the first thing users see.
 * Premium design with enhanced typography, animations, and visual polish.
 */

/* ===== Premium Modal Container ===== */
.wallet-modal {
  /* Ensure modal is visible when displayed */
  z-index: 10000 !important;
}

.wallet-modal-content {
  position: relative;
  animation: modalFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 100px rgba(16, 185, 129, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== Premium Overlay ===== */
.wallet-modal-overlay {
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  animation: overlayFadeIn 0.3s ease-out;
}

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

/* ===== Premium Header ===== */
.wallet-modal-header {
  position: relative;
  padding: 28px 32px !important;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.04) 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  overflow: hidden;
}

.wallet-modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--dx-emerald) 50%,
    transparent 100%);
  opacity: 0.6;
}

html.light .wallet-modal-header {
  background: linear-gradient(180deg,
    #ffffff 0%,
    #f8fafc 50%,
    #f1f5f9 100%) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

html.light .wallet-modal-header::before {
  background: linear-gradient(90deg,
    transparent 0%,
    var(--dx-emerald) 50%,
    transparent 100%);
  opacity: 0.3;
}

/* ===== Premium Title Typography ===== */
.wallet-modal-title {
  font-size: 24px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.3 !important;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 8px 0 !important;
  position: relative;
}

html.light .wallet-modal-title {
  background: linear-gradient(135deg,
    #0f172a 0%,
    #1e293b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Premium Subtitle ===== */
.wallet-modal-subtitle {
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.light .wallet-modal-subtitle {
  color: #64748b !important;
}

/* ===== Premium Close Button ===== */
.wallet-modal-close {
  width: 36px !important;
  height: 36px !important;
  border-radius: 8px !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.wallet-modal-close::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 70%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.wallet-modal-close:hover::before {
  opacity: 1;
}

.wallet-modal-close:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  transform: scale(1.05);
}

.wallet-modal-close:active {
  transform: scale(0.95);
}

html.light .wallet-modal-close:hover {
  background: #e2e8f0 !important;
}

/* ===== Premium Wallet Options ===== */
.wallet-modal-body {
  padding: 16px !important;
}

.wallet-option {
  position: relative;
  padding: 20px !important;
  margin-bottom: 12px !important;
  border-radius: 16px !important;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(255, 255, 255, 0.02) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
  cursor: pointer;
}

.wallet-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(16, 185, 129, 0.1) 0%,
    transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.wallet-option::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%);
  transition: left 0.5s ease;
  pointer-events: none;
}

.wallet-option:hover {
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%) !important;
  border-color: var(--dx-emerald) !important;
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow:
    0 8px 24px rgba(16, 185, 129, 0.25),
    0 0 0 1px rgba(16, 185, 129, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.wallet-option:hover::before {
  opacity: 1;
}

.wallet-option:hover::after {
  left: 100%;
}

.wallet-option:active {
  transform: translateY(0) scale(0.99) !important;
}

html.light .wallet-option {
  background: linear-gradient(135deg,
    #ffffff 0%,
    #f8fafc 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

html.light .wallet-option:hover {
  background: linear-gradient(135deg,
    #f8fafc 0%,
    #f1f5f9 100%) !important;
  border-color: var(--dx-emerald) !important;
  box-shadow:
    0 8px 24px rgba(16, 185, 129, 0.2),
    0 0 0 1px rgba(16, 185, 129, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* ===== Premium Wallet Logo Container ===== */
.wallet-option-logo {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wallet-option-logo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center,
    rgba(16, 185, 129, 0.2) 0%,
    transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wallet-option:hover .wallet-option-logo {
  transform: scale(1.05);
  box-shadow:
    0 6px 16px rgba(16, 185, 129, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.wallet-option:hover .wallet-option-logo::before {
  opacity: 1;
}

html.light .wallet-option-logo {
  background: linear-gradient(135deg,
    #f8fafc 0%,
    #f1f5f9 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

html.light .wallet-option:hover .wallet-option-logo {
  box-shadow:
    0 6px 16px rgba(16, 185, 129, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}

/* ===== Premium Typography for Wallet Names ===== */
.wallet-option-name {
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  line-height: 1.4 !important;
  color: rgba(255, 255, 255, 0.95) !important;
  transition: color 0.2s ease;
}

.wallet-option:hover .wallet-option-name {
  color: rgb(255, 255, 255) !important;
}

html.light .wallet-option-name {
  color: #0f172a !important;
  font-weight: 600 !important;
}

html.light .wallet-option:hover .wallet-option-name {
  color: #0f172a !important;
}

/* ===== Premium Typography for Descriptions ===== */
.wallet-option-desc {
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0.01em !important;
  line-height: 1.5 !important;
  color: rgba(255, 255, 255, 0.7) !important;
  margin-top: 2px !important;
  transition: color 0.2s ease;
}

.wallet-option:hover .wallet-option-desc {
  color: rgba(255, 255, 255, 0.85) !important;
}

html.light .wallet-option-desc {
  color: #475569 !important;
  font-weight: 400 !important;
}

html.light .wallet-option:hover .wallet-option-desc {
  color: #334155 !important;
}

/* ===== Premium Footer ===== */
.wallet-modal-footer {
  padding: 20px 32px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.01) 100%) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.wallet-modal-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%);
}

.wallet-modal-footer:hover {
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.03) 100%) !important;
  transform: translateY(-1px);
}

.wallet-modal-more {
  font-size: 14px !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.2s ease;
}

.wallet-modal-footer:hover .wallet-modal-more {
  color: rgba(255, 255, 255, 0.95) !important;
}

.wallet-modal-footer svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wallet-modal-footer:hover svg {
  transform: translateY(2px);
}

html.light .wallet-modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
  background: linear-gradient(180deg,
    #f8fafc 0%,
    #ffffff 100%) !important;
}

html.light .wallet-modal-footer::before {
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.05) 50%,
    transparent 100%);
}

html.light .wallet-modal-footer:hover {
  background: linear-gradient(180deg,
    #e2e8f0 0%,
    #f1f5f9 100%) !important;
}

html.light .wallet-modal-more {
  color: #475569 !important;
  font-weight: 500 !important;
}

html.light .wallet-modal-footer:hover .wallet-modal-more {
  color: #0f172a !important;
}

/* ===== Premium Scrollbar for Modal Body ===== */
.wallet-modal-body::-webkit-scrollbar {
  width: 6px;
}

.wallet-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.wallet-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: background 0.2s ease;
}

.wallet-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

html.light .wallet-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}

html.light .wallet-modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* ===== Responsive Enhancements ===== */
@media (max-width: 480px) {
  .wallet-modal-content {
    max-width: calc(100% - 32px) !important;
    margin: 16px !important;
  }

  .wallet-modal-header {
    padding: 24px 20px !important;
  }

  .wallet-modal-title {
    font-size: 20px !important;
  }

  .wallet-option {
    padding: 18px !important;
  }

  .wallet-option-logo {
    width: 44px !important;
    height: 44px !important;
  }
}

/* ===== Premium Entrance Animation for Options ===== */
.wallet-option {
  animation: optionSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.wallet-option:nth-child(1) { animation-delay: 0.05s; }
.wallet-option:nth-child(2) { animation-delay: 0.1s; }
.wallet-option:nth-child(3) { animation-delay: 0.15s; }
.wallet-option:nth-child(4) { animation-delay: 0.2s; }
.wallet-option:nth-child(5) { animation-delay: 0.25s; }
.wallet-option:nth-child(6) { animation-delay: 0.3s; }

@keyframes optionSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

