/**
 * txid-input-enhancer.css - Enhanced TXID Input Styles
 * 
 * CSP-Safe: External CSS file only
 * Uses existing CSS variables from metanet.css
 */

/* ==================== Input Wrapper Position Context ==================== */
header {
    position: relative;
}

/* ==================== QR Button ==================== */
.txid-qr-button {
    position: absolute;
    right: 130px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #0e1530;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--fg);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.txid-qr-button:hover {
    border-color: #2a3b6b;
    transform: translateY(-50%) scale(1.05);
}

.txid-qr-button:active {
    transform: translateY(-50%) scale(0.95);
}

/* ==================== Dropdown Container ==================== */
.txid-dropdown {
    position: absolute;
    top: 100%;
    left: 80px;
    right: auto;
    width: 400px;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.txid-dropdown.visible {
    display: block;
}

/* ==================== Dropdown Sections ==================== */
.txid-dropdown-section {
    padding: 8px 0;
}

.txid-dropdown-section:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.txid-dropdown-label {
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

/* ==================== Dropdown Items ==================== */
.txid-dropdown-item {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.txid-dropdown-item:hover,
.txid-dropdown-item.selected {
    background: #1b2445;
}

.txid-dropdown-item.selected {
    border-left: 3px solid var(--accent);
}

.txid-dropdown-txid {
    font-family: monospace;
    font-size: 13px;
    color: var(--fg);
}

/* ==================== Empty State ==================== */
.txid-dropdown-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

/* ==================== Keyboard Navigation Hints ==================== */
.txid-dropdown-item[aria-selected="true"]::before {
    content: '›';
    margin-right: 4px;
    color: var(--accent);
    font-weight: bold;
}

/* ==================== Scrollbar Styling ==================== */
.txid-dropdown::-webkit-scrollbar {
    width: 8px;
}

.txid-dropdown::-webkit-scrollbar-track {
    background: #0e1530;
    border-radius: 4px;
}

.txid-dropdown::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.txid-dropdown::-webkit-scrollbar-thumb:hover {
    background: #2a3b6b;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .txid-qr-button {
        right: 100px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .txid-dropdown {
        left: 10px;
        right: 10px;
        width: auto;
        max-height: 300px;
    }
    
    .txid-dropdown-item {
        padding: 12px;
    }
}
