/* The pages of the w4os plugin and the blocks of the helpers, what they are made of in a browser and in a viewer alike. Light on
   purpose: the theme does the rest. The choices of each client are their own: w4os.web.css in a browser, w4os.viewer.css in a viewer
   (never both) */
.w4os-form { max-width: 44rem; container-type: inline-size; }
/* A field of a form of the plugin with its label beside it, where the form is wide enough: the label (and its help) in a margin on
   the left, the field on the right; one under the other otherwise. Only the layout: the theme's markup and looks as they are */
@container (min-width: 34rem) {
    .w4os-form .form-field:has(> :first-child label):has(> :nth-child(2)) { display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 3fr); gap: 0 1rem; align-items: start; }
    .w4os-form .form-field:has(> :first-child label) > :first-child { margin: 0; padding-top: .4rem; }
}
/* The forms of a profile as wide as its page, laid out as it is */
.w4os-form-profile { max-width: none; }
.w4os-help, .w4os-count { opacity: .8; font-size: .9em; }
.w4os-links { margin-top: 1rem; }
.w4os-links .button { margin-right: .5rem; }

/* The avatar models, as w4os shows them: pictures to pick, the chosen one outlined */
ul.w4os-models { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 1rem; }
ul.w4os-models > li { list-style: none; margin: 0; padding: 0; }
ul.w4os-models .w4os-model { display: block; width: 100%; cursor: pointer; position: relative; }
.w4os-model input { position: absolute; opacity: 0; }
.w4os-model figure { display: block; width: 100%; margin: 0; opacity: .55; transition: opacity .2s; border-radius: .4rem; outline-offset: 2px; }
.w4os-model:hover figure { opacity: .8; }
.w4os-model input:checked + figure { opacity: 1; outline: 2px solid currentColor; }
.w4os-model input:focus-visible + figure { outline: 2px dashed currentColor; }
.w4os-model img { display: block; width: 100%; max-width: none; background: color-mix(in srgb, currentColor 15%, transparent); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: .4rem; }
.w4os-model figcaption { text-align: center; padding: .3rem 0; }

/* The blocks of the helpers */
.block { margin: 1.5rem 0; }
/* The sections of a profile as the viewer's tabs: drawn by the theme as its forms' tabs (their classes, form-tabs...); a nav, so the
   theme's rules of nav (the list as wide as its content, pulled aside, padded items) are undone; on one line, scrolling sideways */
.profile-tabs { display: block; }
.profile-tabs li { list-style: none; margin: 0; padding: 0; }
.profile-tabs .tabs-nav { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; margin: 0 0 1.5rem; }
.profile-tabs .tab__link { white-space: nowrap; }
.w4os-note { font-style: italic; opacity: .8; }
.block-table { border-collapse: collapse; }
.block-table th, .block-table td { text-align: left; padding: .25rem .75rem .25rem 0; }

/* The grid added to a viewer: its button and the other link on a line, the login URI to copy under them */
.w4os-add-grid { margin: 1rem 0; }
.w4os-add-grid p { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .5rem 0; }
.w4os-add-grid .w4os-login-uri { overflow-wrap: anywhere; }
/* The login URI, the steps of a newcomer, the visit from another grid: the style of the views (views.css, Assets::page()); here what
   a theme needs. Their titles without the line a theme draws above its headings (Quark2: h2::before); the links of the steps as they
   are in a sidebar too, where a theme makes the links of a list blocks (Quark2: aside li a) */
.w4os-start-title::before, .w4os-callout-title::before { display: none; }
.w4os-start-step a { display: inline-block; }

.w4os-login-links { margin: 1rem 0 0; text-align: center; font-size: .9em; }
/* A list item emptied by [w4os-register] while registration is closed: hidden, the list numbered without it */
li:empty { display: none; }
/* The home page of a grid (templates/w4os/home.html.twig): one column, the text first; beside it, where the content is wide enough,
   what the grid is and its news; in three columns, as the splash page of the helpers, where it is wider still */
.w4os-home { container-type: inline-size; }
.w4os-home-layout { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
.w4os-home-grid, .w4os-home-news { overflow-wrap: anywhere; }
.w4os-home-grid > * + *, .w4os-home-news > * + * { margin-top: 2rem; }
/* Two columns: the news right under what the grid is, not halfway down the text */
@container (min-width: 46rem) {
    .w4os-home-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .w4os-home-main { grid-row: span 2; }
    .w4os-home-news { align-self: start; }
}
@container (min-width: 72rem) {
    .w4os-home-layout { grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); grid-template-rows: none; }
    .w4os-home-main { grid-row: auto; grid-column: 2; }
    .w4os-home-grid { grid-column: 1; grid-row: 1; }
    .w4os-home-news { grid-column: 3; grid-row: 1; }
}
/* The last news of the site on the home page: each its picture, title, excerpt and date, one under the other */
.w4os-latest-item { margin: 0; padding: 1rem 0; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.w4os-latest-item h4 { margin: 0 0 .35rem; font-size: 1rem; line-height: 1.3; }
.w4os-latest-item p { margin: 0; font-size: .9rem; }
.w4os-latest-image { display: block; margin-bottom: .6rem; line-height: 0; }
.w4os-latest-image img { width: 100%; height: auto; border-radius: .4rem; }
.w4os-latest .w4os-latest-date { margin-top: .35rem; font-size: .8rem; opacity: .7; }
.w4os-latest-all { margin: 0; padding-top: 1rem; border-top: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
/* The profile of an avatar (a block of the helpers): its picture beside its name */
.block-profile .block-title { display: flex; align-items: center; gap: 1rem; }
/* The rest of a profile (its banner, its details, its picks, its stream): the style of the views (views.css) */
.lead:empty { display: none; }
.w4os-thumb-large { width: 64px; height: 64px; }
/* The avatar on top of the 2nd Life tab of a profile form, as in the viewer */
.w4os-identity { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.w4os-identity-picture { display: block; flex: none; width: auto; height: auto; max-width: min(100%, 16rem); max-height: 12rem; object-fit: contain; border-radius: .4rem; }
.w4os-identity { flex-wrap: wrap; }
.w4os-identity-name { margin: 0 0 .25rem; font-weight: 600; }
.w4os-identity-details dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem 1rem; margin: 0; }
.w4os-identity-details dd { margin: 0; }
/* The blocks of the helpers in the pages of the site: their hidden labels, the search on one row, its topics together */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.block-search .search-form button { flex: none; white-space: nowrap; padding-inline: 1.25rem; }
.search-topics { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: .25rem 1rem; margin: .5rem 0 1rem; }
/* The text areas of the forms grow with their text (a script does it where the browser cannot) */
.w4os-autogrow { field-sizing: content; min-height: 5rem; max-height: 30rem; }

/* The tabs of the forms on one line, scrolling sideways when they do not fit */
.w4os-form .form-tabs .tabs-nav { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; }
.w4os-form .form-tabs .tabs-nav a { flex: 0 0 auto; white-space: nowrap; }
.w4os-photo { margin-bottom: 1rem; }

/* Tom Select (the languages of a profile) as one field: one line high while the tags fit, its lines and tints from the colour of
   the text, its list on the page's own background */
.ts-wrapper .ts-control { border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: .25rem; background: transparent; color: inherit; min-height: 2.5rem; padding: .25rem .5rem; align-items: center; box-shadow: none; }
.ts-wrapper.full .ts-control, .ts-wrapper.single .ts-control { background: transparent; }
.ts-wrapper .ts-control, .ts-wrapper .ts-control input, .ts-dropdown { font-size: inherit; line-height: inherit; color: inherit; }
.ts-wrapper.focus .ts-control { outline: 2px solid currentColor; outline-offset: 1px; box-shadow: none; }
.ts-wrapper .ts-control > input { flex: 1 1 4rem; width: auto; height: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; }
.ts-wrapper.multi .ts-control > div.item { background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; border-radius: .2rem; }
.ts-wrapper.multi .ts-control > div.item.active { background: color-mix(in srgb, currentColor 24%, transparent); color: inherit; }
.ts-wrapper .ts-control .item .remove[role=button] { display: inline-block; cursor: pointer; text-decoration: none; margin: 0 0 0 .4rem; padding: 0 .35rem; border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.ts-wrapper .ts-dropdown .option.active { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.ts-wrapper .ts-dropdown .create, .ts-wrapper .ts-dropdown .no-results { opacity: .7; }
.ts-dropdown { background: Canvas; color: CanvasText; border-color: color-mix(in srgb, currentColor 35%, transparent); }

/* The actions of a profile (its page and its forms) at the bottom right, in the wrapper of the buttons of the Form plugin */
.w4os-form-profile .buttons, .w4os-form-profile .button-wrapper { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; }

/* The links under the sign-in form, in any theme */
#grav-login .w4os-login-links { margin: 1rem 0 0; text-align: center; }
/* What the plugin and the helpers hide (the tabs of a profile) stays hidden, whatever a theme says of the display of its elements
   (Editorial: section { display: block }) */
.w4os [hidden] { display: none !important; }

/* The stream of its own avatar: the field compact (one line, growing as it is written or once it has the focus), a small button;
   the actions of a post in a small menu at its end (⋮), the size of the text, in the colors of the page */
.w4os-post-form { margin: 0 0 1.5rem; }
.w4os-post-form .form-field, .w4os-post-form .form-group { margin-bottom: .5rem; }
.w4os-post-form textarea.w4os-post-field { min-height: 2.5rem; height: auto; resize: vertical; }
.w4os-post-form textarea.w4os-post-field:focus, .w4os-post-form textarea.w4os-post-field:not(:placeholder-shown) { min-height: 5rem; }
.w4os-post-form button, .w4os-post-form .button { padding: .3rem .9rem; font-size: .875rem; min-height: 0; }
.w4os-post-menu { position: relative; font-size: .9em; }
.w4os-post-menu summary { list-style: none; cursor: pointer; padding: 0 .35rem; line-height: 1.2; opacity: .75; border-radius: .25rem; }
.w4os-post-menu summary::-webkit-details-marker { display: none; }
.w4os-post-menu summary::marker, .w4os-post-menu summary::before, .w4os-post-menu summary::after { content: none; display: none; }
.w4os-post-menu summary:hover, .w4os-post-menu[open] summary { opacity: 1; }
.w4os-post-menu .w4os-post-actions { position: absolute; right: 0; top: 100%; z-index: 20; display: grid; min-width: 8rem; margin: .25rem 0 0; padding: .25rem;
    color: CanvasText; background: Canvas; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: .4rem; }
.w4os-post-menu .w4os-post-action { all: unset; display: block; padding: .3rem .6rem; border-radius: .25rem; cursor: pointer; font: inherit; }
.w4os-post-menu .w4os-post-action:hover, .w4os-post-menu .w4os-post-action:focus-visible { background: color-mix(in srgb, currentColor 10%, transparent); }

/* The actions of a page (icons: view, edit, sign out), at the top right of its content, on the line of its tabs; in the color of
   the text around them */
.w4os-page-actions { float: right; display: flex; gap: .25rem; margin: 0 0 .5rem 1rem; position: relative; z-index: 1; }
.w4os-page-action { display: inline-flex; padding: .35rem; color: inherit; text-decoration: none; line-height: 1; }
.w4os-page-action:hover, .w4os-page-action:focus-visible { opacity: .7; }
.w4os-icon { width: 1.25rem; height: 1.25rem; }
/* A link to more (All news, See all, a page's own "Read more", in Markdown [Details](/page?classes=w4os-more)): on its own line,
   at the right, a chevron before it */
.w4os-more { display: block; margin-top: .6rem; text-align: right; font-weight: 600; }
.w4os-more::before { content: "\203A\00A0"; }
/* A picture of the grid (Site::pictureTag(), W4OS\Views\Picture): the picture on a tint while it loads; a person without one the
   engine's silhouette, faint; a place's gone when it cannot be loaded; never a broken picture, never initials */
.w4os-pic { display: inline-grid; place-items: center; flex: none; overflow: hidden; vertical-align: middle; background: color-mix(in srgb, currentColor 10%, transparent); }
.w4os-pic[hidden] { display: none; }
.w4os-pic img { grid-area: 1 / 1; display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* The picture of a profile form whole, in its own proportions */
.w4os-pic.w4os-identity-picture { display: block; background: none; }
.w4os-pic.w4os-identity-picture img { width: auto; height: auto; max-width: 100%; max-height: inherit; object-fit: contain; }
/* The columns of a list by the width of its card (not of the window, which the sidebar of the admin shares): the ones of priority 2
   (md), 3 (xl), 4 and more (xxl) from that width, folded in the grey line under the name below it; a long address breaks */
.w4os-list-card { container-type: inline-size; }
.w4os-list .w4os-tier-md, .w4os-list .w4os-tier-xl, .w4os-list .w4os-tier-xxl { display: none; }
.w4os-list td.w4os-cell-email { overflow-wrap: anywhere; min-width: 8rem; }
@container (min-width: 36rem) { .w4os-list .w4os-tier-md { display: table-cell; } .w4os-list .w4os-fold-md { display: none; } }
@container (min-width: 58rem) { .w4os-list .w4os-tier-xl { display: table-cell; } .w4os-list .w4os-fold-xl { display: none; } }
@container (min-width: 76rem) { .w4os-list .w4os-tier-xxl { display: table-cell; } .w4os-list .w4os-fold-xxl { display: none; } }
/* A teleport link (W4OS\Views\TeleportLink, js/tp-link.js): its main link, a small button beside it opening the menu of the other
   links of its client and the address to copy; the links of the other client hidden */

/* The profile in its block (the tabs, the banner: views.css): its banner and its picture as in w4os-wp */
.w4os-block-profile .profile-banner { display: flex; gap: 1.5em; align-items: flex-start; }
.w4os-block-profile .profile-photo img { max-width: 12em; height: auto; border-radius: .5em; display: block; }
