/* Gift Tax Calculator - Professional Styling */

/* CSS Variables for Gift-themed Design */
:root {
    --primary-color: #204080;
    --secondary-color: #5AC8FA;
    --accent-color: #0056CC;
    --light-blue: #E3F2FD;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --background: #FFFFFF;
    --background-light: #F8FAFC;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-gift: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Styles */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 40px 0 60px;
    background: var(--gradient-gift);
    color: white;
    border-radius: 16px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="gift-pattern" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="20" fill="url(%23gift-pattern)"/></svg>') repeat;
    opacity: 0.3;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
}

.hero-description {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* Calculator Wrapper */
.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Calculator Section */
.calculator-section {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.calculator-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculator-section h2::before {
    content: '🎁';
    font-size: 1.2em;
}

/* Form Styles */
.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-label.required::after {
    content: '*';
    color: var(--error-color);
    font-weight: bold;
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency-symbol {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    z-index: 1;
    font-size: 1rem;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    background-color: var(--background);
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

.input-field:has(+ .currency-symbol), 
.input-wrapper .input-field {
    padding-left: 32px;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(32, 64, 128, 0.1);
}

.input-field:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error-color);
}

.input-field.error {
    border-color: var(--error-color);
    animation: shake 0.3s ease-in-out;
}

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

.help-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.checkbox-input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background);
    transition: all 0.2s ease;
}

.checkbox-input:checked + .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-input:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Calculate Button */
.calculate-btn {
    background: var(--gradient-gift);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 16px;
    font-family: var(--font-family);
}

.calculate-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section */
.results-section {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.results-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.results-section h2::before {
    content: '📊';
    font-size: 1.2em;
}

.results-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--background-light);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-weight: 600;
    color: var(--text-primary);
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.result-value.positive {
    color: var(--success-color);
}

.result-value.negative {
    color: var(--error-color);
}

/* Recommendations Section */
.recommendations-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.recommendations-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recommendations-section h3::before {
    content: '💡';
    font-size: 1em;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    padding: 16px;
    background-color: var(--light-blue);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.recommendation-item h4 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.recommendation-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* Tax Limits Card */
.tax-limits-card {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tax-limits-card h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tax-limits-card h2::before {
    content: '📈';
    font-size: 1.2em;
}

.limits-grid {
    display: grid;
    gap: 16px;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--gradient-gift);
    border-radius: 8px;
    color: white;
}

.limit-label {
    font-weight: 500;
}

.limit-value {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Planning Strategies */
.planning-strategies {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.planning-strategies h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.planning-strategies h2::before {
    content: '🎯';
    font-size: 1.2em;
}

.strategy-grid {
    display: grid;
    gap: 16px;
}

.strategy-card {
    padding: 20px;
    background-color: var(--background-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.strategy-card h3 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.strategy-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* FAQ Section */
.faq-section {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.faq-section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.faq-section h2::before {
    content: '❓';
    font-size: 1.2em;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 20px;
    background-color: var(--background-light);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    transition: background-color 0.2s ease;
    font-family: var(--font-family);
}

.faq-question:hover {
    background-color: var(--light-blue);
}

.faq-question[aria-expanded="true"] {
    background-color: var(--primary-color);
    color: white;
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: var(--background);
}

.faq-answer.active {
    padding: 20px;
    max-height: 500px;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Related Calculators */
.related-calculators {
    background: var(--background);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.related-calculators h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-calculators h2::before {
    content: '🔗';
    font-size: 1.2em;
}

.calculator-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calculator-link {
    display: block;
    padding: 24px;
    background: var(--gradient-gift);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.calculator-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: white;
}

.calculator-link h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.calculator-link p {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--background);
    margin: 10% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    background: var(--gradient-gift);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 16px;
    color: var(--text-primary);
}

#errorList {
    list-style: none;
    padding: 0;
}

#errorList li {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: #FEF2F2;
    border-left: 4px solid var(--error-color);
    border-radius: 4px;
    color: #991B1B;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 16px 24px;
    background-color: var(--background-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary {
    padding: 8px 16px;
    background-color: var(--text-light);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    font-family: var(--font-family);
}

.btn-secondary:hover {
    background-color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        padding: 16px;
    }
    
    .hero-section {
        padding: 32px 20px 48px;
        margin-bottom: 32px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .calculator-wrapper {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .calculator-section,
    .results-section {
        padding: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .info-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .calculator-links {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .calculator-section,
    .results-section {
        padding: 20px;
    }
    
    .limits-grid,
    .strategy-grid {
        gap: 12px;
    }
    
    .limit-item,
    .strategy-card {
        padding: 12px 16px;
    }
} 