/* =============================================
   LET'S TRADE — App-Specific Styles
   ============================================= */

/* ---- Onboarding ---- */
.onboarding-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
  background: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
}

.onboarding-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.onboarding-slide {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px var(--space-xl) var(--space-xl);
  min-height: 100%;
  text-align: center;
  animation: fadeInScreen 0.4s ease forwards;
}
.onboarding-slide.active {
  display: flex;
}

.onboard-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 220px;
}

.onboard-illustration {
  position: relative;
  width: 240px;
  height: 240px;
}

/* Orbit animation */
.ob-orbit {
  position: absolute;
  inset: 20px;
  border: 1.5px dashed rgba(201, 106, 25, 0.25);
  border-radius: 50%;
  animation: spin 10s linear infinite;
}
.ob-orbit-2 {
  inset: 0;
  animation-duration: 14s;
  animation-direction: reverse;
  border-color: rgba(255, 140, 50, 0.15);
}
.ob-orbit-3 {
  inset: 40px;
  animation-duration: 7s;
  border-color: rgba(201, 106, 25, 0.1);
}

.ob-coin {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
}
.ob-coin.btc {
  background: linear-gradient(135deg, #f7931a, #ffb347);
}
.ob-coin.eth {
  background: linear-gradient(135deg, #627eea, #a78bfa);
}
.ob-coin.usdt {
  background: linear-gradient(135deg, #26a17b, #34d399);
}

.ob-center-glow {
  position: absolute;
  inset: 60px;
  background: radial-gradient(circle, var(--orange-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}

/* Slide 2 icons */
.ob-shield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  color: var(--orange-accent);
  animation: float 3s ease-in-out infinite;
}
.ob-wallet-icon {
  position: absolute;
  bottom: 20px;
  left: 30px;
  font-size: 36px;
  color: var(--green);
  animation: float 3s ease-in-out infinite 0.5s;
}
.ob-lock-icon {
  position: absolute;
  bottom: 20px;
  right: 30px;
  font-size: 32px;
  color: var(--blue);
  animation: float 3s ease-in-out infinite 1s;
}

/* Slide 3 */
.ob-chart-icon {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  background: linear-gradient(
    135deg,
    var(--orange-primary),
    var(--orange-accent)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: float 3s ease-in-out infinite;
}
.ob-growth {
  position: absolute;
  bottom: 30px;
  right: 20px;
  background: linear-gradient(
    135deg,
    var(--orange-primary),
    var(--orange-accent)
  );
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-weight: 900;
  font-size: 18px;
  color: #fff;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

.onboard-text {
  padding: 0 8px;
}
.onboard-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}
.onboard-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.ob-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--bg-tertiary);
  transition: all 0.3s;
  cursor: pointer;
}
.ob-dot.active {
  width: 28px;
  background: var(--orange-accent);
}

.ob-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px var(--space-xl)
    calc(var(--space-xl) + env(safe-area-inset-bottom));
}

/* ---- Auth ---- */
.auth-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 0;
}

.auth-header {
  background: linear-gradient(
    180deg,
    rgba(201, 106, 25, 0.1) 0%,
    transparent 100%
  );
  padding: 48px var(--space-xl) var(--space-xl);
  text-align: center;
}

.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--orange-primary),
    var(--orange-accent)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: var(--shadow-orange);
  margin-bottom: 16px;
  animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-logo h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff, var(--orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-logo p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

.auth-body {
  flex: 1;
  padding: var(--space-xl) var(--space-xl)
    calc(var(--space-xl) + env(safe-area-inset-bottom));
}

.auth-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* ---- OTP Inputs ---- */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.otp-input {
  width: 48px;
  height: 56px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-normal);
  caret-color: var(--orange-accent);
}
.otp-input:focus {
  border-color: var(--orange-accent);
  background: var(--bg-secondary);
  box-shadow: 0 0 0 3px var(--orange-glow);
}
.otp-input.filled {
  border-color: var(--orange-primary);
  color: var(--orange-accent);
}

/* ---- Profile Menu ---- */
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.profile-menu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-menu-item:active {
  opacity: 0.7;
}

.profile-menu-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.profile-menu-info {
  flex: 1;
}

/* ---- Settings Rows ---- */
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child {
  border-bottom: none;
}
.setting-info {
  flex: 1;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-tertiary);
  border-radius: 99px;
  transition: background 0.3s;
  cursor: pointer;
}
.toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--orange-primary);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

/* ---- Coin Selector Grid ---- */
.coin-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.coin-selector-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
}
.coin-selector-item:hover {
  border-color: var(--orange-primary);
  background: var(--orange-glow);
}
.coin-selector-item.selected {
  border-color: var(--orange-accent);
  background: var(--orange-glow);
}
.coin-selector-item .coin-icon {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.coin-selector-item span {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

/* ---- Wallet Cards ---- */
.wallet-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: 12px;
  transition: border-color var(--transition-normal);
}
.wallet-card:hover {
  border-color: var(--border-hover);
}
.wallet-address {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  margin: 8px 0;
  line-height: 1.6;
}

/* Copy Button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--orange-glow);
  border: 1px solid var(--orange-primary);
  border-radius: var(--radius-pill);
  color: var(--orange-accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.copy-btn:hover {
  background: var(--orange-primary);
  color: #fff;
}
.copy-btn.copied {
  background: var(--green-bg);
  border-color: var(--green);
  color: var(--green);
}

/* ---- Filter Tabs ---- */
.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-tertiary);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.filter-tab.active {
  background: var(--orange-glow);
  border-color: var(--orange-primary);
  color: var(--orange-accent);
  font-weight: 600;
}

/* ---- File Upload Box ---- */
.file-upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.file-upload-box:hover {
  border-color: var(--orange-primary);
  background: var(--orange-glow);
}
.file-upload-box.has-file {
  border-color: var(--green);
  border-style: solid;
}

/* ---- Notification Items ---- */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
  border-radius: var(--radius-md);
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item.unread {
  background: rgba(201, 106, 25, 0.04);
  padding-left: 8px;
  padding-right: 8px;
}
.notif-item:hover {
  background: var(--bg-hover);
  padding-left: 8px;
  padding-right: 8px;
}

.notif-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.notif-body {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.notif-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.notif-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange-accent);
  flex-shrink: 0;
  margin-top: 6px;
}

/* ---- Admin Panel ---- */
.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
}
.admin-stat-value {
  font-size: 28px;
  font-weight: 800;
}
.admin-stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.admin-stat-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.admin-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: var(--bg-hover);
}

/* =============================================
   WAITING FOR PAYMENT SCREEN
   ============================================= */
.wp-status-banner {
  border-radius: var(--radius-xl);
  background: linear-gradient(
    135deg,
    var(--orange-primary),
    var(--orange-accent)
  );
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  margin-bottom: var(--space-lg);
  box-shadow: 0 8px 32px rgba(201, 106, 25, 0.25);
}
.wp-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  width: 64px;
  height: 64px;
}
.wp-status-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}
.wp-status-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* =============================================
   TRADE ANNOUNCEMENT POPUP (5-second)
   ============================================= */
.trade-announcement {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.trade-announcement.hidden {
  display: none;
}
.trade-announcement.ta-visible {
  display: block;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.trade-announcement.ta-hiding {
  transform: translateX(-50%) translateY(-120%);
  pointer-events: none;
}
.trade-announcement-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 14px 16px 6px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.ta-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.ta-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}
.ta-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ta-msg {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ta-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
}
.ta-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--orange-primary),
    var(--orange-accent)
  );
  width: 100%;
  transform-origin: left;
}

/* ============================================================
   NETWORK FEATURES — Mobile-first touch styles
   ============================================================ */

/* ---- Buy: network select ---- */
#buy-wallet-network {
  /* Larger touch target on mobile */
  min-height: 48px;
  font-size: 14px;
  padding: 12px 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#buy-wallet-network:focus {
  border-color: var(--orange-accent);
  box-shadow: 0 0 0 3px rgba(201, 106, 25, 0.18);
  outline: none;
}

/* ---- Buy: network hint ---- */
#buy-network-hint {
  font-size: 12px;
  line-height: 1.5;
  transition: color 0.2s;
}

/* ---- Buy: address validation message ---- */
#buy-wallet-match-msg {
  min-height: 20px;
  font-size: 12px;
  line-height: 1.5;
  padding: 0 2px;
}

/* ---- Buy: tag / memo group ---- */
#buy-wallet-tag-group {
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
}
#buy-wallet-tag {
  font-family: monospace;
  font-size: 14px;
  letter-spacing: 0.3px;
}

/* ---- Buy: wallet address textarea ---- */
#buy-wallet-addr {
  font-family: monospace;
  font-size: 13px;
  letter-spacing: 0.3px;
  line-height: 1.6;
}

/* ---- Sell: network pill ---- */
#sell-network-pill {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.1s;
  will-change: transform;
}
#sell-network-pill:active {
  transform: scale(0.98);
  background: rgba(249, 115, 22, 0.08) !important;
}

/* ---- Sell: wallet address ---- */
#sell-wallet-addr {
  word-break: break-all;
  font-size: 13px;
  font-family: monospace;
  line-height: 1.6;
  color: #fff;
}

/* ---- Sell: wallet card ---- */
#sell-wallet-card {
  border-radius: 14px;
}

/* ---- Admin: network input wrapper ---- */
#wallet-network-input {
  font-size: 14px;
  padding-right: 44px; /* space for chevron button */
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
#wallet-network-input:focus {
  border-color: var(--primary);
  outline: none;
}
#net-toggle-btn {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---- Admin: network dropdown ---- */
#wallet-network-dropdown {
  /* scrollbar style */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
#wallet-network-dropdown::-webkit-scrollbar {
  width: 4px;
}
#wallet-network-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
#wallet-network-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* ---- General: all input-field selects — bigger touch target ---- */
select.input-field {
  min-height: 48px;
  font-size: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* Remove default arrow on iOS */
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
select.input-field:focus {
  border-color: var(--orange-accent);
  box-shadow: 0 0 0 3px rgba(201, 106, 25, 0.18);
  outline: none;
}

/* ---- General: all input-field and textarea — better mobile ---- */
.input-field {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.input-field:focus {
  border-color: var(--orange-accent);
  box-shadow: 0 0 0 3px rgba(201, 106, 25, 0.15);
  outline: none;
}

/* ---- Checkbox — bigger tap area ---- */
input[type="checkbox"].input-field,
input[type="checkbox"] {
  min-width: 18px;
  min-height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Mobile responsive tweaks ---- */
@media (max-width: 480px) {
  #buy-wallet-addr {
    font-size: 12px;
  }
  #buy-wallet-tag {
    font-size: 13px;
  }
  #sell-wallet-addr {
    font-size: 12px;
  }
  .coin-selector-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  #sell-network-pill {
    padding: 12px 14px;
  }
  #buy-wallet-network {
    font-size: 13px;
  }
  select.input-field {
    font-size: 13px;
  }
}
