/* ===== Global ===== */
html, body {
    font-family: 'Roboto', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
    margin: 0;
    padding: 0;
}

.flag-icon {
    margin-right: 8px;
    width: 1.4em;
    height: 1em;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

h1:focus { outline: none; }

/* ===== Blazor error UI ===== */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ===== Loading ===== */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #1565C0;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando");
}

/* ===== Currículo Template (A4 preview) ===== */
.curriculo-template {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10pt;
    line-height: 1.45;
    color: #222;
    background: #fff;
    padding: 40px 44px;
    max-width: 210mm;
    margin: 0 auto;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Name */
.cv-name {
    font-size: 18pt;
    font-weight: 700;
    margin: 0 0 2px 0;
    color: #000;
    letter-spacing: 0.5px;
}

/* Contact line */
.cv-contact {
    font-size: 8.5pt;
    color: #444;
    margin: 0 0 4px 0;
    line-height: 1.5;
}

/* Additional info line (CNH, etc.) */
.cv-info-extra {
    font-size: 8.5pt;
    color: #444;
    margin: 0 0 10px 0;
    padding-bottom: 0;
}

/* Section */
.cv-section {
    margin-bottom: 10px;
}

/* Section title — black underline, no background */
.cv-section-title {
    font-size: 10.5pt;
    font-weight: 700;
    text-transform: uppercase;
    color: #000;
    margin: 0 0 6px 0;
    padding: 0 0 3px 0;
    border-bottom: 1.5px solid #000;
    letter-spacing: 0.3px;
}

/* Entry (experience, education, course) — indented under section title */
.cv-entry {
    margin-bottom: 8px;
    padding-left: 14px;
}

.cv-entry-title {
    font-size: 10pt;
    font-weight: 700;
    color: #000;
}

.cv-entry-sub {
    font-size: 9pt;
    color: #555;
    margin-top: 1px;
    font-style: italic;
    padding-left: 8px;
}

/* Bullet lists — further indented under entry */
.cv-bullets {
    margin: 3px 0 0 0;
    padding: 0 0 0 26px;
    font-size: 9.5pt;
    color: #333;
}
.cv-bullets li {
    margin-bottom: 2px;
}

/* Skills — two column layout, indented */
.cv-skills {
    margin: 0;
    padding: 0 0 0 32px;
    list-style: disc;
    columns: 2;
    column-gap: 24px;
    font-size: 9.5pt;
}
.cv-skills li {
    margin-bottom: 3px;
    break-inside: avoid;
}

/* Text paragraphs — indented under section title */
.cv-text {
    margin: 0;
    padding-left: 14px;
    font-size: 9.5pt;
    color: #333;
    font-style: italic;
}

/* ===== Print styles ===== */
@media print {
    .curriculo-template {
        box-shadow: none;
        padding: 20mm;
    }
}

/* ===== Blog content ===== */
.blog-content {
    font-size: 1.05rem;
    line-height: 1.75;
}
.blog-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
}
.blog-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.5rem;
}
.blog-content p {
    margin: 0 0 1rem;
}
.blog-content ul, .blog-content ol {
    margin: 0 0 1rem 1.5rem;
}
.blog-content li {
    margin-bottom: 0.3rem;
}
.blog-content strong {
    font-weight: 600;
}

.layout-header .mud-toolbar-appbar,
.layout-footer .mud-toolbar {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.layout-title {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
}

.layout-footer-content {
    width: 100%;
    max-width: 100%;
    padding: 2px 0;
}

.layout-footer-links {
    width: 100%;
}

.layout-footer-links .mud-typography,
.layout-footer-links a {
    min-width: 0;
}

/* Footer is a Color.Surface (white) bar — the default Secondary (green) links
   failed WCAG AA there. Pin the surface white and use the brand blue for links,
   matching the header and the prerendered static footer. */
.layout-footer,
.layout-footer .mud-toolbar {
    background-color: #fff !important;
}
.layout-footer-links a {
    color: #1565C0 !important;
}

/* The footer is a fixed bottom bar; reserve its real height (tracked by JS in
   --cf-footer-height) so page content never scrolls underneath and gets hidden. */
.mud-main-content {
    padding-bottom: calc(var(--cf-footer-height, 72px) + 16px) !important;
}

/* ===== WhatsApp Fab — stay clear of bottom footer =====
   --cf-footer-height is updated by JS (curriculoLayout.observeFooterHeight)
   so the FAB tracks the footer's actual height across languages/viewports. */
.whatsapp-fab {
    bottom: calc(var(--cf-footer-height, 56px) + 16px) !important;
    z-index: 1500 !important;
}

/* ===== Mobile responsive tweaks ===== */
@media (max-width: 600px) {
    .curriculo-template {
        padding: 16px;
        font-size: 9pt;
    }
    .cv-name {
        font-size: 14pt;
    }
    .cv-skills {
        columns: 1;
    }
    .footer-bar,
    .footer-bar .mud-toolbar {
        white-space: normal;
        height: auto !important;
        min-height: 48px;
        padding-left: 8px;
        padding-right: 8px;
    }
    .layout-header .mud-toolbar-appbar {
        gap: 2px;
    }
    .layout-title {
        font-size: 1rem;
    }
    .layout-footer .mud-toolbar {
        align-items: center;
        padding-top: 10px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .layout-footer-content {
        gap: 6px !important;
    }
    .layout-footer-links {
        justify-content: center;
        row-gap: 4px;
    }
    .layout-footer-links .mud-typography,
    .layout-footer-links a {
        overflow-wrap: anywhere;
    }
    .mud-main-content {
        padding-bottom: 110px !important;
    }
}
