/* Profile Dropdown Styles */

.profile-dropdown {
  position: relative;
  display: inline-block;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-card);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.profile-trigger:hover {
  border-color: var(--border-gold);
  background: var(--bg-secondary);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.avatar-icon {
  color: var(--text-dark);
  font-size: 0.9rem;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-name {
  color: var(--text-primary);
  font-weight: bold;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-chevron {
  color: var(--text-muted);
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.profile-trigger.active .profile-chevron {
  transform: rotate(180deg);
}

/* Profile Menu */
.profile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 8px 24px var(--shadow-heavy);
  min-width: 300px;
  max-width: 350px;
  z-index: 1000;
  animation: profileMenuSlideIn 0.3s ease-out;
}

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

.profile-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border-secondary);
}

.profile-section:last-child {
  border-bottom: none;
}

/* Profile Edit Section */
.profile-edit label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.name-edit-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.name-edit-group input {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-secondary);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.name-edit-group input:focus {
  outline: none;
  border-color: var(--border-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Wallet Info Section */
.wallet-info label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.address-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  border: 1px solid var(--border-secondary);
}

.wallet-address {
  flex: 1;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  word-break: break-all;
  line-height: 1.2;
}

.balance-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.balance-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.balance-amount {
  color: var(--text-gold);
  font-weight: bold;
  font-size: 0.9rem;
}

/* Withdraw Section */
.withdraw-section label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.withdraw-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.withdraw-group input {
  padding: 0.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--border-secondary);
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.withdraw-group input:focus {
  outline: none;
  border-color: var(--border-gold);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.withdraw-group input[type="text"] {
  text-transform: none;
  font-family: monospace;
  font-size: 0.8rem;
}

.withdraw-group input::placeholder {
  color: var(--text-muted);
}

/* Profile Actions */
.profile-actions {
  padding: 0.75rem 1rem;
}

/* Loading and Error States */
.profile-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.profile-success {
  color: var(--success);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .profile-trigger {
    min-width: 100px;
    padding: 0.4rem 0.6rem;
    gap: 0.4rem;
  }
  
  .profile-menu {
    min-width: 280px;
    max-width: 300px;
    right: -20px;
  }
  
  .profile-avatar {
    width: 24px;
    height: 24px;
  }
  
  .avatar-icon {
    font-size: 0.8rem;
  }
  
  .profile-name {
    font-size: 0.8rem;
  }
  
  .profile-chevron {
    font-size: 0.6rem;
  }
  
  .withdraw-group {
    gap: 0.4rem;
  }
  
  .name-edit-group {
    flex-direction: column;
    align-items: stretch;
  }
  
  .name-edit-group .btn {
    margin-top: 0.25rem;
  }
}

@media (max-width: 480px) {
  .profile-menu {
    left: 0;
    right: 0;
    margin-left: -50px;
    margin-right: -50px;
    min-width: auto;
    max-width: none;
  }
  
  .profile-trigger {
    min-width: 140px;
  }
  
  .address-display {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }
  
  .wallet-address {
    text-align: center;
    font-size: 0.7rem;
  }
}