/* Jelzáloghitel Kalkulátor CSS - Modern Design */

/* Alap stílusok */
.jelzaloghitel-kalkulator-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
}

/* Kalkulátor konténer */
.calculator {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.5s ease-in-out;
}

.calculator h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Input csoportok */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group input::placeholder {
    color: #999;
}

/* Számítás gomb */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Eredmények */
.results {
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-left: 4px solid #667eea;
}

.results h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e1e5e9;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    color: #555;
    font-weight: 500;
}

.result-item .value {
    color: #667eea;
    font-weight: 600;
    font-size: 18px;
}

/* Törlesztési táblázat */
.amortization-table {
    margin-top: 30px;
}

.amortization-table h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
    text-align: center;
}

.amortization-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.amortization-table th {
    background: #667eea;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.amortization-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e1e5e9;
    font-size: 14px;
}

.amortization-table tr:nth-child(even) {
    background: #f8f9fa;
}

.amortization-table tr:hover {
    background: #e3f2fd;
}

/* Reszponzív design */
@media (max-width: 768px) {
    .calculator {
        padding: 25px;
        margin: 10px;
    }
    
    .calculator h2 {
        font-size: 24px;
    }
    
    .amortization-table {
        overflow-x: auto;
    }
    
    .amortization-table table {
        font-size: 12px;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    .calculator {
        padding: 20px;
    }
    
    .input-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .result-item .value {
        font-size: 16px;
    }
}

/* Animációk */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading állapot */
.calculate-btn.loading {
    background: #ccc;
    cursor: not-allowed;
}

.calculate-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Hiba állapot */
.input-group.error input {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.error-message.show {
    display: block;
} 