/* World pages since the makeover (owner 2026-10-25, mockup "World page"): the parts of partials/featured-world.html
   and partials/world-parts.html that site.css does not draw: the map box's saved picture, the featured map card with
   its details beside it (home and player pages), the description, details, uploader and comments, the fullscreen
   page's bar, the browse tabs, the search card and the not-found page. Loaded by world.html, the live
   worlds/world.html, world-full.html, home.html, browse.html, search.html, 404.html and user.html (featured world).
   The upload page has its own upload.css. */

/* The one main action of a page (Download, Return Home) is bold, also when it is disabled. */
.ui-page .ui-btn-lg { font-weight: bold; }

/* ---- Map box: a saved picture where there is no live map ---- */
.ui-map-still > #world_map { display: flex; align-items: center; justify-content: center; padding: 20px; }
.ui-map-still > #world_map img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.ui-map > #world_map .map-note { padding: 0; color: #ccc; font-size: 15px; }
.ui-page .ui-map-none { height: 120px; }  /* nothing to show: a slim box with the note */

/* ---- Featured map card: map left, details right; details under the map on narrow windows ---- */
.world-hero { display: flex; flex-wrap: wrap; overflow: hidden; }
.world-hero-map { flex: 999 1 560px; min-width: 0; }
.world-hero-map > .ui-map { height: 400px; border: 0; border-radius: 0; box-shadow: none; }
.world-hero-info { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 20px 22px; }
.world-hero-info .ui-chip { font-weight: bold; }
.ui-page .world-hero-info h1, .ui-page .world-hero-info h2 { font-size: 24px; line-height: 1.2; overflow-wrap: anywhere; }
.world-hero-info h1 a, .world-hero-info h2 a { color: var(--ui-text) !important; }
.world-hero-stats { margin: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.world-hero-stats dt { font-size: 12px; font-weight: normal; color: var(--ui-muted); }
.world-hero-stats dd { margin: 0; font-size: 17px; font-weight: bold; color: var(--ui-text); }
.world-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.world-hero-user .world-hero-map > .ui-map { height: 320px; }

/* ---- About, details, uploader ---- */
/* min-height, margins, size: mcwm-original.css still styles this old class (a 150 px tall description); the text is
   site.css .ui-prose */
.ui-page .world_description { min-height: 0; margin: 0; font-size: 15px; }
.ui-page .world_tags { margin: 0; line-height: inherit; }
.world_description img { max-width: 100%; height: auto; }
.ui-page .ui-dl dd.world-seed { font-family: Menlo, Consolas, monospace; white-space: nowrap; overflow-wrap: normal; }
/* A long description (over 1,200 characters) shows its start and a "Show more" that opens the rest; browsers
   without :has() show it whole. */
.world-desc-more { display: none; }
@supports selector(:has(a)) {
  .world-desc-long > .world_description { max-height: 22em; overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
  .world-desc-long:has(.world-desc-more[open]) > .world_description { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .world-desc-more { display: block; margin-top: 4px; }
  .world-desc-more > summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--ui-link);
    font-weight: bold; cursor: pointer; list-style: none; }
  .world-desc-more > summary::-webkit-details-marker { display: none; }
  .world-desc-more > summary::after { content: " \25BE"; margin-left: 4px; }
  .world-desc-more[open] > summary { font-size: 0; }
  .world-desc-more[open] > summary::before { content: "Show less"; font-size: 14px; }
  .world-desc-more[open] > summary::after { content: " \25B4"; font-size: 14px; }
}
/* ---- More by <uploader> (world-parts.html more_by_card) ---- */
.world-more-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.world-more-list a {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px; margin: 0 -6px; border-radius: 6px;
  color: var(--ui-text) !important; text-decoration: none !important;
}
.world-more-list a:hover { background: #eef2f6; }
.world-more-pic { flex: none; width: 64px; height: 40px; border-radius: 4px; object-fit: cover; background: #1c1c1c; }
.world-more-nopic { background: #e9eef3 url('/assets/minecraft-logo-icon.png') no-repeat center / 16px auto; image-rendering: pixelated; }
.world-more-text { display: flex; flex-direction: column; min-width: 0; }
.world-more-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.world-more-all { font-size: 13px; }

/* ---- Comments ---- */
.world-closed { display: flex; align-items: center; gap: 6px; margin: 0; padding: 12px 22px; border-bottom: 1px solid var(--ui-soft-line);
  background: var(--ui-tint-2); font-size: 13px; color: var(--ui-muted); }
.world-closed .ui-btn { font-size: 14px; }
.world-comment-form { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 16px 22px; border-bottom: 1px solid var(--ui-soft-line); }
.world-comment { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--ui-soft-line); }
.world_comments > .world-comment:last-child { border-bottom: 0; }
.world-comment > img { flex: none; width: 36px; height: 36px; border-radius: 4px; image-rendering: pixelated; object-fit: cover; }
.world-comment-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 4px; }
.world-comment .comment_data { font-size: 15px; line-height: 1.55; color: var(--ui-text); overflow-wrap: anywhere; }
.world-comment .comment_data img { max-width: 100%; height: auto; }
.world-quote { margin: 0 0 8px; padding: 8px 12px; border: 0; border-radius: 6px; background: var(--ui-tint); font-size: 14px; color: #4a5560; }

@media (max-width: 600px) {
  .world-hero-map > .ui-map { height: 280px; }
  .world-hero-info { padding: 14px 16px; }
  .world-closed, .world-comment-form, .world-comment { padding-left: 16px; padding-right: 16px; }
}

/* ---- /worlds/<id>/full: a slim bar over the map that fills the rest of the window ---- */
.ui-page.full-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1001; max-width: none; height: 56px; margin: 0; padding: 0 12px;
  flex-direction: row; align-items: center; gap: 12px; background: #fff; border-bottom: 1px solid var(--ui-line);
}
.ui-page.full-bar .full-title { min-width: 0; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-by { flex: none; font-size: 13px; color: var(--ui-muted); }
.full-actions { margin-left: auto; flex: none; }
html.world-full #world_map { top: 56px; }
@media (max-width: 600px) {
  .full-by { display: none; }
  .full-actions .ui-btn-note { display: none; }
}

/* ---- Lists (browse.html), search (search.html) and the not-found page ---- */
.browse-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 22px 14px; }
.browse-cats a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--ui-control);
  border-radius: 16px; background: #fff; color: #333 !important; font-size: 13px; text-decoration: none !important; }
.browse-cats a:hover { background: #eef2f6; }
.browse-cats a[aria-current] { border-color: var(--ui-go); background: var(--ui-go); color: #fff !important; font-weight: bold; }
.search-head { margin: 0; }
.search-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.search-row > .ui-input[type="search"] { flex: 999 1 260px; width: auto; }
.search-row > select.ui-input { flex: 1 1 180px; width: auto; }
.not-found { max-width: 560px; width: 100%; margin: 12px auto 0; }
.not-found .search-row { flex-wrap: nowrap; align-self: stretch; }
.not-found .search-row > .not-found-input { flex: 1 1 auto; min-width: 0; min-height: 42px; }
.not-found .ui-row .ui-btn { flex: 1 1 auto; }

.search-none { grid-column: 1 / -1; }
[data-world-list] [hidden] { display: none; }  /* search.js hides the pager strip when nothing matches */
