/*
Final CSS including all features and style adjustments.
*/
body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: #f4f6fb;
  margin: 0;
  padding: 0;
  color: #23334d;
}

.hidden {
  display: none !important;
}

.wallet-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wallet-label {
  color: #444;
  font-size: 1.1em;
  margin-bottom: 2px;
}

.wallet-total {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 2px;
}

.wallet-btc {
  color: #888;
  font-size: 1em;
}

.wallet-growth {
  color: #1ca01c;
  font-size: 1.1em;
  font-weight: 500;
  margin-bottom: 2px;
}

.wallet-header-bottom {
  display: flex;
  justify-content: space-between;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.wallet-header-left-icons,
.wallet-header-right-icons {
  display: flex;
  gap: 12px;
}

.icon-btn {
  background: none;
  border: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

.icon-btn:hover {
  background: #e6f3f7;
}

.icon-btn.active {
  border: 1.5px solid #2d3a57;
  background: #e0e7ff;
}

.material-symbols-outlined {
  font-size: 32px;
  font-variation-settings:
    'FILL' 0,
    'wght' 400,
    'GRAD' 0,
    'opsz' 28;
  vertical-align: middle;
  user-select: none;
  color: white;
  -webkit-text-stroke: 1px black;
}

.section {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 #22336209;
  border: 3px solid #20b2aa; /* Turquoise border outside */
  margin: 2px auto 0 auto;
  max-width: 480px;
  padding: 24px 15px;
  position: relative;
  padding-bottom: 60px; /* Extra padding to prevent sticky button from covering content */
}

/* Ensure sticky buttons don't interfere with scrollable content */
.section:has(.back-btn),
.section:has(.back-button) {
  padding-top: 60px; /* Space for sticky button */
}

/* Container for sticky elements to prevent overlap with bottom content */
.sticky-container {
  position: relative;
  min-height: 100vh;
  padding-bottom: 80px; /* Ensure space at bottom */
}

label {
  font-weight: 500;
  font-size: 1em;
  display: block;
  margin-bottom: 4px;
}

textarea,
input[type="text"],
input[type="number"],
select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c6d2e2;
  border-radius: 7px;
  font-size: 1em;
  padding: 8px;
  margin-bottom: 10px;
  background: #fafdff;
}

.add-network-btn,
.form-btn {
  background: #2248d3;
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
  width: 100%;
}

.add-network-btn:hover,
.form-btn:hover {
  background: #1331a0;
}

.add-btn-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  gap: 10px;
  padding: 0 2px; /* Prevent overflow on mobile */
  box-sizing: border-box;
}

/* Mobile banner/button fixes */
@media (max-width: 768px) {
  .add-btn-row {
    margin: 8px 1px 12px 1px;
    padding: 0 1px;
  }
  
  .add-network-btn,
  .form-btn {
    width: calc(100% - 4px) !important;
    margin-left: 2px !important;
    margin-right: 2px !important;
    box-sizing: border-box !important;
  }
  
  .view-header {
    padding: 16px 2px 0 2px !important;
    margin: 0 1px !important;
  }
  
  .view-header h3 {
    margin: 0 0 12px 4px !important;
  }
}

@media (max-width: 480px) {
  .add-btn-row {
    margin: 4px 0 8px 0;
    padding: 0;
  }
  
  .add-network-btn,
  .form-btn {
    width: calc(100% - 2px) !important;
    margin-left: 1px !important;
    margin-right: 1px !important;
    font-size: 0.9em !important;
  }
  
  .view-header {
    padding: 12px 1px 0 1px !important;
  }
}

.coin-card {
  display: flex;
  align-items: center;
  background: #f7faff;
  border-radius: 8px;
  border: 1px solid #f7faff;
  /* Base border */
  box-shadow: 0 2px 4px 0 #22336210;
  padding: 8px 2px 8px 2px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  margin-bottom: 1px;
}

.coin-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 16px;
}

.coin-name {
  font-weight: 700;
  font-size: 1.09em;
}

.right-align {
  text-align: right;
  flex-shrink: 0;
  min-width: 140px;
  margin-left: auto;
  padding-right: 5px;
}

.right-align div {
  text-align: right;
  direction: ltr;
  white-space: nowrap;
}

/* Popup styles */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(24, 32, 58, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: #fff;
  border-radius: 13px;
  padding: 24px;
  min-width: 300px;
  box-shadow: 0 4px 24px 0 #23334d22;
  text-align: left;
  animation: popin 0.25s;
    max-width: 480px;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.popup-header h3 {
  margin: 0;
  font-size: 1.5em;
}

.popup-header .dd_icon {
  width: 24px;
  height: 24px;
}

.popup-close-btn {
  position: absolute;
  top: 16px;
  right: -9px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.popup-close-btn:hover {
  background-color: #f0f0f0;
}

.popup-header {
  position: relative;
}


#dd_toolboxPopup .popup-content {
  max-width: 450px;
  width: 95%;
}

#dd_toolboxPopup .input-group-text,
#dd_toolboxPopup .form-control {
  font-size: 1.1em;
  padding: 12px;
  height: auto;
  /* Allow height to be determined by padding */
}

#dd_toolboxPopup .input-group {
  height: 52px;
  border-radius: 12px;
}

#dd_converter-container .input-group {
  padding: 0 15px;
}

#dd_converter-container {
  display: flex;
  flex-direction: column;
}

.swap-button-container {
  display: flex;
  justify-content: center;
  margin: 8px 0;
  /* Adjusted margin for better spacing */
}

.swap-button-container .icon-btn {
  background-color: #f0f0f0;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  border: 1px solid #ddd;
  cursor: pointer;
}

.swap-button-container .icon-btn:hover {
  background-color: #e0e0e0;
}

.swap-button-container .dd_icon {
  transition: transform 0.3s ease;
}


#dd_converter-container:not(.converter-crypto-on-top) .swap-button-container .dd_icon {
  transform: rotate(180deg);
}

.currency-selector {
  position: relative;
  flex-shrink: 0;
}

.currency-selector-button {
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  height: 100%;
}

.currency-selector .currency-icon {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.currency-selector .currency-symbol {
  font-weight: 600;
  margin-right: 4px;
}

.currency-selector .currency-arrow {
  font-size: 0.8em;
}

.currency-menu {
  position: absolute;
  top: 105%;
  left: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 10;
  width: 300px;
  max-height: 250px;
  display: flex;
  flex-direction: column;
}

.currency-search {
  border: none;
  border-bottom: 1px solid #eee;
  padding: 12px;
  font-size: 1em;
  outline: none;
}

.currency-list {
  overflow-y: auto;
}

.currency-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  gap: 12px;
}

.currency-item:hover {
  background-color: #f0f5ff;
}

.currency-item .currency-icon {
  width: 32px;
  height: 32px;
}

.currency-item .currency-name {
  font-weight: 500;
}

.currency-item .currency-item-symbol {
  font-size: 0.9em;
  color: #777;
}

#dd_converter-container .input-group {
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

#dd_converter-container .form-control {
  padding-left: 12px;
  padding-right: 25px;
  flex: 1;
  min-width: 0;
  width: auto;
  margin-left: 10px;
  margin-right: 15px;
}

#dd_converter-from-amount,
#dd_converter-to-amount {
  flex: 1 !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin-left: 10px !important;
  margin-right: 15px !important;
  padding-right: 25px !important;
}

.wide-popup {
  min-width: 480px;
}

@keyframes popin {
  from {
    transform: scale(0.7);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-action,
.popup-cancel {
  padding: 8px 22px;
  border-radius: 7px;
  border: none;
  margin: 6px 9px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  background: #2248d3;
  color: white;
  transition: background 0.17s;
}

.popup-cancel {
  background: #bbb;
  color: #1a2235;
}

.popup-action:hover {
  background: #16318a;
}

.popup-cancel:hover {
  background: #a1a1a1;
}

.networth-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.list-view .coin-card {
  padding-bottom: 12px;
  margin-bottom: 0;
  box-shadow: none;
  background: #fff;
  border: 1px solid transparent;
  border-bottom-color: #eee;
  border-radius: 0;
}

.list-view .coin-card:last-child {
  border-bottom: none;
}

.search-container {
  margin: 16px 0;
}

.input-group {
  display: flex;
  align-items: center;
  background: #f6f6f6;
  border: 1.5px solid #e0e3ea;
  border-radius: 999px;
  padding: 0 10px 0 18px;
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: none;
}

.input-group:hover,
.input-group:focus-within {
  border-color: #2248d3;
  box-shadow: 0 2px 8px 0 #2248d311;
}

.input-group-text {
  background: none;
  border: none;
  padding: 0 8px 0 0;
  color: #222;
  font-size: 1.25em;
  display: flex;
  align-items: center;
}

.input-group-text i.fa-solid.fa-magnifying-glass {
  font-size: 1.1em;
}

.search-control {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1em;
  padding: 2px 10px;
  border-radius: 999px;
  width: 85%;
  height: 40px;
}

.search-control:focus {
  background: transparent;
  outline: none;
}

.filter-controls {
  padding: 10px 4px 0 4px;
}

.filter-controls {
  padding: 10px 4px 0 4px;
}

.coin-card:hover {
  background: #eaf2ff;
}

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 1px 0 1px;
  flex-wrap: wrap;
  gap: 10px;
}

.view-header h3 {
  margin: 0 0 12px 8px;
  font-size: 1.4em;
}

.view-header .header-buttons {
  display: flex;
  gap: 5px;
}

/* Floating back button - 80% width with 420px max, perfectly centered with 10px side space */
.back-button,
.back-btn,
.add-network-btn[onclick*="goBack"],
#dd_transaction-back-btn {
    position: fixed !important;
    bottom: 20px !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 1000 !important;
    background: #e53935 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4) !important;
    width: calc(80% - 20px) !important;
    max-width: 420px !important;
    min-width: 80px !important;
    margin: 0 auto !important;
}

.back-button:hover,
.back-btn:hover,
.add-network-btn[onclick*="goBack"]:hover,
#dd_transaction-back-btn:hover {
    background: #b71c1c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(183, 28, 28, 0.5) !important;
}

/* Done button - positioned in header, not floating - HIGHEST PRIORITY */
.done-btn,
#dd_doneBtn,
button.done-btn,
button#dd_doneBtn {
    position: static !important;
    display: inline-block !important;
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.done-btn:hover,
#dd_doneBtn:hover,
button.done-btn:hover,
button#dd_doneBtn:hover {
    background: #218838 !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

/* Ensure Done button is NEVER affected by back button or other button styles */
.header-buttons .done-btn,
.header-buttons #dd_doneBtn,
.view-header .done-btn,
.view-header #dd_doneBtn {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    margin: 0 !important;
    background: #28a745 !important;
    color: white !important;
}

/* Floating exit button - Same position, 80% width with 420px max, perfectly centered with 10px side space */
.exit-btn,
button[onclick*="exitApplication"],
button[onclick*="cleanExitApplication"],
#exitBtn,
.form-btn[onclick*="exitApplication"],
.add-network-btn[onclick*="exitApplication"],
.add-network-btn[onclick*="cleanExitApplication"] {
    position: fixed !important;
    bottom: 20px !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 1000 !important;
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4) !important;
    width: calc(80% - 20px) !important;
    max-width: 420px !important;
    min-width: 80px !important;
    margin: 0 auto !important;
}

.exit-btn:hover,
button[onclick*="exitApplication"]:hover,
button[onclick*="cleanExitApplication"]:hover,
#exitBtn:hover,
.form-btn[onclick*="exitApplication"]:hover,
.add-network-btn[onclick*="exitApplication"]:hover,
.add-network-btn[onclick*="cleanExitApplication"]:hover {
    background: #a71e2a !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(167, 30, 42, 0.5) !important;
}

/* Remove redundant body padding */
body {
    padding-bottom: 0;
}


.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.empty-list-message {
  text-align: center;
  padding: 20px;
  color: #888;
  grid-column: 1 / -1;
}

#dd_global-list,
#dd_networks-list.list-view,
#archive-list {
  padding-top: 16px;
}

#dd_main-content,
#dd_networks-container {
  padding-left: 1px !important;
  padding-right: 1px !important;
  margin-left: 1px !important;
  margin-right: 1px !important;
}

/* Mobile adjustments for dd_networks-container - High specificity overrides */
@media (max-width: 768px) {
  body #dd_networks-container .coin-card,
  body #dd_networks-container .coin-card.coin-card {
    padding-left: 2px !important; /* Shift content 5px more to the left */
    margin-left: 2px !important; /* Additional left spacing */
  }
  
  body #dd_networks-container .coin-icon,
  body #dd_networks-container .asset-identity .coin-icon {
    margin-left: 2px !important; /* Additional 5px left shift for icons */
    margin-right: 2px !important; /* Maintain right spacing */
  }
  
  body #dd_networks-container .right-align,
  body #dd_networks-container .coin-card .right-align {
    padding-right:5px !important; /* Move values 5px more from right edge */
    margin-right: -10px !important; /* Additional spacing from right */
    min-width: 120px !important; /* Reduce min width for better spacing */
  }
  
  body #dd_networks-container .coin-name,
  body #dd_networks-container .asset-info .coin-name {
    max-width: 200px !important; /* Longer text before truncation */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  body #dd_networks-container .coin-meta,
  body #dd_networks-container .asset-info .coin-meta {
    max-width: 180px !important; /* Longer meta text */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  /* Override wallet-main-styles.css conflicting rules */
  body #dd_networks-container .coin-name {
    max-width: 200px !important;
    text-align: left !important;
  }
  
  body #dd_networks-container .coin-meta {
    max-width: 180px !important;
    text-align: left !important;
  }
}

@media (max-width: 480px) {
  body #dd_networks-container .coin-name,
  body #dd_networks-container .asset-info .coin-name {
    max-width: 160px !important; /* Slightly shorter on very small screens */
  }
  
  body #dd_networks-container .coin-meta,
  body #dd_networks-container .asset-info .coin-meta {
    max-width: 140px !important;
  }
  
  body #dd_networks-container .right-align {
    margin-right: -20px !important; /* More aggressive spacing on small screens */
  }
}

.asset-identity {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 6px 0;
}

.asset-fav {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.star-icon {
  font-size: 24px !important;
  color: #e13636;
  transition: transform 0.2s ease, color 0.2s ease;
  font-variation-settings: 'FILL' 0;
  width: 24px !important;
  height: 24px !important;
}

.asset-fav .star-icon[style*="FILL' 1"] {
  color: #e2b100;
}

.asset-fav:hover .star-icon {
  transform: scale(1.2);
}

.asset-identity .coin-icon {
  margin-left: 5px;
  width: 38px;
  height: 38px;
}

.asset-info {
  flex-grow: 1;
  margin-left: 6px;
  min-width: 0;
  margin-right: 10px;
}

.asset-info .coin-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.coin-meta {
  color: #888;
  font-size: 0.98em;
}

.search-result-group {
  background: #f7faff;
  border-radius: 8px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px 0 #22336210;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid #f7faff;
}

.search-result-group:hover {
  background: #eaf2ff;
}

.search-result-group .network-header {
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  border-bottom: 1px solid #e0e3ea;
  border-radius: 8px 8px 0 0;
}

.search-result-group .matching-assets-list {
  padding: 0 12px 12px 12px;
}

.search-result-group .asset-list-item {
  padding-left: 10px;
  padding-right: 10px;
  margin-bottom: 0;
}



.edit-mode-active .coin-card {
  border: 1px solid #d8dde4;
  cursor: default;
}

.edit-mode-active .coin-card .coin-name,
.edit-mode-active .coin-card:hover,
.edit-mode-active .search-result-group:hover {
  background: #f7faff;
}

.edit-mode-active .coin-card .right-align {
  display: none;
}


/* Address Book Styles */
#dd_address-book-container hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}

#dd_address-book-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

/* Ensure inline SVG icons maintain correct aspect ratio */
.icon {
  width: 20px;
  height: 20px;
  margin: auto;
  display: block;
  line-height: 0;
}

/* Gold color for active favorites */
#dd_starBtn.active .material-symbols-outlined,
.asset-fav .material-symbols-outlined {
  color: #e2b100 !important;
  -webkit-text-stroke: 1px #e2b100 !important;
}

/* Offline SVG icon sizing and active border */
.dd_icon {
  width: 80%;
  height: auto;
  vertical-align: middle;
}

#dd_starBtn.active {
  border: 1.5px solid #2d3a57;
  background: #e0e7ff;
}

.remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.edit-mode-active .remove-btn {
  opacity: 1;
  pointer-events: auto;
}

.remove-btn .dd_icon {
  width: 28px;
  height: 28px;
  color: #d44c4c;
  transition: transform 0.2s ease, color 0.2s ease;
}

.remove-btn:hover .dd_icon {
  transform: scale(1.15);
  color: #a52828;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.pagination-btn {
  background: #e0e7ff;
  border: 1px solid #c6d2e2;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 600;
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.page-info {
  font-weight: 500;
}

#dd_address-book-list .coin-meta {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  font-family: monospace;
  color: #555;
  margin-top: 4px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-book-entry {
  align-items: flex-end;
  /* Align items to the bottom */
  padding-bottom: 3px;
  margin-bottom: 0;
}

.address-book-entry .coin-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  /* Align with the top of the text box */
  position: relative;
  top: 5px;
}

.address-book-entry .asset-info {
  flex-grow: 1;
  min-width: 0;
  margin-left: 2px;
  cursor: pointer;
  flex-basis: 0;
}


.address-book-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  /* Pushes to the far right */
  flex-shrink: 0;
  /* Prevents buttons from shrinking */
  margin-bottom: 4px;
  position: relative;
  top: 5px;
  left: 25px;
}

.address-book-actions .icon-btn:hover {
  background-color: #d4edda;
  /* Light green glow */
  border: 1px solid #b6d9c2;
  padding: 3px;
  box-sizing: border-box;
}

.more-info-toggle {
  cursor: pointer;
  font-weight: 600;
  color: #2248d3;
  margin-top: 15px;
  margin-bottom: 10px;
  user-select: none;
}

#more-info-arrow {
  display: inline-block;
  transition: transform 0.2s;
}

.more-info-toggle:not(.hidden) #more-info-arrow {
  transform: rotate(90deg);
}

#more-info-section {
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.add-detail-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.add-detail-group select,
.add-detail-group input {
  margin-bottom: 0;
}

.add-detail-group input {
  flex-grow: 1;
}

.add-detail-btn {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0 15px;
  cursor: pointer;
}

.detail-item {
  display: flex;
  align-items: center;
  background: #f9f9f9;
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.detail-item strong {
  margin-right: 8px;
  text-transform: capitalize;
}

.detail-item span {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.remove-detail-btn {
  background: none;
  border: none;
  color: #e53935;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  margin-left: 10px;
}

/* Transaction Popup Styles */
#dd_transaction-details-container .container {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

#dd_transaction-details-container .field {
  margin-bottom: 16px;
}

#dd_transaction-details-container label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

#dd_transaction-details-container input,
#dd_transaction-details-container select {
  width: 100%;
  font-size: 1em;
  padding: 10px;
  box-sizing: border-box;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#dd_transaction-details-container input[readonly],
#dd_transaction-details-container select[disabled] {
  background: #e9ecef;
  cursor: not-allowed;
}

#dd_transaction-details-container .info-box {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 5px;
  padding: 15px;
  margin: 15px;
}

#dd_transactionsContent .info-box h3 {
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

#dd_transactionsContent #tx-history {
  list-style-type: none;
  padding: 0;
}

#dd_transactionsContent #tx-history li {
  background: #fff;
  border: 1px solid #ddd;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-size: 0.9em;
  word-break: break-all;
}

#dd_transactionsContent #tx-history .tx-details {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
}

#dd_transactionsContent #tx-history .tx-meta {
  font-size: 0.8em;
  color: #6c757d;
  margin-top: 8px;
}

#dd_transactionsContent #tx-history a {
  color: #007bff;
  text-decoration: none;
}

#dd_transactionsContent #tx-history a:hover {
  text-decoration: underline;
}

/* Transaction page specific styles - Based on stylesTransactions.css */
.address-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.address-header .coin-icon {
  width: 50px;
  height: 50px;
}

.address-header .coin-symbol {
  font-size: 1.5em;
  font-weight: 700;
}

.address-header .network-name {
  color: #888;
  font-size: 1em;
}

.address-header .address-id {
  font-family: monospace;
  color: #888;
  font-size: 0.9em;
}

.balance-display {
  margin: 16px 0;
}

.balance-display .usd-balance {
  font-size: 2em;
  font-weight: 700;
}

.balance-display .crypto-balance {
  font-size: 1.1em;
  color: #888;
}

.address-info-row {
  display: flex;
  gap: 20px;
  background: #fff;
  padding: 16px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  align-items: center;
}

.qr-code img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
}

.address-text-info {
  flex: 1;
}

.address-line {
  margin-bottom: 12px;
}

.address-line span {
  font-size: 0.9em;
  color: #888;
}

.address-line strong {
  display: block;
  font-size: 1em;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  max-width: 100%;
  width: 100%;
}

/* Responsive address display */
@media (max-width: 768px) {
  .address-line strong {
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .address-line strong {
    max-width: 150px;
  }
  .right-align {
  text-align: right;
  flex-shrink: 0;
  min-width: 120px;
  margin-left: auto;
  padding-right: 2px;
}


}

@media (max-width: 360px) {
  .address-line strong {
    max-width: 120px;
  }
    .right-align {
  text-align: right;
  flex-shrink: 0;
  min-width: 120px;
  margin-left: auto;
  padding-right: 2px;
}
}

.address-line .testnet-tag {
  background-color: #ffeaea;
  color: #d44c4c;
  font-size: 0.8em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
}

.address-value-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.copy-icon {
  font-size: 16px !important;
  cursor: pointer;
  color: #555;
  width: 16px !important;
  height: 16px !important;
}

/* Asset page address copy button styling - Enhanced positioning and size */
.address-value-wrapper {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  position: relative !important;
  min-height: 24px !important;
  width: 100% !important;
}

.address-value-wrapper .copy-icon {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: #555 !important;
  margin-left: 8px !important;
}

.address-value-wrapper .copy-icon:hover {
  color: #007bff !important;
  transform: scale(1.15) !important;
}

/* Address text styling to work with flexbox layout */
.address-value-wrapper strong {
  flex: 1 !important;
  min-width: 0 !important;
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-family: monospace !important;
  font-size: 0.9em !important;
  line-height: 1.4 !important;
}

/* Ensure the wrapper container has proper spacing */
.address-line {
  margin-bottom: 12px !important;
  min-height: 24px !important;
}

.address-line span {
  font-size: 0.9em !important;
  color: #888 !important;
  display: block !important;
  margin-bottom: 4px !important;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
}

.action-buttons.single-button {
    grid-template-columns: 1fr;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  border: none;
  border-radius: 12px;
  padding: 0 16px; /* Control padding horizontally only */
  font-size: 1em;
  font-weight: 600;
  color: #2248d3;
  cursor: pointer;
  transition: background-color 0.2s;
  height: 48px; /* Force a fixed height */
  box-sizing: border-box;
  text-align: center;
  position: relative;
}

.action-btn span {
  text-align: center;
  flex: 1;
  margin: 0;
  padding: 0;
}

.action-btn .icon-wrapper {
    position: absolute;
    left: 55px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.action-btn .icon-wrapper img {
    width: 22px;
    height: 22px;
}

.action-btn.ico-btn span {
    margin-left: 45px;
}

.action-btn svg,
.action-btn img {
  position: absolute;
  left: 10px;
  width: 15px;
  height: 15px;
}

/* Move only the send button icon further right */
#dd_transferBtn svg,
#dd_transferBtn img {
  left: 30px;
}

.action-btn:hover {
    background-color: #dbe8ff;
}

/* --- ATTRIBUTE-BASED BUTTON VISIBILITY --- */

/* Default State - Single button layout */
#dd_transaction-details-container .action-buttons {
    grid-template-columns: 1fr;
    justify-content: center;
}

#dd_transaction-details-container #dd_transferBtn {
    display: flex;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    justify-self: center;
}

/* DexCash Override */
#dd_transaction-details-container[data-network="dexcash"] #dd_transferBtn {
    display: none; /* Hide Send button for DexCash */
}

/* Tron Override - Show withdraw button */
#dd_transaction-details-container[data-network="tron"] #dd_transferBtn {
    display: flex;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    justify-self: center;
}

.action-buttons .action-btn.full-width {
    width: 100%;
    flex-grow: 1;
}

.transaction-list-header {
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
  text-align: left;
}

.transaction-list-header h4 {
  margin: 0;
  font-size: 1.2em;
  text-align: left;
}

.transaction-item {
  display: flex;
  align-items: center;
  padding: 16px 4px;
  border-bottom: 1px solid #eee;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-icon {
  font-size: 20px !important;
  margin-right: 16px;
  color: #d44c4c;
  /* Red for sent */
  width: 20px !important;
  height: 20px !important;
}

.transaction-icon.received {
  color: #1ca01c;
  /* Green for received */
  transform: rotate(180deg);
}

.transaction-details {
  flex: 1;
  font-size: 0.95em;
  overflow: hidden;
}

.transaction-details .type {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  font-weight: 600;
  color: #23334d;
  margin-bottom: 2px;
}

.transaction-details .hash-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: monospace;
}

.tx-address-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.tx-address-line .copy-icon {
    cursor: pointer;
    color: #888;
    transition: color 0.2s, transform 0.2s;
}

.tx-address-line .copy-icon:hover {
    color: #007bff;
    transform: scale(1.1);
}

.transaction-details .hash {
  color: #007bff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.transaction-details .hash:hover {
  color: #0056b3;
}

.transaction-amount {
  text-align: right;
  font-weight: 600;
  font-size: 1.05em;
}

.transaction-amount .date {
  font-weight: 400;
  color: #888;
  font-size: 0.85em;
}

/* Transaction hash link styling */
.transaction-item .tx-details a {
  text-decoration: none;
  transition: color 0.2s;
}

.transaction-item .tx-details a:hover {
  text-decoration: underline;
  color: #0056b3;
}
        .right-align {
            margin-right:d-15px !important;
            padding-right: 0 !important;
            text-align: right !important;
            justify-self: end !important;
            align-self: flex-end !important;
        }
        .network-card, .asset-item {
            gap: 15px !important;
            padding-right: 15px !important;
        }

/* Mobile-responsive Currency Converter styles */
@media (max-width: 768px) {
  #dd_toolboxPopup .popup-content {
    width: 95% !important;

    margin: 0 10px !important;
      .right-align {
  text-align: right;
  flex-shrink: 0;
  min-width: 120px;
  margin-left: auto;
  padding-right: 2px;
}
  }
  
  #dd_toolboxPopup .input-group {
    width: 100% !important;
    max-width: 480px !important;
    box-sizing: border-box !important;
  }
  
  .currency-menu {
    width: 280px !important;
    max-width: 90vw !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
  }
  
  .wide-popup {
    min-width: 95% !important;
    max-width: 95% !important;
  }
}

@media (max-width: 480px) {
  #dd_toolboxPopup .popup-content {
    width: 98% !important;
    max-width: 98% !important;
    margin: 0 5px !important;
    padding: 16px !important;
  }
  
  #dd_toolboxPopup .input-group {
    height: 48px !important;
  }
  
  #dd_toolboxPopup .input-group-text,
  #dd_toolboxPopup .form-control {
    font-size: 1em !important;
    padding: 10px !important;
  }
  
  .currency-selector-button {
    padding: 0 8px !important;
  }
  
  .currency-menu {
    width: 260px !important;
    max-width: 95vw !important;
  }
  
  .currency-item {
    padding: 8px 10px !important;
  }
  
  .wide-popup {
    min-width: 98% !important;
    max-width: 98% !important;
  }
}

@media (max-width: 360px) {
  #dd_toolboxPopup .popup-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
    border-radius: 8px !important;
  }
  
  .currency-menu {
    width: 240px !important;
    max-width: 98vw !important;
  }
  
  .currency-selector .currency-icon {
    width: 20px !important;
    height: 20px !important;
  }
  
  .currency-selector .currency-symbol {
    font-size: 0.9em !important;
  }
}

/* Fix DDC header blue border issue */
.transaction-header.ddc-header {
  border-left: none !important;
}

/* Mobile responsive DDC transaction header - Override inline styles */
@media (max-width: 768px) {
  .transaction-header.ddc-header[style] {
    padding: 12px 8px !important;
    margin-bottom: 16px !important;
    border-radius: 8px !important;
  }
  
  .transaction-header.ddc-header .transaction-title[style] {
    margin-bottom: 12px !important;
    text-align: center !important;
    padding-left: 0 !important;
  }
  
  .transaction-header.ddc-header .transaction-title h3[style] {
    font-size: 16px !important;
    margin: 0 0 4px 0 !important;
  }
  
  .transaction-header.ddc-header .transaction-subtitle[style] {
    font-size: 11px !important;
  }
  
  .transaction-header.ddc-header .transaction-stats[style] {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    justify-content: space-around !important;
    padding: 0 4px !important;
  }
  
  .transaction-header.ddc-header .stat-item[style] {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    padding: 5px 4px !important;
    min-width: 50px !important;
    max-width: 80px !important;
    flex: 1 !important;
  }
  
  .transaction-header.ddc-header .stat-value[style] {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
  }
  
  .transaction-header.ddc-header .stat-label[style] {
    font-size: 9px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
  }
}

@media (max-width: 480px) {
  .transaction-header.ddc-header[style] {
    padding: 10px 6px !important;
    margin-bottom: 12px !important;
  }
  
  .transaction-header.ddc-header .transaction-title h3[style] {
    font-size: 15px !important;
  }
  
  .transaction-header.ddc-header .transaction-subtitle[style] {
    font-size: 10px !important;
  }
  
  .transaction-header.ddc-header .transaction-stats[style] {
    gap: 6px !important;
    padding: 0 2px !important;
  }
  
  .transaction-header.ddc-header .stat-item[style] {
    padding: 7px 5px !important;
    min-width: 55px !important;
    max-width: 75px !important;
    border-radius: 6px !important;
  }
  
  .transaction-header.ddc-header .stat-value[style] {
    font-size: 13px !important;
    font-weight: 700 !important;
  }
  
  .transaction-header.ddc-header .stat-label[style] {
    font-size: 8px !important;
  }
}

@media (max-width: 360px) {
  .transaction-header.ddc-header[style] {
    padding: 8px 4px !important;
    margin-bottom: 10px !important;
  }
  
  .transaction-header.ddc-header .transaction-title h3[style] {
    font-size: 14px !important;
  }
  
  .transaction-header.ddc-header .transaction-stats[style] {
    gap: 4px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0 1px !important;
  }
  
  .transaction-header.ddc-header .stat-item[style] {
    padding: 6px 4px !important;
    min-width: 50px !important;
    max-width: 70px !important;
    flex: 1 !important;
    background: rgba(159, 122, 234, 0.3) !important;
    border-radius: 5px !important;
    border: 1px solid rgba(159, 122, 234, 0.4) !important;
  }
  
  .transaction-header.ddc-header .stat-value[style] {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #9f7aea !important;
  }
  
  .transaction-header.ddc-header .stat-label[style] {
    font-size: 7px !important;
    color: #666 !important;
  }
}
