/* InductorColorCodeCalculator.css
 * Calculator-specific styles only
 * DO NOT redefine global classes: .glass-card, .form-input, .btn-custom, etc.
 * See GLOBAL_CSS_CLASSES.md for reference
 *
 * Based on ResistorColorCodeCalculator.css, adapted for inductor-specific needs
 */

/* ================================
   Tab Navigation
   ================================ */
.inductor-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.inductor-tab {
    flex: 1;
    padding: 12px 15px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.inductor-tab:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.inductor-tab.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.08);
}

.inductor-tab i {
    margin-right: 6px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================
   Band Count Selector
   ================================ */
.band-count-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.band-count-btn {
    flex: 1;
    padding: 10px 15px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
}

.band-count-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.band-count-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

/* ================================
   Color Band Selector
   ================================ */
.band-selector-container {
    margin-bottom: 20px;
}

.band-selector-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px;
    background: #f7fafc;
    border-radius: 10px;
}

.band-label {
    min-width: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
}

.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.color-option {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.15);
    z-index: 1;
}

.color-option.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    transform: scale(1.1);
}

.color-option::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: #718096;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.color-option:hover::after {
    opacity: 1;
}

/* Color definitions */
.color-black { background: #000000; }
.color-brown { background: #8B4513; }
.color-red { background: #FF0000; }
.color-orange { background: #FFA500; }
.color-yellow { background: #FFFF00; border-color: #d4d400; }
.color-green { background: #008000; }
.color-blue { background: #0000FF; }
.color-violet { background: #EE82EE; }
.color-gray { background: #808080; }
.color-white { background: #FFFFFF; border-color: #ccc; }
.color-gold { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); }
.color-silver { background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%); }

/* Selected color display */
.selected-color-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    border-radius: 8px;
    min-width: 90px;
}

.selected-color-preview {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.selected-color-name {
    font-size: 0.85rem;
    color: #4a5568;
}

/* ================================
   Inductor Visualization
   ================================ */
.inductor-visual-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

.inductor-body {
    position: relative;
    width: 180px;
    height: 55px;
    background: linear-gradient(to bottom, #d4c4a8 0%, #b8a888 50%, #9c8c70 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Inductor wire leads */
.inductor-body::before,
.inductor-body::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 4px;
    background: linear-gradient(to bottom, #c0c0c0 0%, #a0a0a0 50%, #808080 100%);
}

.inductor-body::before {
    left: -35px;
}

.inductor-body::after {
    right: -35px;
}

.visual-band {
    width: 14px;
    height: 45px;
    border-radius: 2px;
    transition: background 0.3s ease;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.visual-band.empty {
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    border: 1px dashed #9c8c70;
}

.visual-band.spacer {
    width: 18px;
    background: transparent;
    box-shadow: none;
}

/* ================================
   Result Display
   ================================ */
.result-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 25px;
    color: white;
    text-align: center;
    margin-bottom: 20px;
}

.result-value-main {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Roboto Mono', monospace;
}

.result-tolerance {
    font-size: 1.2rem;
    opacity: 0.9;
}

.result-range {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.range-item {
    text-align: center;
}

.range-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.range-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Roboto Mono', monospace;
}

/* ================================
   Common Values Reference
   ================================ */
.common-values-container {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
}

.common-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.common-value-item {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-family: 'Roboto Mono', monospace;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.common-value-item:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-1px);
}

.common-value-item.match {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

/* ================================
   Input Section
   ================================ */
.input-group-custom {
    margin-bottom: 15px;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
}

.input-label i {
    color: #667eea;
}

/* ================================
   Reverse Calculation Results
   ================================ */
.reverse-result-container {
    display: grid;
    gap: 15px;
}

.reverse-result-item {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
}

.reverse-result-label {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reverse-result-bands {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.reverse-band-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    font-size: 0.85rem;
}

.reverse-band-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.reverse-band-name {
    color: #4a5568;
}

.reverse-result-note {
    font-size: 0.8rem;
    color: #718096;
    margin-top: 8px;
}

.reverse-result-value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #667eea;
    font-family: 'Roboto Mono', monospace;
}

/* ================================
   Color Code Table (SEO Section)
   ================================ */
.color-code-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 20px 0;
}

.color-code-table th,
.color-code-table td {
    padding: 10px 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.color-code-table th {
    background: #f7fafc;
    font-weight: 600;
    color: #4a5568;
}

.color-code-table td {
    background: white;
}

.table-color-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
    margin-right: 6px;
}

/* ================================
   Help Text
   ================================ */
.help-text {
    font-size: 0.85rem;
    color: #718096;
    padding: 10px;
    background: #f7fafc;
    border-radius: 8px;
    margin-top: 10px;
}

.help-text i {
    color: #667eea;
    margin-right: 6px;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .inductor-tabs {
        flex-direction: column;
        gap: 5px;
    }

    .inductor-tab {
        padding: 10px;
    }

    .band-count-selector {
        flex-direction: column;
    }

    .band-selector-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .band-label {
        min-width: auto;
    }

    .color-options {
        width: 100%;
        justify-content: flex-start;
    }

    .inductor-body {
        width: 150px;
        height: 45px;
        gap: 8px;
        padding: 0 15px;
    }

    .visual-band {
        width: 12px;
        height: 35px;
    }

    .result-value-main {
        font-size: 2rem;
    }

    .result-range {
        flex-direction: column;
        gap: 15px;
    }

    .common-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .color-code-table {
        font-size: 0.8rem;
    }

    .color-code-table th,
    .color-code-table td {
        padding: 6px 4px;
    }
}

/* ================================
   Utility Classes
   ================================ */
.text-mono {
    font-family: 'Roboto Mono', monospace;
}

.hidden {
    display: none !important;
}
