/*
 * The site's look as of early 2018 roblox.com, on top of rbx2016.css (which it shares its base with).
 * Values are from docs/roblox-2018-site-research.md (archived Jan to Jul 2018 CSS) and period screenshots of logged-in
 * pages, which the archive doesn't have. Colours use rbx2016.css's tokens, so the site themes still apply.
 */

/* ============================================================ type */
body { font-weight: 300; font-size: 16px; }
h1, h2, h4, h5 { font-weight: 400; line-height: 1em; }
h3 { font-size: 24px; font-weight: 300; line-height: 1em; }
.container-header { margin: 3px 0 6px; }

/* ============================================================ top bar */
.rbx-navbar-brand .brand-wordmark { height: 26px; width: auto; max-width: none; }
.rbx-navbar .nav-menu-title { font-weight: 400; padding: 6px 9px; border-radius: 5px; }
.rbx-navbar .nav-menu-title:hover, .rbx-navbar .nav-menu-title.active { background: rgba(25, 25, 25, 0.1); }
.rbx-navbar-right { align-items: center; }
.rbx-navbar-right .age-bracket-label {
  color: #fff; font-size: 14px; font-weight: 400; white-space: nowrap; padding: 0 9px;
}
.rbx-navbar-right .age-bracket-label a { color: inherit; }
.rbx-navbar-right .age-bracket-label a:hover { text-decoration: underline; }
.rbx-navbar-right .rbx-menu-item > .ti { font-size: 24px; vertical-align: middle; }
/* ============================================================ left column */
.rbx-left-col { width: 175px; box-shadow: 0 0 3px 0 rgba(25, 25, 25, 0.3); }
.rbx-left-col ul { padding: 5px 10px 0; }
.rbx-left-col li { margin: 5px 0; line-height: 1.42857; }
.rbx-left-col .text-header { padding: 4px 0 9px; margin-bottom: 7px; border-bottom: 1px solid var(--rbx-divider); font-weight: 400; }
.rbx-left-col .text-nav { font-weight: 400; color: var(--rbx-text); padding: 3px 0; border-radius: 0; background: none; }
.rbx-left-col .text-nav i { font-size: 22px; width: 26px; color: var(--rbx-text); }
.rbx-left-col .text-nav:hover, .rbx-left-col .text-nav.active { background: none; color: var(--rbx-blue); }
.rbx-left-col .text-nav:hover i, .rbx-left-col .text-nav.active i { color: var(--rbx-blue); }
.rbx-left-col .text-nav.active span:not(.notification-blue) { font-weight: 400; }
.rbx-left-col .rbx-upgrade-now { margin: 12px 0; }
.rbx-left-col .rbx-upgrade-now .btn-secondary-md { display: block; text-align: center; font-weight: 600; font-size: 16px; padding: 7px 0; }

/* ============================================================ home */
.home-header { margin-bottom: 12px; }

/* ============================================================ footer */
.rbx-footer { background: var(--rbx-surface); padding: 12px; }
.rbx-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: center; max-width: 970px; margin: 20px auto 32px; padding-left: 0; list-style: none; border: 0; }
.rbx-footer .footer-link { margin: 6px 12px; white-space: nowrap; text-align: center; }
.rbx-footer .text-footer-nav { color: var(--rbx-label); font-size: 21px; font-weight: 300; }
.rbx-footer .text-footer-nav:hover { color: var(--rbx-text); }
.rbx-footer .text-footer-nav.privacy { color: var(--rbx-blue); }
.rbx-footer .footer-note { width: 78%; max-width: 760px; margin: 12px auto; text-align: center; border: 0; padding: 0; }
.rbx-footer .text-footer { font-size: 12px; font-weight: 400; color: var(--rbx-label); }

/* ============================================================ game cards */
.game-card { width: 161px; padding: 0 11px 0 0; margin-bottom: 12px; flex: 0 0 161px; }
.game-card-container {
  display: block; height: 223px; background: var(--rbx-surface); border-radius: 3px; overflow: hidden;
  box-shadow: 0 1px 4px 0 rgba(25, 25, 25, 0.3); transition: box-shadow 200ms ease;
}
.game-card-container:hover { box-shadow: 0 1px 6px 0 rgba(25, 25, 25, 0.75); }
.game-card-thumb-container { width: 150px; height: 150px; border-radius: 3px 3px 0 0; overflow: hidden; }
.game-card-thumb { width: 150px; height: 150px; object-fit: cover; }
.game-card-name { font-size: 16px; font-weight: 400; color: var(--rbx-text); margin: 0; padding: 4px 6px 0; line-height: 20px; height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-card-name-secondary { font-size: 12px; font-weight: 400; color: var(--rbx-text-secondary); margin: 0; padding: 2px 6px 0; line-height: 16px; height: 18px; }
.game-card-vote { display: flex; align-items: center; margin: 0; padding: 6px 6px 0; height: 26px; }
.game-card-vote i { font-size: 13px; color: var(--rbx-label); margin-right: 5px; transition: color 200ms ease; }
.game-card-vote .vote-container { flex: 1; margin: 0; }
.game-card-container:hover .game-card-vote i { color: var(--rbx-green); }

/* ============================================================ games page */
/* The header's search covers games, as it did then. A search or sort still shows its results below. */
#view-games .games-search { display: none; }
#view-games .games-filter-bar { margin: 3px 0 12px; }
#view-games .games-filter-bar select { width: 170px; font-weight: 400; }
#view-games .section { margin-bottom: 15px; }
/* The games page was wider than the usual 970px column, stepping with the window. */
.rbx-content:has(#view-games.active) { max-width: 1410px; padding-left: 51px; padding-right: 51px; }
@media (max-width: 767px) { .rbx-content:has(#view-games.active) { padding-left: 15px; padding-right: 15px; } }
.games-row { position: relative; }
.games-row .game-cards, .games-row.has-arrows .game-cards { padding: 3px; margin: -3px; }
.games-row-scroll {
  width: 30px; height: 223px; top: 3px; bottom: auto; background: var(--rbx-surface); border: 1px solid var(--rbx-border);
  border-radius: 0; color: var(--rbx-text-secondary); box-shadow: none;
}
.games-row-scroll.is-left { left: -36px; display: none; }
.games-row-scroll.is-right { right: -36px; }
.games-row.is-scrolled .games-row-scroll.is-left { display: flex; }
.games-row.at-end .games-row-scroll.is-right { display: none; }

/* ============================================================ item cards */
.catalog-items, .avatar-items { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.catalog-items { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.avatar-items { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.catalog-items .item-card, .avatar-items .item-card {
  width: auto; margin: 0; padding: 0 0 5px; background: var(--rbx-surface); border-radius: 3px; min-width: 0; position: relative;
  box-shadow: 0 1px 4px 0 rgba(25, 25, 25, 0.3); transition: box-shadow 200ms ease;
}
.catalog-items .item-card:hover, .avatar-items .item-card:hover { box-shadow: 0 1px 6px 0 rgba(25, 25, 25, 0.75); }
.catalog-items .item-card-thumb-container, .avatar-items .item-card-thumb-container {
  display: block; width: 100%; aspect-ratio: 1; border: 0; border-radius: 3px 3px 0 0; background: var(--rbx-surface); padding: 0; position: relative; overflow: hidden;
}
.catalog-items .item-card-thumb-container img, .avatar-items .item-card-thumb-container img { width: 100%; height: 100%; object-fit: contain; }
.catalog-items .item-card-name, .avatar-items .item-card-name {
  display: block; font-size: 14px; font-weight: 400; color: var(--rbx-text); padding: 4px 6px 0; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.catalog-items .item-card-creator { font-size: 12px; font-weight: 400; color: var(--rbx-label); padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-items .item-card-creator a { color: var(--rbx-blue); }
.catalog-items .item-card-price { font-size: 14px; font-weight: 400; color: var(--rbx-green); padding: 0 6px; }

/* ============================================================ catalog */
.catalog-header h1 { font-size: 36px; font-weight: 400; }
.catalog-layout { display: flex; gap: 12px; align-items: flex-start; }
.catalog-sidebar { flex: 0 0 160px; width: 160px; border: 0; padding: 0; }
.catalog-results { flex: 1; min-width: 0; }
.search-options-header { font-size: 24px; font-weight: 300; color: var(--rbx-text); margin: 0 0 6px; padding: 5px 0 0; }
.filters-header { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rbx-border); }
.catalog-browse { background: none; border: 0; box-shadow: none; padding: 0; }
.catalog-browse-list { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; list-style: none; }
.catalog-browse-list a {
  display: block; padding: 3px 0; font-size: 14px; font-weight: 400; color: var(--rbx-text); background: none; border-radius: 0;
}
.catalog-browse-list a.is-sub { padding-left: 12px; font-weight: 400; }
.catalog-browse-list a:hover { background: none; color: var(--rbx-blue); text-decoration: none; }
.catalog-browse-list a.active, .catalog-browse-list a.active:hover { background: none; color: var(--rbx-blue); font-weight: 600; }
.catalog-browse-group { padding: 6px 0 2px; font-size: 14px; font-weight: 600; color: var(--rbx-text); text-transform: none; letter-spacing: 0; background: none; }
.filter-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.catalog-filters .catalog-offsale-toggle { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 400; margin: 0; }
.catalog-results-header { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.catalog-results-header h2 { flex: 1; font-size: 24px; font-weight: 300; margin: 0; padding: 0; }
.catalog-results-header select { width: 190px; font-weight: 400; }
@media (max-width: 991px) { .catalog-items { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .catalog-layout { flex-direction: column; }
  .catalog-sidebar { width: 100%; flex: none; }
  .catalog-items, .avatar-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ============================================================ avatar editor */
.avatar-page-header { display: flex; align-items: center; gap: 15px; margin: 3px 0 12px; }
.avatar-page-header h1 { flex: 1; font-size: 36px; font-weight: 400; margin: 0; padding: 0; }
.avatar-header-note { font-size: 16px; font-weight: 400; color: var(--rbx-text-secondary); }
.avatar-editor { display: grid; grid-template-columns: 277px minmax(0, 1fr); gap: 15px; align-items: start; }
.avatar-left, .avatar-right { width: auto; max-width: none; flex: none; min-width: 0; }
.avatar-preview { position: relative; padding: 0; margin: 0 0 9px; }
.avatar-stage { background: linear-gradient(#e9ecef, #cfd4d9); }
.avatar-redraw-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 14px; font-weight: 400; color: var(--rbx-text-secondary); margin-bottom: 18px; }
.avatar-tabs { display: flex; background: var(--rbx-surface); box-shadow: 0 1px 3px rgba(150, 150, 150, 0.74); margin-bottom: 9px; border: 0; }
.avatar-tabs .nav-item { flex: 1; text-align: center; }
.avatar-tabs .nav-link { display: block; padding: 11px 6px; font-size: 18px; font-weight: 400; color: var(--rbx-text); border: 0; border-radius: 0; background: none; }
.avatar-tabs .nav-link i { font-size: 13px; }
.avatar-tabs .nav-link:hover { color: var(--rbx-blue); }
.avatar-tabs .nav-link.active { box-shadow: 0 -4px 0 0 var(--rbx-blue) inset; color: var(--rbx-text); }
.avatar-wardrobe { background: none; box-shadow: none; padding: 0; }
.avatar-wardrobe-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.avatar-categories { flex: 1; display: flex; flex-wrap: wrap; gap: 3px 15px; margin: 0; padding: 0; list-style: none; font-size: 16px; font-weight: 400; }
.avatar-categories a { color: var(--rbx-text-secondary); }
.avatar-categories a:hover { color: var(--rbx-blue); text-decoration: none; }
.avatar-categories a.active { color: var(--rbx-text); font-weight: 600; }
.avatar-wardrobe-bar .input-field { width: 180px; }
/* Each tab's own sub-categories. No tab chosen yet means Clothing, the page's first view. */
#avatar-pills-tab li { display: none; }
#view-avatar:not([data-av-group]) #avatar-pills-tab li[data-group='clothing'],
#view-avatar[data-av-group='clothing'] #avatar-pills-tab li[data-group='clothing'],
#view-avatar[data-av-group='body'] #avatar-pills-tab li[data-group='body'] { display: block; }
#avatar-body-panels { display: none; margin-top: 15px; }
#view-avatar[data-av-group='body'] #avatar-body-panels { display: block; }
/* Worn: a green border and a corner flag with a check. Thumbnails toggle, so there's no separate button. */
.avatar-items .avatar-item-btn { display: none; }
.avatar-items .item-card.is-worn { box-shadow: 0 0 0 2px var(--rbx-green); }
.avatar-items .avatar-item-check {
  display: none; position: absolute; top: 0; right: 0; left: auto; width: 0; height: 0; padding: 0; background: none; border-radius: 0;
  border-style: solid; border-width: 0 34px 34px 0; border-color: transparent var(--rbx-green) transparent transparent; color: #fff;
}
.avatar-items .item-card.is-worn .avatar-item-check { display: block; }
.avatar-items .avatar-item-check i { position: absolute; top: 2px; left: 17px; font-size: 14px; }
.avatar-items .item-card.is-worn .item-card-thumb-container { border: 0; outline: 0; box-shadow: none; }
.avatar-items .item-card-serial { left: 4px; right: auto; }
@media (max-width: 767px) { .avatar-editor { grid-template-columns: 1fr; } .avatar-header-note { display: none; } }

/* ============================================================ signed-out pages */
/* The translucent bar is for the landing page's picture; on the plain login page it's the site's normal blue. */
body:has(#unauth-login:not([style*="none"])) .landing-header { background: #0074bd; }

/* ============================================================ phones */
/* As in 2018: logo, search and icons on the first row, the page links on the second. */
@media (max-width: 767.98px) {
  .rbx-header .rbx-header-inner > .rbx-navbar-search { order: 2; flex: 1 1 0; width: auto; min-width: 70px; margin: 6px 6px 0; height: 28px; }
  .rbx-header .rbx-header-inner > .rbx-navbar-right { order: 3; flex: 0 0 auto; width: auto; }
  .rbx-header .rbx-header-inner > .rbx-navbar { order: 4; flex: 0 0 100%; width: 100%; justify-content: center; }
  .avatar-tabs .nav-link { font-size: 16px; padding: 10px 2px; }
  .avatar-tabs .nav-link i { display: none; }
  .avatar-wardrobe-bar { flex-wrap: wrap; }
  .avatar-wardrobe-bar .input-field { width: 100%; }
  .catalog-results-header h2 { font-size: 21px; white-space: nowrap; }
}

/* ============================================================ admin */
.rbx-content:has(#view-admin.active) { max-width: 1240px; }
#view-admin { font-size: 14px; font-weight: 400; }
#view-admin .page-title { font-size: 36px; font-weight: 400; margin: 0; padding: 0; }
.admin-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 15px; align-items: start; }
.admin-content { min-width: 0; }

/* The left list: plain rows with the selected-row bar. */
.admin-sidenav { position: sticky; top: 52px; background: var(--rbx-surface); box-shadow: var(--rbx-shadow); border: 0; border-radius: 3px; padding: 6px 0; }
.admin-sidenav .nav-link { display: block; padding: 7px 15px; font-size: 16px; font-weight: 400; color: var(--rbx-text); background: none; border: 0; border-radius: 0; }
.admin-sidenav .nav-link:hover { background: var(--rbx-hover); color: var(--rbx-text); }
.admin-sidenav .nav-link.active { box-shadow: 4px 0 0 0 var(--rbx-blue) inset; background: var(--rbx-hover); color: var(--rbx-text); font-weight: 600; }
.admin-nav-heading { padding: 12px 15px 3px; font-size: 12px; font-weight: 400; color: var(--rbx-label); text-transform: none; letter-spacing: 0; }
.admin-nav-heading:first-child { padding-top: 6px; }

/* Cards and headings */
#view-admin .card { background: var(--rbx-surface); border: 0; border-radius: 3px; box-shadow: var(--rbx-shadow); margin-bottom: 15px; }
#view-admin .card-body { padding: 15px; }
#view-admin h5, #view-admin .admin-pane-title h5 { font-size: 24px; font-weight: 300; color: var(--rbx-text); margin: 0 0 9px; padding: 0; line-height: 1.1; }
#view-admin h6 { font-size: 18px; font-weight: 400; color: var(--rbx-text); margin-bottom: 9px; }
#view-admin .small, #view-admin small, #view-admin .text-muted { font-size: 12px; font-weight: 400; color: var(--rbx-text-secondary); }
#view-admin label.small, #view-admin .font-weight-bold.small { font-weight: 400; color: var(--rbx-text-secondary); text-transform: none; letter-spacing: 0; margin-bottom: 3px; }

/* Fields */
#view-admin .form-control { height: 36px; padding: 5px 9px; font-size: 14px; font-weight: 400; color: var(--rbx-text); background: var(--rbx-surface); border: 1px solid var(--rbx-border); border-radius: 3px; box-shadow: none; }
#view-admin textarea.form-control { height: auto; }
#view-admin .form-control-sm { height: 30px; padding: 3px 8px; }
#view-admin .form-control:focus { border-color: var(--rbx-blue); box-shadow: none; }
#view-admin .form-control::placeholder { color: var(--rbx-label); }

/* Buttons: green is the page's main action, white the rest, red only for what can't be undone. */
#view-admin .btn { font-size: 14px; font-weight: 400; border-radius: 3px; box-shadow: none; transition: box-shadow 150ms ease, background 150ms ease; }
#view-admin .btn-danger { background: var(--rbx-green); border: 1px solid var(--rbx-green); color: #fff; }
#view-admin .btn-danger:hover { background: var(--rbx-green-hover); border-color: var(--rbx-green-hover); box-shadow: 0 1px 3px rgba(150, 150, 150, 0.74); }
#view-admin .btn-outline-secondary { background: var(--rbx-surface); border: 1px solid var(--rbx-border); color: var(--rbx-text); }
#view-admin .btn-outline-secondary:hover { background: var(--rbx-surface); color: var(--rbx-text); box-shadow: 0 1px 3px rgba(150, 150, 150, 0.74); }
#view-admin .btn-alert-xs, #view-admin .btn-outline-danger { background: var(--rbx-surface); border: 1px solid #d86868; border-radius: 3px; color: #d86868; font-size: 12px; font-weight: 400; padding: 3px 9px; }
#view-admin .btn-alert-xs:hover, #view-admin .btn-outline-danger:hover { background: #d86868; color: #fff; }

/* Numbers across the top of Overview and Economy */
.admin-kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.admin-kpi { display: block; padding: 12px 15px; background: var(--rbx-surface); border: 0; border-radius: 3px; box-shadow: var(--rbx-shadow); }
.admin-kpi-icon { display: none; }
.admin-kpi-value { font-size: 30px; font-weight: 300; line-height: 1.1; color: var(--rbx-text); }
.admin-kpi-label { font-size: 14px; font-weight: 400; color: var(--rbx-text-secondary); }
.admin-kpi-sub { font-size: 12px; color: var(--rbx-label); }
.admin-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.admin-shortcut { text-align: left; padding: 12px 15px; background: var(--rbx-surface); border: 0; border-radius: 3px; box-shadow: var(--rbx-shadow); transition: box-shadow 200ms ease; }
.admin-shortcut:hover { box-shadow: 0 1px 6px 0 rgba(25, 25, 25, 0.75); }
.admin-shortcut i { color: var(--rbx-blue); }

/* Tables */
#view-admin .table { font-size: 14px; font-weight: 400; margin: 0; color: var(--rbx-text); }
#view-admin .table thead th { font-size: 12px; font-weight: 400; color: var(--rbx-text-secondary); background: none; border-top: 0; border-bottom: 1px solid var(--rbx-border); padding: 6px 9px; text-transform: none; letter-spacing: 0; }
#view-admin .table td { padding: 7px 9px; vertical-align: middle; border-top: 1px solid var(--rbx-divider); }
#view-admin .table tbody tr:hover { background: var(--rbx-hover); }
.admin-table-toolbar { margin-bottom: 9px; }

/* Tabs inside a pane */
#view-admin .nav-tabs { border-bottom: 1px solid var(--rbx-divider); }
#view-admin .nav-tabs .nav-link { border: 0; border-radius: 0; background: none; color: var(--rbx-text); font-size: 16px; font-weight: 400; padding: 9px 15px; }
#view-admin .nav-tabs .nav-link.active { box-shadow: 0 -4px 0 0 var(--rbx-blue) inset; }
.admin-more summary { cursor: pointer; font-weight: 400; color: var(--rbx-text); }
@media (max-width: 767.98px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidenav { position: static; }
}
