/* ToeslagBuddy Enhanced Styles */

/* Calculator Button Hover Effects */
.card[style*="transition"] {
    cursor: pointer;
}

.card[style*="transition"]:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.calculator-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    font-display: swap;
}

.calculator-container h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.form-group legend {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-height: 48px;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-weight: normal;
    min-height: 48px;
    padding: 0.5rem;
}

.radio-label input[type="radio"] {
    margin-right: 0.5rem;
    min-width: 20px;
    min-height: 20px;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 48px;
    min-width: 120px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.result-container {
    margin-top: 2rem;
}

.result-box {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.result-box.eligible {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.result-box.not-eligible {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.result-box.error {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

.result-icon {
    font-size: 2rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.result-text {
    flex: 1;
    min-width: 0;
}

.result-text h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
    word-wrap: break-word;
}

.result-text p {
    margin: 0 0 1rem 0;
    color: #666;
    word-wrap: break-word;
    line-height: 1.5;
}

.result-disclaimer {
    padding: 1rem;
    background: rgba(255,255,255,0.8);
    border-radius: 6px;
    border-left: 4px solid #667eea;
    margin-top: 1rem;
    word-wrap: break-word;
}

.result-disclaimer small {
    color: #555;
    line-height: 1.4;
    display: block;
}

/* Mobile responsiveness fixes */
@media (max-width: 768px) {
    .result-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }
    
    .result-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .result-text {
        width: 100%;
        text-align: left;
    }
    
    .calculator-container {
        padding: 1rem;
    }
}

/* Enhanced content styling */
article {
    line-height: 1.6;
}

article h1 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

article h2 {
    color: #444;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

article h3 {
    color: #555;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

article p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

article ul, article ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

article li {
    margin-bottom: 0.5rem;
}

article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

article th, article td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

article th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

article a {
    color: #667eea;
    text-decoration: none;
}

article a:hover {
    text-decoration: underline;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .calculator-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .result-box {
        flex-direction: column;
        text-align: center;
    }
    
    .result-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    article h1 {
        font-size: 1.5rem;
    }
    
    article h2 {
        font-size: 1.25rem;
    }
    
    article table {
        font-size: 0.875rem;
    }
    
    article th, article td {
        padding: 0.5rem;
    }
}

/* Performance optimizations */
@supports (font-display: swap) {
    * {
        font-display: swap;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus indicators */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* CLS optimization */
.main-content {
    min-height: 60vh;
}

/* Ad spacing */
.ad-container {
    margin: 2rem 0;
    text-align: center;
    min-height: 100px;
}

.ad-label {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}