/* Canada Calculator – vivid sky blue theme (distinct from NZ bright blue and AU dark blue). */

:root {
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
}

/* Long tooltip: above icon, left-aligned, wraps */
.tooltip-icon-long:hover::after {
    left: 0;
    right: auto;
    transform: none;
    white-space: normal;
    max-width: min(280px, calc(100vw - 2rem));
    width: max-content;
}

.tooltip-icon-long:hover::before {
    left: 12px;
    transform: none;
}

/* Results card – clean UK-style layout (monthly first, weekly secondary) */
.results-section .results-card {
    padding: 20px;
}

.results-section .total-cost {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: none;
    text-align: center;
}

.results-section .total-cost-monthly-first .total-primary-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #fff;
    text-align: center;
}

.results-section .total-cost-monthly-first .total-primary-amount {
    display: block;
    font-size: 2.15rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: #fff;
    letter-spacing: -0.02em;
    text-align: center;
}

.results-section .total-cost-monthly-first .total-secondary-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2px;
    text-align: center;
}

.results-section .total-cost-monthly-first .total-secondary-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

.results-section .breakdown {
    gap: 8px;
    margin-bottom: 16px;
}

.results-section .breakdown-item {
    padding: 10px 12px;
    font-size: 0.9rem;
    flex-wrap: nowrap;
    color: #fff;
}

.results-section .breakdown-item-label {
    white-space: nowrap;
    color: inherit;
}

.results-section .breakdown-item-value {
    white-space: nowrap;
    color: inherit;
    text-align: right;
}

.results-section .income-comparison {
    margin-top: 16px;
    padding-top: 16px;
}

.results-section .comparison-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    flex-wrap: nowrap;
    color: #fff;
}

.results-section .comparison-item > span {
    white-space: nowrap;
}

.results-section .comparison-item.highlight {
    font-size: 0.95rem;
}

.results-section .comparison-item.highlight.positive {
    color: #047857;
}

.results-section .comparison-item.highlight.negative {
    color: #b45309;
}

.results-section .results-note {
    margin: 16px 0 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.35;
    text-align: center;
}

/* Income guidance - subtle helper text */
.income-guidance {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border-left: 3px solid rgba(2, 132, 199, 0.3);
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #64748b;
}

/* What Costs Include – one block with icons */
.content-section .cost-include-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin: 20px 0 24px 0;
    padding: 0;
    background: #f8fafc;
    border: 1px solid rgba(2, 132, 199, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.content-section .cost-include-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

.content-section .cost-include-item:last-child {
    border-bottom: none;
}

.content-section .cost-include-item:hover {
    background: rgba(2, 132, 199, 0.04);
}

.content-section .cost-include-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-section .cost-include-icon svg {
    width: 22px;
    height: 22px;
}

.content-section .cost-include-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.content-section .cost-include-text strong {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.content-section .cost-include-text span {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #475569;
}

@media (min-width: 640px) {
    .content-section .cost-include-block {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-section .cost-include-item {
        padding: 16px 20px;
    }

    .content-section .cost-include-item:nth-child(odd) {
        border-right: 1px solid rgba(0, 0, 0, 0.05);
    }

    .content-section .cost-include-item:nth-last-child(-n+2) {
        border-bottom: none;
    }
}

/* Guides section after calculator */
.guides-section {
    margin-top: 28px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.06) 0%, rgba(2, 132, 199, 0.02) 100%);
    border: 1px solid rgba(2, 132, 199, 0.15);
    border-radius: 16px;
}

.guides-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.guides-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guides-icon svg {
    width: 24px;
    height: 24px;
}

.guides-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.guides-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid rgba(2, 132, 199, 0.12);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.guide-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
    transform: translateY(-2px);
}

.guide-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(2, 132, 199, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.guide-card-content {
    flex: 1;
    min-width: 0;
}

.guide-card-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2px;
}

.guide-card-desc {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.guide-card-arrow {
    flex-shrink: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.guide-card:hover .guide-card-arrow {
    opacity: 1;
    transform: translateX(4px);
}

@media (min-width: 640px) {
    .guides-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
    
    .guide-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 16px;
    }
    
    .guide-card-icon {
        width: 52px;
        height: 52px;
        font-size: 1.6rem;
    }
    
    .guide-card-arrow {
        display: none;
    }
}
