/* HBN Thirdweb Wallet Styles */
/* Integrated with PeepSo Navbar and Gecko Theme */

/* =====================================================
   NAVBAR WALLET BUTTON - Matches PeepSo Icon Style
   ===================================================== */

.ps-navbar__menu-item--wallet .ps-navbar__menu-link,
.hbn-wallet-nav-item a,
.hbn-wallet-sidenav-item {
    position: relative;
}

.ps-navbar__menu-item--wallet .ps-navbar__menu-link i,
.hbn-wallet-nav-item i,
.hbn-wallet-sidenav-item i {
    font-size: 18px;
    transition: color 0.2s ease;
}

/* Dollar sign icon for wallet */
.gcis-dollar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-style: normal !important;
}

.gcis-dollar::before {
    content: '$' !important;
}

.ps-navbar__menu-item--wallet:hover .ps-navbar__menu-link i,
.hbn-wallet-nav-item:hover i,
.hbn-wallet-sidenav-item:hover i {
    color: var(--ps-color-primary, #0084ff);
}

/* Connected indicator dot on navbar icon */
.ps-navbar__menu-item--wallet.wallet-connected .ps-navbar__menu-link::after,
.hbn-wallet-nav-item.wallet-connected a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid var(--ps-navbar-bg, #fff);
}

/* =====================================================
   WALLET DROPDOWN - PeepSo Style
   ===================================================== */

.hbn-wallet-dropdown {
    position: fixed !important;
    top: 70px !important;
    right: 20px !important;
    left: auto !important;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: #fff;
    background: var(--ps-dropdown-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    z-index: 999999 !important;
    display: none;
}

.hbn-wallet-dropdown.is-open {
    display: block !important;
}

.hbn-wallet-dropdown__inner {
    padding: 0;
}

.hbn-wallet-dropdown__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ps-border-color, #e5e7eb);
    font-weight: 600;
    font-size: 16px;
    color: var(--ps-text-color, #1f2937);
}

.hbn-wallet-dropdown__header i {
    font-size: 20px;
    color: var(--ps-color-primary, #0084ff);
}

.hbn-wallet-icon-dollar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 20px;
    font-weight: bold;
    color: var(--ps-color-primary, #0084ff);
}

.hbn-wallet-dropdown__body {
    padding: 16px 20px;
}

.hbn-wallet-desc {
    margin: 0 0 16px;
    font-size: 14px;
    color: var(--ps-text-muted, #6b7280);
    line-height: 1.5;
}

.hbn-wallet-login-alt {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ps-border-color, #eee);
    text-align: center;
}

.hbn-wallet-login-alt a {
    color: var(--ps-color-link, #6c5ce7);
    font-size: 13px;
    text-decoration: none;
}

.hbn-wallet-login-alt a:hover {
    text-decoration: underline;
}

.hbn-wallet-loading {
    text-align: center;
    padding: 20px 0;
}

.hbn-wallet-loading p {
    margin-top: 10px;
    color: var(--ps-color-muted, #888);
    font-size: 13px;
}

.hbn-wallet-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #e0e0e0;
    border-top-color: #6c5ce7;
    border-radius: 50%;
    margin: 0 auto;
    animation: hbn-spin 1s linear infinite;
}

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

/* =====================================================
   WALLET BUTTONS
   ===================================================== */

.hbn-wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    border: 1px solid var(--ps-border-color, #e5e7eb);
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--ps-bg-secondary, #f9fafb);
    color: var(--ps-text-color, #1f2937);
    margin-bottom: 10px;
}

.hbn-wallet-btn:last-child {
    margin-bottom: 0;
}

.hbn-wallet-btn:hover {
    background: var(--ps-bg-hover, #f3f4f6);
    border-color: var(--ps-border-hover, #d1d5db);
    transform: translateY(-1px);
}

.hbn-wallet-btn--metamask:hover {
    border-color: #f6851b;
    background: #fff5eb;
}

.hbn-wallet-btn--wc:hover {
    border-color: #3b99fc;
    background: #f0f7ff;
}

.hbn-wallet-btn--disconnect {
    background: transparent;
    border-color: #ef4444;
    color: #ef4444;
    padding: 10px 16px;
    font-size: 14px;
}

.hbn-wallet-btn--disconnect:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.hbn-metamask-icon,
.hbn-wc-icon {
    width: 24px;
    height: 24px;
}

/* =====================================================
   CONNECTED STATE
   ===================================================== */

.hbn-wallet-connected-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hbn-status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hbn-wallet-address-row,
.hbn-wallet-balance-row,
.hbn-wallet-chain-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--ps-border-color, #e5e7eb);
}

.hbn-wallet-chain-row {
    border-bottom: none;
}

.hbn-label {
    font-size: 13px;
    color: var(--ps-text-muted, #6b7280);
    font-weight: 500;
}

.hbn-address-text {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: var(--ps-color-primary, #0084ff);
    font-weight: 600;
    flex: 1;
    text-align: right;
    margin-right: 8px;
}

.hbn-balance-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--ps-text-color, #1f2937);
}

.hbn-chain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #dbeafe;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.hbn-chain-dot {
    width: 6px;
    height: 6px;
    background: #1d4ed8;
    border-radius: 50%;
}

.hbn-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--ps-bg-secondary, #f3f4f6);
    border-radius: 6px;
    cursor: pointer;
    color: var(--ps-text-muted, #6b7280);
    transition: all 0.2s;
}

.hbn-icon-btn:hover {
    background: var(--ps-color-primary, #0084ff);
    color: white;
}

.hbn-wallet-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--ps-border-color, #e5e7eb);
}

.hbn-wallet-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background: var(--ps-bg-secondary, #f9fafb);
    border-radius: 8px;
    color: var(--ps-color-primary, #0084ff);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.hbn-wallet-link:hover {
    background: var(--ps-color-primary, #0084ff);
    color: white;
}

/* =====================================================
   SHORTCODE CONTAINER STYLES (for page content)
   ===================================================== */

.hbn-wallet-shortcode {
    max-width: 400px;
    margin: 20px 0;
}

.hbn-wallet-shortcode .hbn-wallet-connect-btn {
    margin: 0;
}

.hbn-wallet-shortcode .hbn-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.hbn-wallet-shortcode .hbn-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.hbn-wallet-shortcode .hbn-wallet-info {
    background: var(--ps-bg-secondary, #f8f9fa);
    border: 1px solid var(--ps-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.hbn-wallet-shortcode .hbn-wallet-address,
.hbn-wallet-shortcode .hbn-wallet-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px 0;
}

.hbn-wallet-shortcode .label {
    font-size: 13px;
    color: var(--ps-text-muted, #6b7280);
    font-weight: 500;
}

.hbn-wallet-shortcode .hbn-inline-address {
    font-family: monospace;
    font-size: 13px;
    color: var(--ps-color-primary, #0084ff);
}

.hbn-wallet-shortcode .hbn-inline-balance {
    font-size: 16px;
    font-weight: 700;
    color: var(--ps-text-color, #1f2937);
}

.hbn-wallet-shortcode .hbn-btn-secondary {
    padding: 8px 14px;
    font-size: 13px;
    background: transparent;
    border: 1px solid var(--ps-border-color, #e5e7eb);
    border-radius: 6px;
    color: var(--ps-text-muted, #6b7280);
    cursor: pointer;
    margin-left: auto;
}

.hbn-wallet-shortcode .hbn-btn-secondary:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* =====================================================
   TOKEN INFO CARD
   ===================================================== */

.hbn-token-info {
    background: var(--ps-bg-color, #fff);
    border: 1px solid var(--ps-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hbn-token-info h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    color: var(--ps-text-color, #1f2937);
    font-size: 18px;
    font-weight: 700;
}

.hbn-token-info h3 i {
    color: var(--ps-color-primary, #0084ff);
}

.token-details p {
    margin: 12px 0;
    color: var(--ps-text-muted, #6b7280);
    font-size: 14px;
    line-height: 1.6;
}

.token-details strong {
    color: var(--ps-text-color, #1f2937);
    font-weight: 600;
}

.token-details code {
    display: inline-block;
    background: var(--ps-bg-secondary, #f5f5f5);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: var(--ps-color-primary, #0084ff);
    word-break: break-all;
}

/* =====================================================
   DARK MODE - PeepSo Dark Theme Compatibility
   ===================================================== */

.ps-dark-mode .hbn-wallet-dropdown,
[data-theme="dark"] .hbn-wallet-dropdown {
    background: #1f2937;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.ps-dark-mode .hbn-wallet-dropdown__header,
[data-theme="dark"] .hbn-wallet-dropdown__header {
    border-color: #374151;
    color: #f3f4f6;
}

.ps-dark-mode .hbn-wallet-desc,
[data-theme="dark"] .hbn-wallet-desc {
    color: #9ca3af;
}

.ps-dark-mode .hbn-wallet-btn,
[data-theme="dark"] .hbn-wallet-btn {
    background: #374151;
    border-color: #4b5563;
    color: #f3f4f6;
}

.ps-dark-mode .hbn-wallet-btn:hover,
[data-theme="dark"] .hbn-wallet-btn:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.ps-dark-mode .hbn-label,
[data-theme="dark"] .hbn-label {
    color: #9ca3af;
}

.ps-dark-mode .hbn-balance-text,
[data-theme="dark"] .hbn-balance-text {
    color: #f3f4f6;
}

.ps-dark-mode .hbn-wallet-address-row,
.ps-dark-mode .hbn-wallet-balance-row,
.ps-dark-mode .hbn-wallet-chain-row,
.ps-dark-mode .hbn-wallet-actions,
[data-theme="dark"] .hbn-wallet-address-row,
[data-theme="dark"] .hbn-wallet-balance-row,
[data-theme="dark"] .hbn-wallet-chain-row,
[data-theme="dark"] .hbn-wallet-actions {
    border-color: #374151;
}

.ps-dark-mode .hbn-icon-btn,
[data-theme="dark"] .hbn-icon-btn {
    background: #374151;
    color: #9ca3af;
}

.ps-dark-mode .hbn-wallet-link,
[data-theme="dark"] .hbn-wallet-link {
    background: #374151;
}

.ps-dark-mode .hbn-token-info,
[data-theme="dark"] .hbn-token-info {
    background: #1f2937;
    border-color: #374151;
}

.ps-dark-mode .hbn-token-info h3,
.ps-dark-mode .token-details strong,
[data-theme="dark"] .hbn-token-info h3,
[data-theme="dark"] .token-details strong {
    color: #f3f4f6;
}

.ps-dark-mode .token-details p,
[data-theme="dark"] .token-details p {
    color: #9ca3af;
}

.ps-dark-mode .token-details code,
[data-theme="dark"] .token-details code {
    background: #374151;
}

/* =====================================================
   MOBILE RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .hbn-wallet-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .hbn-wallet-dropdown__body {
        padding: 20px;
        padding-bottom: 30px;
    }
    
    .hbn-wallet-btn {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .hbn-wallet-shortcode .hbn-wallet-address,
    .hbn-wallet-shortcode .hbn-wallet-balance {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .hbn-wallet-shortcode .hbn-btn-secondary {
        margin-left: 0;
        margin-top: 8px;
    }
}

/* =====================================================
   OVERLAY BACKDROP (Mobile)
   ===================================================== */

.hbn-wallet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.hbn-wallet-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
