/* Zinseszinsrechner - Tool-specific styles */

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.result-item {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    background: var(--bg-tertiary, #f0f0f0);
}

.result-item.highlight {
    background: var(--color-primary, #2563eb);
    color: #fff;
}

.result-item.highlight .result-label {
    color: rgba(255, 255, 255, 0.85);
}

.result-label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary, #666);
}

.result-item .result-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
}

.result-item.highlight .result-value {
    color: #fff;
}

/* Chart bar */
.chart-bar {
    margin-top: 1.25rem;
}

.chart-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--text-secondary, #666);
}

.chart-legend {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.chart-legend.deposit {
    background: var(--color-primary, #2563eb);
}

.chart-legend.interest {
    background: var(--color-success, #16a34a);
}

.chart-bar-track {
    display: flex;
    height: 24px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-tertiary, #e5e7eb);
    margin-top: 0.5rem;
}

.chart-bar-fill.deposit {
    background: var(--color-primary, #2563eb);
    transition: width 0.5s ease;
}

.chart-bar-fill.interest {
    background: var(--color-success, #16a34a);
    transition: width 0.5s ease;
}

/* Breakdown table */
.breakdown-wrapper h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.breakdown-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.breakdown-table thead {
    background: var(--bg-tertiary, #f3f4f6);
}

.breakdown-table th,
.breakdown-table td {
    padding: 0.65rem 1rem;
    text-align: right;
    white-space: nowrap;
}

.breakdown-table th:first-child,
.breakdown-table td:first-child {
    text-align: center;
}

.breakdown-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary, #666);
}

.breakdown-table tbody tr:nth-child(even) {
    background: var(--bg-secondary, #f9fafb);
}

.breakdown-table tbody tr:hover {
    background: var(--bg-tertiary, #f0f0f0);
}

/* Fade-in animation */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

/* Mobile responsive */
@media (max-width: 640px) {
    .result-grid {
        grid-template-columns: 1fr;
    }

    .breakdown-table th,
    .breakdown-table td {
        padding: 0.5rem 0.65rem;
        font-size: 0.8rem;
    }
}
