/*
 * Our own corrections, loaded after the client's own stylesheets.
 *
 * Kept in one file so their CSS can be replaced wholesale when the client is
 * updated, without hunting for edits inside it.
 */

/* Touch targets. The client is built for a mouse: rows that are precise enough
   with a pointer are not with a thumb. */
@media (max-width: 700px) {
	.mainmenu .menugroup p a.button,
	.roomlist .blocklink,
	.ilink {
		min-height: 40px;
	}
}

/*
 * Descriptions that finish their sentence.
 *
 * The teambuilder cuts every description off mid-word: one line, overflow
 * hidden, in a column of fixed width. Samantha's abilities say six things at
 * once and got cut after two.
 *
 * Neither the row height nor the column layout can be touched. The list is
 * virtualised against a hardcoded 33px per row (search.js divides the scroll
 * position by it), so taller rows would put every result in the wrong place;
 * and the columns inside a row are floats holding their own little stacks of
 * labels, which come apart if they are made anything else.
 *
 * What is left is the text itself: smaller, tighter, and allowed to wrap,
 * which fits two lines in the height one line had and roughly doubles what
 * you can read without moving anything.
 */
.utilichart .abilitydesccol,
.utilichart .movedesccol,
.utilichart .itemdesccol {
	white-space: normal;
	font-size: 7pt;
	line-height: 1.1;
	height: 22px;
	padding-top: 5px;
	overflow: hidden;
}

/*
 * Keep the news and PM column off the main menu.
 *
 * The home screen is two columns: the menu on the left and `.activitymenu` -
 * news, and every open DM - pinned beside it at a fixed `left: 325px`. The menu
 * groups, though, are centred with `margin: 0 auto` inside `.mainmenu`, and
 * `.mainmenu` spans the whole width rather than the left column. So they centre
 * across both columns and land at x=172 to x=442, while the news column starts
 * at 325 - straight through the format picker, the team picker and the Battle
 * button, which is exactly the part of the page you need to click.
 *
 * Capping the menu at the width of the left column puts the groups back where
 * the two-column layout assumes they are. Measured rather than nudged: the
 * groups move from x=172 to x=27, and the news column is still at x=315.
 *
 * Only in the wide layout. Below about a thousand pixels the client adds
 * `.tiny-layout`, which drops both columns into one and stacks the news above
 * the menu - that already works, and capping the width there would squeeze the
 * menu into a third of the screen.
 */
.ps-room:not(.tiny-layout) .mainmenuwrapper .mainmenu {
	max-width: 324px;
}

/**
 * The opponent row in the search form.
 *
 * The form's own rows are a label and one control; this one has three, so the
 * pieces are spaced by hand rather than inheriting the label's fixed width and
 * overlapping at the widths a phone has.
 */
.velvet-opponent .velvet-opponent-toggle {
	display: inline-block;
	margin-right: 6px;
	vertical-align: middle;
}
.velvet-opponent select[name=velvetrung] {
	vertical-align: middle;
	max-width: 190px;
}
.velvet-opponent select[name=velvetrung][disabled] {
	opacity: 0.5;
}
.velvet-opponent .velvet-opponent-note {
	display: block;
	margin: 2px 0 0 74px;
	color: #888;
}
@media (max-width: 640px) {
	.velvet-opponent .velvet-opponent-note {
		margin-left: 0;
	}
}

/*
 * The trio's terrains (data/velvet/abyss-shrine.js), drawn where the
 * client draws Psychic Terrain's: it gives the backdrop the class
 * "<terrain id>weather". The pictures are ours, in client/fx.
 */
.abyssalterrainweather {
	background: #0b1a4a url(../fx/weather-abyssalterrain.png) no-repeat scroll left top;
	color: #dff4ff;
	text-shadow: #04102c 1px 1px 0, #04102c 1px -1px 0, #04102c -1px 1px 0, #04102c -1px -1px 0;
}
.shrineterrainweather {
	background: #2a0f4a url(../fx/weather-shrineterrain.png) no-repeat scroll left top;
	color: #f1e4ff;
	text-shadow: #16052a 1px 1px 0, #16052a 1px -1px 0, #16052a -1px 1px 0, #16052a -1px -1px 0;
}
.sanctuaryterrainweather {
	background: #3a1d24 url(../fx/weather-sanctuaryterrain.png) no-repeat scroll left top;
	color: #ffe6f3;
	text-shadow: #2a0d18 1px 1px 0, #2a0d18 1px -1px 0, #2a0d18 -1px 1px 0, #2a0d18 -1px -1px 0;
}

/* Frostbite ('frb'), the sixth status (data/velvet/frostbite.js): an icy tag beside FRZ's teal. */
.statbar span.frb {
	padding: 1px 2px;
	border: 0;
	border-radius: 3px;
	background: #6AB7E8;
	color: #FFFFFF;
	font-size: 7pt;
}
.status.frb {
	background: #6AB7E8;
}
