/* Yhdistele Calculator Styles */

#yhd-calculator {
    font-family: 'Inter', sans-serif;
}

/* Debt row cards for expert mode */
.yhd-debt-row {
    background: #f6f7f8;
    border: 1px solid rgba(15, 23, 41, 0.05);
    border-radius: 0.75rem;
    padding: 1rem;
    position: relative;
    transition: box-shadow 0.2s;
}

.yhd-debt-row:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.yhd-debt-row .yhd-remove-debt {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #ef4444;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0.25rem;
    border-radius: 50%;
}

.yhd-debt-row .yhd-remove-debt:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.1);
}

/* Debt row grid layout */
.yhd-debt-fields {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.8fr 0.8fr 0.8fr;
    gap: 0.75rem;
    align-items: end;
}

@media (max-width: 768px) {
    .yhd-debt-fields {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .yhd-debt-fields .yhd-field:first-child {
        grid-column: 1 / -1;
    }
}

.yhd-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.yhd-field input,
.yhd-field select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.yhd-field input:focus,
.yhd-field select:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Mode toggle active states */
.yhd-mode-btn.active {
    background: white;
    color: #0f1729;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.yhd-mode-btn:not(.active) {
    background: transparent;
    color: #6b7280;
}

/* Animations */
@keyframes yhd-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.yhd-animate-in {
    animation: yhd-fadeIn 0.3s ease-out forwards;
}

/* Results pulse on update */
@keyframes yhd-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.yhd-result-pulse {
    animation: yhd-pulse 0.3s ease-out;
}

/* "Syömähammas" highlight */
.yhd-fee-highlight {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
}

.yhd-fee-highlight p {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.875rem;
}
