/*
 * Interaction and motion enhancements for CoffeeCost Pro.
 */

a,
button,
input,
select,
textarea,
.detail-card,
.result-item,
.breakeven-card,
.overview-card,
.chart-item,
.result-section,
.risk-card,
.equipment-table tbody tr {
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease,
        background-color 220ms ease,
        color 220ms ease;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--coffee-muted);
    opacity: 0.72;
}

.coffee-calc-results-modern .result-section,
.coffee-calc-results-modern .risk-card {
    animation: coffeeFadeUp 480ms ease both;
}

.coffee-calc-results-modern .project-details { animation-delay: 60ms; }
.coffee-calc-results-modern .report-overview-modern { animation-delay: 120ms; }
.coffee-calc-results-modern .fixed-assets-modern { animation-delay: 180ms; }
.coffee-calc-results-modern .equipment-details-modern { animation-delay: 240ms; }
.coffee-calc-results-modern .operating-costs-modern { animation-delay: 300ms; }
.coffee-calc-results-modern .financial-forecast-modern { animation-delay: 360ms; }
.coffee-calc-results-modern .breakeven-modern { animation-delay: 420ms; }

.result-item:hover,
.breakeven-card:hover,
.detail-card:hover,
.overview-card:hover,
.chart-item:hover,
.equipment-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: var(--coffee-shadow-md);
}

.coffee-calc-button:hover,
.coffee-calc-button:focus-visible {
    outline: none;
}

.coffee-calc-button:focus-visible,
.coffee-calc-form input:focus-visible,
.coffee-calc-form select:focus-visible {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--coffee-accent) 18%, white);
}

@keyframes coffeeFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    a,
    button,
    input,
    select,
    textarea,
    .detail-card,
    .result-item,
    .breakeven-card,
    .overview-card,
    .chart-item,
    .result-section,
    .risk-card,
    .equipment-table tbody tr {
        transition: none !important;
    }

    .coffee-calc-results-modern .result-section,
    .coffee-calc-results-modern .risk-card {
        animation: none !important;
    }
}

@media print {
    .coffee-calc-button,
    .results-actions {
        display: none !important;
    }

    body {
        background: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .coffee-calculator-container,
    .coffee-calc-results,
    .coffee-user-reports-container {
        box-shadow: none !important;
        border-radius: 0 !important;
        border: none !important;
        margin: 0 !important;
        max-width: 100% !important;
    }

    .result-section,
    .risk-card,
    .detail-card,
    .result-item,
    .breakeven-card,
    .overview-card,
    .chart-item,
    .equipment-table-container {
        box-shadow: none !important;
        break-inside: avoid;
    }
}
