/*
 * UI fixes on top of musicshake.min.css (2026-09-23). Not minified on purpose (no build tools on the
 * server). Loaded after the main bundle by head-includes.phtml as /css/ui.<mtime>.min.css.
 */

/* Songs / People: the submenu now opens on tap (js/ui.min.js), not on hover */
#header-nav li.m > a.t { cursor: pointer; }
#header-nav li.m > a.t::after { content: " \25BE"; font-size: 0.8em; }
#header-nav li.m.open > a.t::after { content: " \25B4"; }

/* action buttons (MP3 Download / Favorite) fully visible, not only on hover */
.item .actions { opacity: 1; }

/* play / add buttons on covers are always shown (js/ui.min.js adds them on load) */
.cdimg .play, .cdimg .add { display: block; }

/* chart rows: only the rank is left on the left side */
.item.chart .weeks, .item.chart .diff { display: none; }

/* header: always as wide as the window, so the notification / user menu on the right stays on
   screen in narrow windows (the old min-width:1000px pushed it out of a fixed header) */
#header { min-width: 0; }
#header-login {
	z-index: 3;
	background: #2a2a2a;
	padding-left: 12px;
	box-shadow: -12px 0 12px -6px #2a2a2a;
	white-space: nowrap;
}

/* chart rows: the rank fills the whole left square (the weeks/diff space is gone) */
#charts div.block.w .rank {
	height: 100px;
	line-height: 100px;
	font-size: 44px;
	font-weight: bold;
	letter-spacing: -1px;
}
#charts div.block.w .rank .icon { display: none; }

/* chart week picker (js/ui.min.js charts_nav): one button, panel opens on tap */
#charts-nav.cw { position: relative; border: none; padding: 0 0 10px; }
#charts-nav .cw-button {
	display: inline-flex; align-items: center; gap: 8px;
	background: #444; color: #fff; border: 0; border-radius: 4px;
	font: bold 15px/1 Arial, Helvetica, sans-serif; padding: 10px 14px; cursor: pointer;
}
#charts-nav .cw-button:hover { background: #555; }
#charts-nav .cw-button .cw-caret { font-size: 11px; opacity: .8; }
#charts-nav .cw-panel {
	display: none; position: absolute; left: 0; top: 46px; z-index: 50;
	background: #fff; border: 1px solid #ccc; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.2);
	padding: 12px; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}
#charts-nav.open .cw-panel { display: flex; }
#charts-nav .cw-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #666; }
#charts-nav .cw-panel select { font-size: 15px; padding: 6px 8px; min-width: 90px; }
#charts-nav .cw-panel select.cw-week { min-width: 200px; }

/* Recent Songs search box (2026-09-23) */
#recent-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
#recent-search input[type=search] {
	flex: 1 1 220px; min-width: 0; font-size: 15px; padding: 8px 10px;
	border: 1px solid #bbb; border-radius: 4px;
}
#recent-search select { font-size: 15px; padding: 7px 8px; border: 1px solid #bbb; border-radius: 4px; background: #fff; }
#recent-search button {
	font: bold 15px Arial, Helvetica, sans-serif; padding: 8px 16px; border: 0; border-radius: 4px;
	background: #444; color: #fff; cursor: pointer;
}
#recent-search button:hover { background: #555; }
#recent-search .clear { font-size: 13px; }

/* list pages without the old right column (banner/ads removed): use the full content width */
#content .left.full { width: auto; float: none; }

/* ---- phones / narrow windows (2026-09-23) ------------------------------------------------------
   layout.phtml now has a viewport tag, so phones render at device width instead of zooming the
   whole ~1000px page out (which made the 12px menu text unreadably small). The page container is
   fluid up to 940px, and the menu keeps its size: it never wraps or shrinks — it scrolls sideways. */
.fixcenter { width: auto; max-width: 940px; padding: 0 10px; box-sizing: border-box; }
#content img { max-width: 100%; height: auto; }
#index-banners, #index-banners .banner { max-width: 100%; overflow: hidden; }

#header { display: flex; align-items: center; height: 35px; }
#header .logo { position: static; flex: none; padding: 0 10px; line-height: 0; }
#header .logo img { height: 22px; width: auto; }
#header-nav {
	margin-left: 0; flex: 1 1 auto; min-width: 0;
	overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
#header-nav::-webkit-scrollbar { display: none; }
#header-nav ul { display: flex; flex-wrap: nowrap; margin: 0; padding: 0; }
#header-nav li { float: none; flex: none; }
#header-nav li a { font-size: 12px; white-space: nowrap; }
#header-login { position: static; flex: none; height: 35px; line-height: 35px; padding: 0 12px; }

/* song detail: chart listings sit right under the cover (2026-09-23) */
#song .song-media { width: 200px; }
#song .song-media .cdimg.large { float: none; }
#song .song-media .collage { margin: 12px 0 0; }

/* store: price buttons spread over the full width (2026-09-23) */
#store table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 10px 8px; margin: 0 -10px; }
#store td { padding: 0; }
#store button.x, #store button.plain { width: 100%; }
