/* ============================================
   Calculadora-Hipoteca.com - Custom Styles
   ============================================ */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Custom range input */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Result cards animation */
.result-card {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}
.result-card.show {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse animation for CTA */
@keyframes subtle-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}
.btn-pulse { animation: subtle-pulse 2s infinite; }

/* Number input - hide arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

/* Table striped */
.table-striped tbody tr:nth-child(even) {
    background-color: #f9fafb;
}
.table-striped tbody tr:hover {
    background-color: #eff6ff;
}

/* Loading spinner */
.spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #059669 100%);
}

/* Card hover effect */
.tool-card {
    transition: all 0.2s ease;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Amortization table scroll */
.amort-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
}
.amort-table-wrapper thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Chart container */
.chart-container {
    position: relative;
    width: 100%;
    max-height: 400px;
}

/* Glossary letter nav */
.letter-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.15s;
}
.letter-nav a:hover,
.letter-nav a.active {
    background-color: #2563eb;
    color: white;
}

/* Print styles for amortization table */
@media print {
    nav, footer, .no-print { display: none !important; }
    body { background: white !important; }
    .amort-table-wrapper { max-height: none; overflow: visible; }
}
