/**
 * Income Tax Calculator Styles
 * Clean, modular CSS for the income tax calculator
 */

/* Country Dropdown Styles */
.country-dropdown {
    position: relative;
    width: 100%;
}

.country-dropdown input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.country-dropdown input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.country-dropdown .options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.country-dropdown .options.show {
    display: block;
}

.country-dropdown .option {
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    display: none;
}

.country-dropdown .option:hover {
    background-color: #f3f4f6;
}

.country-dropdown .option.visible {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Input Styles */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Country-specific Fields */
.country-field {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.country-field.active {
    display: block;
}

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

/* Button Styles */
.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Result Cards */
.tax-result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.result-card {
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
}

/* Country Flag Styles */
.country-flag {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Tax Breakdown Styles */
.tax-breakdown-item {
    transition: all 0.2s ease;
}

.tax-breakdown-item:hover {
    background-color: #f9fafb;
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .country-dropdown .options {
        max-height: 150px;
    }
    
    .calculate-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
    
    .result-card {
        margin-bottom: 0.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message Styles */
.error-message {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Success Animation */
.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}
