/* Author profile, Figma 7067:151812. Colours come from the collection tokens in search.css (light + html.mm-dark). */
.mm-author-profile { padding-bottom: 0; }
.mm-author-header { display: flex; flex-direction: column; align-items: center; }
/* The cover runs edge to edge (Figma: full frame width), out of the site's centred main column. */
.mm-author-cover { width: 100vw; height: 240px; margin: 0 calc(50% - 50vw) -40px; overflow: hidden; }
/* 100vw includes the scrollbar; clip on the root so the page can't scroll sideways (on body it doesn't stop that). */
html:has(.mm-author-profile) { overflow-x: clip; }
.mm-author-cover img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.mm-author-identity { position: relative; display: flex; align-items: flex-start; gap: 20px; }
.mm-author-avatar { flex: none; width: 160px; height: 160px; padding: 4px; border: 1px solid rgba(217, 217, 217, .54); border-radius: 9999px; background: rgba(255, 255, 255, .4); }
.mm-author-avatar img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; border: 1px solid rgba(0, 0, 0, .08); border-radius: 9999px; box-shadow: 0 1px 2px rgba(10, 13, 18, .05); }
.mm-author-heading { display: flex; flex: 1 1 0; flex-direction: column; gap: 16px; min-width: 0; padding-top: 64px; }
.mm-author-name { display: flex; flex-direction: column; gap: 4px; }
.mm-author-profile .mm-author-name h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: 0; color: var(--mm-ed-text) !important; overflow-wrap: anywhere; }
.mm-author-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--mm-ed-muted); font-size: 16px; line-height: 24px; }
.mm-author-country { display: inline-flex; align-items: center; gap: 6px; }
.mm-author-country img { width: 20px; height: 20px; margin: 0; }
.mm-author-country + .mm-author-since { padding-left: 8px; border-left: 1px solid var(--mm-ed-border); }
.mm-author-social { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; list-style: none; }
.mm-author-social li { margin: 0; padding: 0; }
.mm-author-social a { display: block; border-radius: 4px; }
.mm-author-social a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.mm-author-social-icon { display: block; width: 20px; height: 20px; background: var(--mm-ed-secondary); mask: var(--mm-author-icon) center / contain no-repeat; -webkit-mask: var(--mm-author-icon) center / contain no-repeat; }
.mm-author-social a:hover .mm-author-social-icon { background: var(--mm-ed-text); }
.mm-author-social-x { --mm-author-icon: url("assets/author-social-x.svg"); }
.mm-author-social-threads { --mm-author-icon: url("assets/author-social-threads.svg"); }
.mm-author-social-youtube { --mm-author-icon: url("assets/author-social-youtube.svg"); }
.mm-author-social-linkedin { --mm-author-icon: url("assets/author-social-linkedin.svg"); }

.mm-author-about { margin-top: 32px; }
.mm-author-profile .mm-author-about h2 { margin: 0 0 8px; font-size: 16px; line-height: 24px; font-weight: 500; color: var(--mm-ed-text) !important; }
.mm-author-profile .mm-author-bio { margin: 0; color: var(--mm-ed-muted) !important; font-size: 16px; line-height: 24px; font-weight: 400; overflow-wrap: anywhere; }
.mm-author-bio[data-clamped] { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mm-author-profile .mm-author-bio-toggle { margin: 0; padding: 0; border: 0; background: none; color: var(--mm-ed-text); font: inherit; font-size: 16px; line-height: 24px; font-weight: 600; cursor: pointer; }
.mm-author-bio-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Search and filters: one row (320 px field, Filter on the right), active filters below. */
.mm-author-articles { margin-top: 32px; }
.mm-author-profile .mm-editorial-search .mm-editorial-search-input { grid-column: 1; }
.mm-author-profile .mm-editorial-search .mm-editorial-filter-button { grid-column: 2; grid-row: 1; justify-self: end; }
.mm-author-profile .mm-editorial-grid { margin: 64px 0; }
.mm-author-profile .mm-editorial-grid + p { margin: 0 0 64px; color: var(--mm-ed-muted); }

/* Pagination: text buttons without a frame (Figma 7067:151860). */
.mm-author-profile .mm-editorial-pagination > a, .mm-author-profile .mm-editorial-pagination > button { border: 0; color: var(--mm-ed-muted); background-color: transparent; box-shadow: none; }
.mm-author-profile .mm-editorial-pagination > .mm-editorial-page-previous { padding: 0 0 0 28px; background-position: 0 center; }
.mm-author-profile .mm-editorial-pagination > .mm-editorial-page-next { padding: 0 28px 0 0; background-position: right 0 center; }
.mm-author-profile .mm-editorial-page-numbers a, .mm-author-profile .mm-editorial-page-numbers span { color: var(--mm-ed-quaternary); font-weight: 500; }
.mm-author-profile .mm-editorial-page-numbers a[aria-current] { color: var(--mm-ed-secondary); background: var(--mm-ed-soft); font-weight: 500; }
html.mm-dark .mm-author-profile .mm-editorial-page-numbers a[aria-current] { background: #22262f; }

/* Phone, Figma 7068:154261 ("Profile 4 - Phone"). Followers, stats and Follow are left out, as on desktop. */
@media (max-width: 767px) {
    .mm-author-cover { height: 160px; margin-bottom: -48px; }
    .mm-author-identity { flex-direction: column; gap: 16px; }
    .mm-author-avatar { width: 96px; height: 96px; }
    .mm-author-avatar img { box-shadow: 0 20px 24px -4px rgba(10, 13, 18, .08), 0 8px 8px -4px rgba(10, 13, 18, .03), 0 3px 3px -1.5px rgba(10, 13, 18, .04); }
    .mm-author-heading { width: 100%; padding-top: 0; }
    .mm-author-name { gap: 2px; }
    .mm-author-profile .mm-author-name h1 { font-size: 20px; line-height: 30px; }
    .mm-author-about, .mm-author-articles { margin-top: 32px; }
    .mm-author-bio[data-clamped] { -webkit-line-clamp: 5; }
    .mm-author-profile .mm-editorial-search .mm-editorial-search-input, .mm-author-profile .mm-editorial-search .mm-editorial-filter-button { grid-column: 1; grid-row: auto; justify-self: stretch; }
    /* "Rensa": full-width text button under the active filters. */
    .mm-author-profile .mm-editorial-search .mm-editorial-clear { width: 100%; justify-self: stretch; text-align: center; padding: 10px 16px !important; font-size: 16px !important; line-height: 24px !important; font-weight: 600; }
    .mm-author-profile .mm-editorial-grid { margin: 48px 0; row-gap: 40px; }
    /* Pagination: framed icon buttons around "Sida X av Y", as on the overview. */
    .mm-author-profile .mm-editorial-pagination { padding-top: 16px; }
    .mm-author-profile .mm-editorial-pagination > a, .mm-author-profile .mm-editorial-pagination > button { width: 36px; min-width: 36px; height: 36px; padding: 8px !important; border: 1px solid var(--mm-ed-border); box-shadow: 0 1px 2px rgba(10, 13, 18, .05); background-position: center !important; }
    .mm-author-profile .mm-editorial-page-status { color: var(--mm-ed-secondary); }
}
