MediaWiki:Gadget-spawncalc.css: Difference between revisions

From Pixelrus
Jump to navigation Jump to search
m (Update MediaWiki:Gadget-spawncalc.css)
m (Update MediaWiki:Gadget-spawncalc.css)
Line 1: Line 1:
/* Pixelmon spawn-chance calculator gadget styling.
/* Pixelmon spawn-chance calculator gadget styling.
  * Goal: read as one self-contained widget, not inline wiki markup. */
  * Reads as one compact self-contained widget, not inline wiki markup. */
#spawn-calculator {
#spawn-calculator {
margin: 0.8em 0 1.2em;
margin: 0.6em 0 0.9em;
border: 1px solid #c8ccd1;
border: 1px solid #c8ccd1;
border-radius: 10px;
border-radius: 8px;
background: #fff;
background: #fff;
overflow: hidden;
overflow: hidden;
box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.08 );
box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.08 );
max-width: 46em;
max-width: 48em;
}
}


/* Header bar */
/* Slim header bar */
.scalc-header {
.scalc-header {
display: flex;
padding: 0.35em 0.8em;
align-items: center;
gap: 0.5em;
padding: 0.6em 1em;
background: linear-gradient( 135deg, #14866d, #0f6e58 );
background: linear-gradient( 135deg, #14866d, #0f6e58 );
color: #fff;
color: #fff;
}
}
.scalc-header-icon { font-size: 1.2em; line-height: 1; }
.scalc-header-title { font-weight: bold; font-size: 0.95em; letter-spacing: 0.01em; }
.scalc-header-title { font-weight: bold; font-size: 1.05em; letter-spacing: 0.01em; }


/* Body + sections */
/* Body */
.scalc-body { padding: 0.9em 1em 1em; }
.scalc-body { padding: 0.6em 0.8em 0.7em; }
.scalc-intro { margin: 0 0 0.8em; font-size: 0.9em; color: #54595d; }
 
.scalc-section { margin-bottom: 0.85em; }
.scalc-section-label {
font-size: 0.72em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #72777d;
margin-bottom: 0.4em;
}


/* Controls: inline fields that wrap, button included at the end. */
.scalc-form {
.scalc-form {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
gap: 0.7em 1em;
gap: 0.4em 0.8em;
align-items: flex-end;
align-items: flex-end;
padding: 0.8em 0.9em;
background: #f8f9fa;
border: 1px solid #eaecf0;
border-radius: 8px;
}
}
.scalc-field { display: flex; flex-direction: column; gap: 0.25em; }
.scalc-field { display: flex; flex-direction: column; gap: 0.15em; }
.scalc-label { font-weight: bold; font-size: 0.8em; color: #202122; }
.scalc-label { font-weight: bold; font-size: 0.72em; color: #54595d; }
.scalc-input, .scalc-num {
.scalc-input, .scalc-num {
padding: 0.3em 0.45em;
padding: 0.2em 0.4em;
border: 1px solid #a2a9b1;
border: 1px solid #a2a9b1;
border-radius: 4px;
border-radius: 4px;
background: #fff;
background: #fff;
font-size: 0.92em;
font-size: 0.88em;
}
}
.scalc-input:focus, .scalc-num:focus {
.scalc-input:focus, .scalc-num:focus {
Line 61: Line 43:
box-shadow: 0 0 0 2px rgba( 51, 102, 204, 0.2 );
box-shadow: 0 0 0 2px rgba( 51, 102, 204, 0.2 );
}
}
.scalc-num { width: 5em; }
.scalc-num { width: 4.5em; }


/* Action row */
.scalc-actions {
display: flex;
align-items: center;
gap: 0.8em;
flex-wrap: wrap;
margin-bottom: 0.9em;
}
.scalc-btn {
.scalc-btn {
padding: 0.45em 1.1em;
padding: 0.3em 0.85em;
border: 0;
border: 0;
border-radius: 6px;
border-radius: 5px;
background: #36c;
background: #36c;
color: #fff;
color: #fff;
cursor: pointer;
cursor: pointer;
font-weight: bold;
font-weight: bold;
font-size: 0.95em;
font-size: 0.88em;
}
}
.scalc-btn:hover { background: #2a4b8d; }
.scalc-btn:hover { background: #2a4b8d; }
.scalc-btn:active { transform: translateY( 1px ); }
.scalc-btn:active { transform: translateY( 1px ); }
.scalc-actions-hint { font-size: 0.82em; color: #72777d; }


/* Result panel */
/* Result: one compact strip. */
.scalc-results { margin-top: 0.6em; }
.scalc-result {
.scalc-result {
border-radius: 8px;
padding: 0.85em 1em;
border: 1px solid #eaecf0;
border: 1px solid #eaecf0;
border-radius: 6px;
padding: 0.45em 0.7em;
background: #f8f9fa;
background: #f8f9fa;
text-align: center;
}
}
.scalc-result-hit {
.scalc-result-hit { border-color: #a6e8d5; background: #eafaf4; }
border-color: #a6e8d5;
.scalc-result-best { border-color: #14866d; }
background: linear-gradient( 180deg, #eafaf4, #f4fbf8 );
.scalc-result-head {
}
display: flex;
.scalc-badge {
align-items: baseline;
display: inline-block;
gap: 0.4em;
margin-bottom: 0.4em;
flex-wrap: wrap;
padding: 0.15em 0.7em;
border-radius: 999px;
background: #14866d;
color: #fff;
font-size: 0.72em;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.05em;
}
}
.scalc-pct {
.scalc-pct {
font-size: 2.4em;
font-size: 1.5em;
font-weight: 800;
font-weight: 800;
line-height: 1.05;
line-height: 1;
color: #14866d;
color: #14866d;
font-variant-numeric: tabular-nums;
font-variant-numeric: tabular-nums;
}
}
.scalc-result-miss .scalc-pct { color: #b32424; }
.scalc-result-miss .scalc-pct { color: #b32424; }
.scalc-pctlabel { font-size: 0.9em; color: #54595d; margin-top: 0.1em; }
.scalc-pctlabel { font-size: 0.85em; color: #54595d; }
.scalc-detail { margin: 0.55em 0 0; font-size: 0.88em; color: #202122; }
.scalc-detail { display: block; margin-top: 0.2em; font-size: 0.82em; color: #202122; }
.scalc-note { margin: 0.3em 0 0; font-size: 0.9em; color: #54595d; font-style: italic; }
.scalc-note { display: block; font-size: 0.85em; color: #54595d; font-style: italic; }


/* Narrow screens: stack fields full width. */
/* Narrow screens: stack fields full width. */
@media ( max-width: 480px ) {
@media ( max-width: 480px ) {
.scalc-field { flex: 1 1 100%; }
.scalc-field { flex: 1 1 100%; }
.scalc-input, .scalc-num { width: 100%; box-sizing: border-box; }
.scalc-input, .scalc-num, .scalc-btn { width: 100%; box-sizing: border-box; }
}
}

Revision as of 07:12, 17 June 2026

/* Pixelmon spawn-chance calculator gadget styling.
 * Reads as one compact self-contained widget, not inline wiki markup. */
#spawn-calculator {
	margin: 0.6em 0 0.9em;
	border: 1px solid #c8ccd1;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.08 );
	max-width: 48em;
}

/* Slim header bar */
.scalc-header {
	padding: 0.35em 0.8em;
	background: linear-gradient( 135deg, #14866d, #0f6e58 );
	color: #fff;
}
.scalc-header-title { font-weight: bold; font-size: 0.95em; letter-spacing: 0.01em; }

/* Body */
.scalc-body { padding: 0.6em 0.8em 0.7em; }

/* Controls: inline fields that wrap, button included at the end. */
.scalc-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em 0.8em;
	align-items: flex-end;
}
.scalc-field { display: flex; flex-direction: column; gap: 0.15em; }
.scalc-label { font-weight: bold; font-size: 0.72em; color: #54595d; }
.scalc-input, .scalc-num {
	padding: 0.2em 0.4em;
	border: 1px solid #a2a9b1;
	border-radius: 4px;
	background: #fff;
	font-size: 0.88em;
}
.scalc-input:focus, .scalc-num:focus {
	outline: none;
	border-color: #36c;
	box-shadow: 0 0 0 2px rgba( 51, 102, 204, 0.2 );
}
.scalc-num { width: 4.5em; }

.scalc-btn {
	padding: 0.3em 0.85em;
	border: 0;
	border-radius: 5px;
	background: #36c;
	color: #fff;
	cursor: pointer;
	font-weight: bold;
	font-size: 0.88em;
}
.scalc-btn:hover { background: #2a4b8d; }
.scalc-btn:active { transform: translateY( 1px ); }

/* Result: one compact strip. */
.scalc-results { margin-top: 0.6em; }
.scalc-result {
	border: 1px solid #eaecf0;
	border-radius: 6px;
	padding: 0.45em 0.7em;
	background: #f8f9fa;
}
.scalc-result-hit { border-color: #a6e8d5; background: #eafaf4; }
.scalc-result-best { border-color: #14866d; }
.scalc-result-head {
	display: flex;
	align-items: baseline;
	gap: 0.4em;
	flex-wrap: wrap;
}
.scalc-pct {
	font-size: 1.5em;
	font-weight: 800;
	line-height: 1;
	color: #14866d;
	font-variant-numeric: tabular-nums;
}
.scalc-result-miss .scalc-pct { color: #b32424; }
.scalc-pctlabel { font-size: 0.85em; color: #54595d; }
.scalc-detail { display: block; margin-top: 0.2em; font-size: 0.82em; color: #202122; }
.scalc-note { display: block; font-size: 0.85em; color: #54595d; font-style: italic; }

/* Narrow screens: stack fields full width. */
@media ( max-width: 480px ) {
	.scalc-field { flex: 1 1 100%; }
	.scalc-input, .scalc-num, .scalc-btn { width: 100%; box-sizing: border-box; }
}