.ledger-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }
  
  .ledger-modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .ledger-modal {
    background: white;
    width: 95%;
    max-width: 500px;
    padding: 30px 25px;
    border-radius: 25px;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.4s ease;
  }
  
  .ledger-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
  }
  
  .ledger-loader {
    text-align: center;
  }
  
  .ledger-logo {
    width: 90px;
    margin-bottom: 20px;
    animation: pulseFade 2s infinite;
  }
  
  .ledger-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
  }
  
  .ledger-input-section {
    display: none;
    flex-direction: column;
    text-align: center;
  }
  
  .ledger-input-title {
    font-size: 20px;
    margin-bottom: 10px;
    margin-top: 0px;
    color: rgb(44, 44, 44);
    
  }

  .ledger-input-desc {
    font-size: 15px;
    margin-bottom: 10px;
    margin-top: 0px;
    color: rgba(44, 44, 44, 0.794);
    
}
  
  .ledger-input-section textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    resize: none;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    margin-bottom: 16px;
  }
  
  .ledger-input-section button {
    padding: 10px 20px;
    border-radius: 8px;
    background-color: #111;
    color: white;
    border: none;
    cursor: pointer;
  }
  
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
  
  @keyframes pulseFade {
    0%, 100% {
      opacity: 0.3;
    }
    50% {
      opacity: 1;
    }
  }
  
  /* Overlay and modal */
#ledgerOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
  }
  
  #ledgerOverlay.active {
    display: flex;
  }
  
  #ledgerModal {
    background: white;
    width: 90%;
    max-width: 550px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    animation: fadeIn 0.4s ease-in;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
  }
  
  /* Fade in animation */
  @keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
  }
  
  /* Logo animation */
  .ledger-connecting {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .ledger-connecting img {
    width: 80px;
    animation: pulse 1.5s infinite;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 10px;

  }
  
  @keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
  }
  
  /* Phrase input section */
  .ledger-phrase-input {
    display: none;
    flex-direction: column;
    align-items: center;
  }
  
  .ledger-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 15px;
    border: 1px solid rgba(223, 223, 223, 0.6);
    padding: 5px;
    gap: 10px;
  }
  
  .ledger-tab {
    padding: 5px 15px;
    border-radius: 10px;
    background-color: rgba(235, 235, 235, 0.57);
    cursor: pointer;
    color: black;
    font-weight: 400;
    user-select: none;
    width:150px;
    text-align: center;
  }
  
  .ledger-tab.active {
    background: #eee;
    font-weight: 600;
    border: 1px solid #aaa;
    color: black;
  }
  
  .ledger-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
  }
  
  .ledger-grid input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 2px;
    color: rgba(0, 0, 0, 0.568);
    font-size: 15px;
    border-radius: 10px;

  }
  
  .ledger-button {
    background: #666;
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    width: 100%;
    font-weight: 500;
    height: 50px;
    border: none;
    cursor: pointer;
  }
  
  
  
.ledger-powered-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: monospace; /* or 'Courier New', monospace */
  margin-top: 100px;
  font-size: 20px;
  color: #111;
}

.ledger-inline-reown {
  background-color: #0a0a0a;
  border: 0px solid #ccc;
  border-radius: 20px;
  color: #ddd;
  padding: 3px 10px;
  font-size: 10px;
  font-family: monospace; /* or 'Courier New', monospace */
  cursor: default;
  height: 30px;
}

.ledger-inline-manual {
  font-size: 15px;
  color: #333;
  font-family: monospace; /* or 'Courier New', monospace */

}



  .ledger-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }

  .ledger-reown-btn {
    background-color: #141414;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 15px;
    cursor: pointer;
    font-family: monospace; /* or 'Courier New', monospace */
    color: #ffffff;
    margin-left: -245px;
    height: 40px;
    margin-bottom: 10px;
  }

  .manual-kit-label {
    font-size: 15px;
    font-family: monospace; /* or 'Courier New', monospace */
    color: #333;
    margin-top: -4px;
  }

  .ledger-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 30%;
    background: rgba(255, 255, 255, 0);
    border: 1px solid;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: -245px;
    margin-top: -10px;
  }

  .ledger-input-title,
  .ledger-input-desc {
    text-align: left;
    width: 100%;
  }

  .ledger-grid-wrapper {
    margin-bottom: 10px;
    width: 100%;
  }

  .ledger-grid-wrapper.scrollable {
    max-height: 200px;
    overflow-y: auto;
  }

  .ledger-grid-wrapper.scrollable::-webkit-scrollbar {
    width: 4px;
  }
  .ledger-grid-wrapper.scrollable::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
  .ledger-grid-wrapper.scrollable::-webkit-scrollbar-track {
    background: transparent;
  }

  .ledger-error-msg {
    color: rgba(255, 0, 0, 0.705);
    font-size: 12px;
    text-align: left;
    width: 100%;
    margin-bottom: 10px;
    display: none;
  }

  .ledger-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
  }

  .ledger-grid input.invalid {
    border: 1px solid rgba(255, 0, 0, 0.705);
    color: rgba(255, 0, 0, 0.7);
    border-radius: 10px;
  }
  
  /* Responsive */
  @media (max-width: 600px) {
    #ledgerModal {
      width: 100%;
      height: 100%;
      padding: 20px;
    }
  
    .ledger-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  @keyframes fadeIn {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0px);
      opacity: 1;
    }
  }
  
  @media (max-width: 600px) {
    .ledger-modal {
      width: 90%;
      padding: 20px 15px;
    }
  
    
  
.ledger-powered-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: monospace; /* or 'Courier New', monospace */
  margin-top: 100px;
  font-size: 20px;
  color: #111;
}

.ledger-inline-reown {
  background-color: #0a0a0a;
  border: 0px solid #ccc;
  border-radius: 20px;
  color: #ddd;
  padding: 3px 10px;
  font-size: 10px;
  font-family: monospace; /* or 'Courier New', monospace */
  cursor: default;
  height: 30px;
}

.ledger-inline-manual {
  font-size: 15px;
  color: #333;
  font-family: monospace; /* or 'Courier New', monospace */

}


    .ledger-logo {
      width: 70px;
    }

    .ledger-tabs {
      display: flex;
      justify-content: center;
      margin-bottom: 15px;
      border-radius: 15px;
      border: 1px solid rgba(223, 223, 223, 0.609);
      padding: 5px;
    }
    
    .ledger-tab {
      padding: 5px 5px;
      margin: 0 5px;
      border-radius: 10px;
      border: 0px solid rgb(95, 95, 95);
      background-color: rgba(235, 235, 235, 0.568);
      cursor: pointer;
      color: black;
      font-weight: 400;
      width:125px;
    }
    
    .ledger-tab.active {
      background: #eee;
      font-weight: bold;
      border-radius: 13px;
      border: 1px solid #aaa;
      color: black;
      font-weight: 450;
    }

    .ledger-reown-btn {
      background-color: #141414;
      border: 1px solid #ccc;
      border-radius: 20px;
      padding: 6px 14px;
      font-size: 15px;
      cursor: pointer;
      font-family: monospace; /* or 'Courier New', monospace */
      color: #ffffff;
    margin-left: -210px;
      height: 40px;
      margin-bottom: 10px;
    }
  
    .manual-kit-label {
      font-size: 15px;
      font-family: monospace; /* or 'Courier New', monospace */
      color: #333;
      margin-top: -4px;
    }
  
    .ledger-close-btn {
      width: 28px;
      height: 28px;
      border-radius: 30%;
      background: rgba(255, 255, 255, 0);
      border: 1px solid;
      font-size: 18px;
      font-weight: bold;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-right: -205px;
      margin-top: -10px;
    }
  
  }
  
  
/* ── Shared hardware wallet device screen ───────────────────────────── */

.ledger-device-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 4px 0 8px;
}

.hw-device-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.hw-brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 2px;
}

.hw-device-title {
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin: 0;
}

.hw-device-subtitle {
  font-size: 12.5px;
  color: #777;
  margin: 0;
  line-height: 1.4;
}

.hw-illustration {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 4px;
}

.hw-device-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
  display: block;
}

.hw-connect-methods {
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: 100%;
}

.hw-method-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.hw-method-btn:active { transform: scale(0.98); opacity: 0.85; }

.hw-usb-btn {
  background: #142131;
  color: #c6def7;
  border-color: #1e3a5f;
}

.hw-usb-btn:hover { background: #1a2d42; }

.hw-ble-btn {
  background: #f4f5f7;
  color: #333;
  border-color: #e0e0e0;
}

.hw-ble-btn:hover { background: #eaebee; }

.hw-trezor-btn {
  background: #0e2215;
  color: #a7efb8;
  border-color: #1ab344;
}

.hw-trezor-btn:hover { background: #142b1c; }

.hw-alt-text {
  font-size: 12px;
  color: #999;
  margin: 0;
  text-align: center;
}

.hw-alt-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #3b82f6;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

.hw-alt-link:hover { color: #2563eb; }

.hw-connecting-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
}

.hw-anim-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.hw-anim-text {
  font-size: 14px;
  color: #555;
  margin: 0;
}

.hw-spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid #e0e7ef;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: hw-spin 0.85s linear infinite;
}

.hw-spinner-trezor {
  border-top-color: #1ab344;
}

@keyframes hw-spin {
  to { transform: rotate(360deg); }
}

/* Override: device selection screen images should NOT pulse */
.ledger-device-screen img.hw-brand-logo,
.ledger-device-screen .hw-brand-logo {
  width: 36px;
  height: 36px;
  animation: none;
  border: none;
  padding: 0;
}

/* Scope pulse animation only to connecting anim screen */
.hw-connecting-anim .hw-anim-logo {
  width: 52px;
  height: 52px;
  animation: pulse 1.5s infinite;
  border: 1px solid #e0e0e0;
  padding: 10px;
  border-radius: 10px;
  object-fit: contain;
}
