/* css/diodes.css */

.tool-page-container {
    padding: 2rem 0 6rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.tool-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.lookup-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.search-panel {
    text-align: center;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--bg-base);
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.popular-searches {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.tag:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Results Panel */
.results-panel {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.diode-graphic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 2rem;
}

.wire {
    width: 60px;
    height: 4px;
    background: #94a3b8; /* silver wire */
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.5);
}

.diode-body {
    height: 40px;
    width: 120px;
    background: #111; /* black body */
    border-radius: 4px;
    display: flex;
    align-items: center;
    box-shadow: inset 0 -5px 10px rgba(0,0,0,0.5), inset 0 5px 10px rgba(255,255,255,0.2), 0 5px 10px rgba(0,0,0,0.5);
    position: relative;
}

.cathode-band {
    height: 100%;
    width: 12px;
    background: #e2e8f0; /* silver band */
    margin-left: 10px;
}

.diode-label {
    position: absolute;
    width: 100%;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    pointer-events: none;
}

#resultTitle {
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.2rem;
}

.diode-type {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.spec-item {
    background: rgba(0,0,0,0.2);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spec-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.spec-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
}

.equivalents-section {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
}

.equivalents-section h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.equivalents-section p {
    color: var(--text-main);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results svg {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-muted);
}

/* Loading Spinner */
.loading-container {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.3s ease;
}

.loading-container h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Multiple Results */
.multiple-results {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.5s ease;
}

.multiple-results h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.multiple-results p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.option-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.opt-part {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--primary);
}

.opt-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
}
