/* ================================================
   CONVERTERS TOOL - STYLES
   ================================================ */

.converter-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 1rem;
}

.tab-button {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    border-radius: 0;
}

.tab-button:hover {
    color: var(--primary-color);
    background: var(--bg-hover);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Dark mode tab styles */
:root[data-theme="dark"] .tab-button {
    color: var(--text-secondary);
}

:root[data-theme="dark"] .tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ================================================
   CONVERTER CONTENT SECTIONS
   ================================================ */

.converter-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.converter-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.converter-content h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* ================================================
   CONVERTER ROWS (INPUT LAYOUT)
   ================================================ */

.converter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
}

@media (max-width: 600px) {
    .converter-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.converter-row .input-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.converter-row label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.converter-row input[type="number"],
.converter-row select {
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 0.375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.converter-row input[type="number"]:focus,
.converter-row select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.converter-row input[type="number"]::placeholder {
    color: var(--text-secondary);
}

/* Dark mode input styles */
:root[data-theme="dark"] .converter-row input[type="number"],
:root[data-theme="dark"] .converter-row select {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

/* ================================================
   RESULT BOX
   ================================================ */

.result-box {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 0.5rem;
    border: 2px solid var(--primary-color);
    align-items: center;
}

.result-box input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
}

.result-box input:focus {
    outline: none;
}

.result-box .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.result-box .btn:active {
    transform: scale(0.98);
}

/* Dark mode result box */
:root[data-theme="dark"] .result-box {
    border-color: var(--primary-color);
}

:root[data-theme="dark"] .result-box input {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 900px) {
    .converter-tabs {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.25rem;
    }

    .tab-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .converter-tabs {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }

    .tab-button {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
    }

    .converter-content h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .result-box {
        flex-direction: column;
        gap: 0.5rem;
    }

    .result-box input {
        width: 100%;
    }

    .result-box .btn {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .converter-tabs {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .tab-button {
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
    }
}

/* ================================================
   UTILITY STYLES
   ================================================ */

/* Active state for buttons */
.tab-button:active {
    transform: translateY(2px);
}

/* Smooth transitions for theme changes */
.converter-content,
.converter-row,
.result-box,
.tab-button {
    transition: all 0.3s ease;
}
