/* Enhanced Scanner Styling */

/* Fix dropdown and input visibility */
select, input[type="text"], input[type="number"], input[type="password"] {
    background: #2d2d41 !important;
    color: #ffffff !important;
    border: 2px solid rgba(0, 255, 136, 0.3) !important;
    padding: 10px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
}

select option {
    background: #2d2d41 !important;
    color: #ffffff !important;
    padding: 8px !important;
}

select:hover, input:hover {
    border-color: rgba(0, 255, 136, 0.5) !important;
}

select:focus, input:focus {
    border-color: #00ff88 !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3) !important;
    outline: none !important;
}

/* Symbol Selection Panel */
.symbol-selector {
    background: rgba(30, 30, 45, 0.95);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    max-height: 600px;
    overflow-y: auto;
}

.symbol-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 255, 136, 0.2);
}

.symbol-selector-title {
    font-size: 18px;
    font-weight: bold;
    color: #00ff88;
}

.selector-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.selector-controls input {
    flex: 1;
    min-width: 200px;
}

.selector-controls select {
    min-width: 150px;
}

/* Group styling */
.symbol-group {
    background: rgba(40, 40, 60, 0.5);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0, 255, 136, 0.1);
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
}

.group-header:hover {
    background: rgba(0, 255, 136, 0.2);
}

.group-header.collapsed {
    border-bottom: none;
}

.group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    color: #ffffff;
}

.group-icon {
    font-size: 20px;
}

.group-count {
    background: rgba(0, 255, 136, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #00ff88;
}

.group-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.collapse-icon {
    font-size: 16px;
    color: #00ff88;
    transition: transform 0.3s;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.group-select-btn {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
    border: 1px solid #00ff88;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.group-select-btn:hover {
    background: rgba(0, 255, 136, 0.3);
}

/* Symbol list */
.symbol-list {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.symbol-list.collapsed {
    display: none;
}

.symbol-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(50, 50, 70, 0.5);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.symbol-item:hover {
    background: rgba(60, 60, 80, 0.7);
    transform: translateX(3px);
}

.symbol-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.symbol-name {
    font-size: 13px;
    color: #ffffff;
}

/* Selection summary */
.selection-summary {
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-text {
    font-size: 16px;
    color: #00ff88;
    font-weight: bold;
}

.scan-selected-btn {
    background: linear-gradient(45deg, #00ff88, #00ccff);
    color: #1a1a2e;
    font-weight: bold;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.scan-selected-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.4);
}

.scan-selected-btn:disabled {
    background: rgba(100, 100, 100, 0.3);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar styling */
.symbol-selector::-webkit-scrollbar,
.symbol-list::-webkit-scrollbar {
    width: 8px;
}

.symbol-selector::-webkit-scrollbar-track,
.symbol-list::-webkit-scrollbar-track {
    background: rgba(30, 30, 45, 0.5);
    border-radius: 4px;
}

.symbol-selector::-webkit-scrollbar-thumb,
.symbol-list::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 136, 0.3);
    border-radius: 4px;
}

.symbol-selector::-webkit-scrollbar-thumb:hover,
.symbol-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 136, 0.5);
}

/* Loading state */
.loading-symbols {
    text-align: center;
    padding: 40px;
    color: #00ff88;
    font-size: 16px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 255, 136, 0.2);
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    .symbol-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .selection-summary {
        flex-direction: column;
        gap: 15px;
    }
}
