/* Pension Annual Allowance Calculator - Enhanced Styles */

.paa-root { 
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.paa-root * { 
    box-sizing: border-box; 
}

.paa-container { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    width: 100%;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.paa-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #EBF2F4;
}

.paa-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #083141;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.paa-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.paa-info-toggle {
    background: #083141;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.paa-info-toggle:hover {
    background: #0a3d52;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(8, 49, 65, 0.2);
}

/* Education Section */
.paa-education {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

.paa-education h2 {
    color: #083141;
    font-size: 1.8rem;
    margin: 0 0 20px 0;
}

.paa-education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.paa-education-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.paa-education-card h3 {
    color: #083141;
    font-size: 1.3rem;
    margin: 0 0 12px 0;
}

.paa-education-card p {
    color: #555;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.paa-education-card ul {
    margin: 12px 0;
    padding-left: 20px;
    color: #555;
}

.paa-education-card li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Section Styles */
.paa-section {
    margin-bottom: 40px;
    padding: 24px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.paa-section-title {
    color: #083141;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #083141;
}

.paa-help-text {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-style: italic;
}

/* Input Styles */
.paa-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.paa-input-block {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.paa-label {
    display: block;
    font-weight: 600;
    color: #083141;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.paa-label-desc {
    display: block;
    font-weight: normal;
    color: #666;
    font-size: 0.85rem;
    margin-top: 4px;
    font-style: italic;
}

.paa-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.paa-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.paa-input:focus {
    outline: none;
    border-color: #083141;
    box-shadow: 0 0 0 3px rgba(8, 49, 65, 0.1);
}

.paa-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #083141;
}

.paa-tooltip-btn {
    color: #083141;
    cursor: pointer;
    font-size: 0.9em;
    margin-left: 4px;
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: #EBF2F4;
    transition: all 0.2s ease;
}

.paa-tooltip-btn:hover {
    background: #083141;
    color: #fff;
}

.paa-tooltip-popup {
    position: fixed;
    z-index: 10000;
    background: #fff;
    border: 2px solid #083141;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
    padding: 0;
    animation: tooltipFadeIn 0.2s ease;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.paa-tooltip-content {
    padding: 12px 16px;
    position: relative;
}

.paa-tooltip-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.paa-tooltip-close:hover {
    background: #f0f0f0;
    color: #083141;
}

.paa-tooltip-content p {
    margin: 0;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.5;
    padding-right: 20px;
}

/* Results Section */
.paa-results {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #083141;
}

/* Metrics Grid */
.paa-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.paa-metric-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.paa-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.paa-metric-primary {
    border-color: #083141;
    background: linear-gradient(135deg, #083141 0%, #0a3d52 100%);
    color: #fff;
}

.paa-metric-primary .paa-metric-title,
.paa-metric-primary .paa-metric-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.paa-metric-success {
    border-color: #4CAF50;
    background: linear-gradient(135deg, #f1f8f4 0%, #ffffff 100%);
}

.paa-metric-warning {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
}

.paa-metric-neutral {
    border-color: #9e9e9e;
}

.paa-metric-title {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.paa-metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #083141;
    margin-bottom: 8px;
    line-height: 1.2;
}

.paa-metric-primary .paa-metric-value {
    color: #fff;
}

.paa-metric-subtitle {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

/* Charts */
.paa-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.paa-chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.paa-chart-card h3 {
    color: #083141;
    font-size: 1.2rem;
    margin: 0 0 16px 0;
    text-align: center;
}

.paa-chart-card canvas {
    max-height: 300px;
}

/* Table Styles */
.paa-results-table-wrapper {
    margin-bottom: 32px;
}

.paa-results-table-wrapper h3 {
    color: #083141;
    font-size: 1.3rem;
    margin: 0 0 16px 0;
}

.paa-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.paa-table th {
    background: #083141;
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.paa-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.paa-table tr:last-child td {
    border-bottom: none;
}

.paa-table tr:hover {
    background: #f5f5f5;
}

/* Badge Styles */
.paa-badge {
    padding: 6px 12px;
    display: inline-block;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.paa-badge.paa-success {
    background: #d4edda;
    color: #155724;
}

.paa-badge.paa-warning {
    background: #fff3cd;
    color: #856404;
}

.paa-badge.paa-primary {
    background: #083141;
    color: #fff;
}

.paa-badge.paa-neutral {
    background: #e9ecef;
    color: #495057;
}

/* Tax Breakdown */
.paa-tax-breakdown {
    margin-bottom: 32px;
}

.paa-tax-breakdown h3 {
    color: #083141;
    font-size: 1.3rem;
    margin: 0 0 16px 0;
}

.paa-tax-card {
    background: linear-gradient(135deg, #f1f8f4 0%, #ffffff 100%);
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 24px;
}

.paa-tax-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.05rem;
}

.paa-tax-row:last-child {
    border-bottom: none;
}

.paa-tax-net {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 2px solid #4CAF50;
    font-size: 1.2rem;
    font-weight: 600;
}

.paa-tax-row strong {
    color: #083141;
    font-size: 1.1em;
}

.paa-highlight {
    color: #4CAF50 !important;
    font-size: 1.3em !important;
}

.paa-tax-note {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    font-style: italic;
}

/* Alert Styles */
.paa-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid;
}

.paa-alert.paa-success {
    background: #d4edda;
    border-color: #4CAF50;
    color: #155724;
}

.paa-alert.paa-warning {
    background: #fff3cd;
    border-color: #ff9800;
    color: #856404;
}

.paa-alert strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.paa-alert p {
    margin: 0;
    line-height: 1.6;
}

/* Print-Friendly Summary */
.paa-print-summary {
    margin-top: 32px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.paa-print-summary h3 {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2c3e50;
    font-size: 1.25rem;
}

.paa-summary-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.paa-summary-content p {
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.paa-summary-content p:last-child {
    border-bottom: none;
}

.paa-summary-content strong {
    color: #495057;
    margin-right: 8px;
}

/* Scenario Comparison Section */
.paa-scenario {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid #e9ecef;
}

.paa-scenario-details {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9ecef;
}

.paa-subsection-title {
    margin-top: 0;
    margin-bottom: 16px;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.paa-scenario-input {
    margin-bottom: 24px;
    margin-top: 24px;
}

.paa-scenario-results {
    margin-top: 24px;
}

.paa-scenario-placeholder {
    margin-top: 24px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
    text-align: center;
}

.paa-scenario-placeholder p {
    margin: 0;
    color: #666;
    font-style: italic;
}

.paa-scenario-comparison {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.paa-comparison-table {
    margin-bottom: 24px;
}

.paa-pot-growth {
    margin-top: 24px;
}

.paa-pot-growth h3 {
    margin-bottom: 12px;
    color: #2c3e50;
}

/* Responsive Design */
@media (max-width: 768px) {
    .paa-container {
        padding: 16px;
    }

    .paa-title {
        font-size: 2rem;
    }

    .paa-subtitle {
        font-size: 1rem;
    }

    .paa-section {
        padding: 16px;
    }

    .paa-input-grid {
        grid-template-columns: 1fr;
    }

    .paa-metrics-grid {
        grid-template-columns: 1fr;
    }

    .paa-charts-grid {
        grid-template-columns: 1fr;
    }

    .paa-education-grid {
        grid-template-columns: 1fr;
    }

    .paa-table {
        font-size: 0.9rem;
    }

    .paa-table th,
    .paa-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .paa-title {
        font-size: 1.75rem;
    }

    .paa-metric-value {
        font-size: 1.5rem;
    }

    .paa-tax-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Print Styles */
@media print {
    .paa-container {
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .paa-info-toggle,
    .paa-chart-card {
        display: none;
    }

    .paa-section {
        page-break-inside: avoid;
    }

    .paa-summary-content {
        grid-template-columns: 1fr;
    }

    .paa-scenario-comparison {
        gap: 24px;
    }
}

/* Print Styles */
@media print {
    .paa-print-summary {
        background: white;
        border: 2px solid #000;
        page-break-inside: avoid;
    }

    .paa-scenario {
        page-break-before: always;
    }

    .paa-input-block,
    .paa-charts-grid,
    .paa-alert {
        page-break-inside: avoid;
    }
}
