/* Ethereum Converter Table Styling */
.ethereum-converter-table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.ethereum-converter-table thead th {
    background-color: var(--bs-primary-text-emphasis);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 1rem 0.75rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
}

.ethereum-converter-table thead th:first-child {
    border-top-left-radius: 0.375rem;
}

.ethereum-converter-table thead th:last-child {
    border-top-right-radius: 0.375rem;
}

/* Dark mode header */
[data-bs-theme="dark"] .ethereum-converter-table thead th {
    background-color: var(--bs-primary-text-emphasis);
}

.ethereum-converter-table tbody tr {
    border-bottom: 1px solid var(--bs-border-color);
    transition: background-color 0.2s ease;
}

.ethereum-converter-table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

[data-bs-theme="dark"] .ethereum-converter-table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.15);
}

.ethereum-converter-table tbody tr.table-active {
    background-color: rgba(13, 110, 253, 0.08);
}

[data-bs-theme="dark"] .ethereum-converter-table tbody tr.table-active {
    background-color: rgba(13, 110, 253, 0.2);
}

.ethereum-converter-table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Unit labels */
.unit-label {
    font-weight: 500;
    font-size: 1rem;
    color: var(--bs-emphasis-color);
    min-width: 120px;
}

.unit-desc {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    font-family: 'Courier New', monospace;
    min-width: 150px;
}

/* Input styling */
.eth-input {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    text-align: right;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    width: 100%;
    min-width: 200px;
}

.eth-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
    background-color: var(--bs-body-bg);
}

.eth-input.fw-bold {
    font-weight: 600;
    font-size: 1rem;
}

[data-bs-theme="dark"] .eth-input {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    border-color: var(--bs-border-color);
}

[data-bs-theme="dark"] .eth-input:focus {
    background-color: var(--bs-dark);
    border-color: var(--bs-primary);
}

/* Reset button styling */
.btn.fsvg {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
}

.btn.fsvg svg {
    width: 1rem;
    height: 1rem;
}

/* Table responsive */
.table-responsive {
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .table-responsive {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* About section table styling */
.row.mt-5 .table thead th {
    background-color: var(--bs-primary-text-emphasis);
    color: white;
    font-weight: 600;
    padding: 0.75rem;
}

[data-bs-theme="dark"] .row.mt-5 .table thead th {
    background-color: var(--bs-primary-text-emphasis);
}

.row.mt-5 .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="dark"] .row.mt-5 .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ethereum-converter-table thead th,
    .ethereum-converter-table tbody td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .unit-label {
        font-size: 0.9rem;
        min-width: 80px;
    }

    .unit-desc {
        font-size: 0.8rem;
        min-width: 100px;
    }

    .eth-input {
        font-size: 0.85rem;
        min-width: 150px;
        padding: 0.4rem 0.6rem;
    }

    .eth-input.fw-bold {
        font-size: 0.9rem;
    }
}

/* Smooth animations */
.eth-input {
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Highlight on change animation */
@keyframes highlightChange {
    0% {
        background-color: rgba(13, 110, 253, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.eth-input.changed {
    animation: highlightChange 0.5s ease-out;
}
