/* SellIt base: font, colours and the overrides Bootstrap 4 needs. Components are in marketplace.css. */

@font-face {
	font-family: "Poppins";
	src: url("/fonts/poppins-400.woff") format("woff");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Poppins";
	src: url("/fonts/poppins-500.woff") format("woff");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Poppins";
	src: url("/fonts/poppins-700.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	/* From the logo. Brand, Place Ad and price tags only. */
	--tag: #cf0101;
	--tag-deep: #a80000;
	/* Text and primary buttons. */
	--ink: #1d1f22;
	--ink-soft: #464b52;
	--muted: #6b7178;
	/* Links and keyboard focus: Bermuda harbour water. */
	--harbour: #0b6a82;
	--harbour-deep: #08546a;
	--line: #e2e6ea;
	--mist: #f3f5f7;
	--paper: #ffffff;
	--radius: 10px;
	--radius-sm: 8px;
	--font: "Poppins", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

html {
	font-size: 15px;
}

@media (min-width: 768px) {
	html {
		font-size: 16px;
	}
}

html,
body {
	background: var(--paper);
}

body {
	font-family: var(--font);
	color: var(--ink);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
	font-family: var(--font);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--ink);
}

/* Type scale, ratio 1.25. */
h1, .h1 { font-size: 2.441rem; }
h2, .h2 { font-size: 1.953rem; }
h3, .h3 { font-size: 1.563rem; }
h4, .h4 { font-size: 1.25rem; }
h5, .h5 { font-size: 1.125rem; }
h6, .h6 { font-size: 1rem; }

@media (max-width: 575.98px) {
	h1, .h1 { font-size: 1.953rem; }
	h2, .h2 { font-size: 1.563rem; }
}

.text-muted {
	color: var(--muted) !important;
}

::selection {
	background: rgba(207, 1, 1, .15);
}

/* Links: plain by default inside cards and nav; .text-primary marks a real text link.
   Buttons are left out (and :where keeps the specificity low): a visited <a class="btn btn-primary"> used to inherit the
   page's text colour here, which made Edit ad black on black until you hovered over it. */
a:where(:not(.btn)),
a:where(:not(.btn)):hover,
a:where(:not(.btn)):visited,
a:where(:not(.btn)):active {
	color: inherit;
	text-decoration: none;
}

a.text-primary,
a.text-primary:visited {
	color: var(--harbour) !important;
}

a.text-primary:hover {
	color: var(--harbour-deep) !important;
	text-decoration: underline;
}

:focus-visible {
	outline: 3px solid rgba(11, 106, 130, .5);
	outline-offset: 2px;
}

/* Buttons */

.btn {
	border-radius: var(--radius-sm);
	font-weight: 500;
}

.btn-lg {
	border-radius: var(--radius);
	padding: .65rem 1.25rem;
	font-size: 1.05rem;
}

.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
	background: #000;
	border-color: #000;
	color: #fff;
	box-shadow: none;
}

.btn-outline-primary {
	color: var(--ink);
	border-color: var(--ink);
}

.btn-outline-primary:hover,
.btn-outline-primary:not(:disabled):not(.disabled):active {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

/* The brand action: Place Ad, Search, Submit for review. */
.btn-tag,
.btn-tag:visited {
	background: var(--tag);
	border-color: var(--tag);
	color: #fff !important;
}

.btn-tag:hover,
.btn-tag:focus,
.btn-tag:not(:disabled):not(.disabled):active {
	background: var(--tag-deep);
	border-color: var(--tag-deep);
	color: #fff !important;
	box-shadow: none;
}

.btn-success,
.btn-success:disabled {
	background: #1e7d4f;
	border-color: #1e7d4f;
}

.btn-success:hover,
.btn-success:not(:disabled):not(.disabled):active {
	background: #17643f;
	border-color: #17643f;
}

.btn-harbour,
.btn-harbour:visited {
	background: var(--harbour);
	border-color: var(--harbour);
	color: #fff;
}

.btn-harbour:hover,
.btn-harbour:focus,
.btn-harbour:not(:disabled):not(.disabled):active {
	background: var(--harbour-deep);
	border-color: var(--harbour-deep);
	color: #fff;
	box-shadow: none;
}

/* White with a hairline border: Save, Share, My ads. */
.btn-quiet,
.btn-quiet:visited {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	background: var(--paper);
	border-color: var(--line);
	color: var(--ink);
}

.btn-quiet:hover,
.btn-quiet:focus {
	border-color: var(--ink-soft);
	color: var(--ink);
}

.btn-light {
	background: var(--paper);
	border-color: var(--line);
	color: var(--ink);
}

.btn-light:hover {
	background: var(--mist);
	border-color: var(--line);
}

.btn:focus,
.btn.focus {
	box-shadow: 0 0 0 3px rgba(11, 106, 130, .35);
}

/* Forms */

/* Text boxes and selects are exactly the height of a button of the same size, so they line up side by side. */
.form-control,
.custom-select {
	height: calc(1.5em + .75rem + 2px);
	padding: .375rem .75rem;
	line-height: 1.5;
	border-color: #cfd5db;
	border-radius: var(--radius-sm);
	color: var(--ink);
}

.form-control-lg,
.custom-select-lg {
	height: calc(1.5em + 1.3rem + 2px);
	padding: .65rem 1rem;
	font-size: 1.05rem;
	border-radius: var(--radius);
}

.btn {
	line-height: 1.5;
}

textarea.form-control {
	height: auto;
}

.form-control-sm,
.custom-select-sm {
	height: calc(1.5em + .6rem + 2px);
	padding: .3rem .6rem;
	font-size: .875rem;
}

.custom-select,
.custom-select-sm {
	padding-right: 1.9rem;
}

.form-control:focus,
.custom-select:focus {
	border-color: var(--harbour);
	box-shadow: 0 0 0 3px rgba(11, 106, 130, .2);
}

label {
	font-weight: 500;
	margin-bottom: .35rem;
}

.custom-control-label {
	font-weight: 400;
}

.custom-control-input:checked ~ .custom-control-label::before {
	background-color: var(--ink);
	border-color: var(--ink);
}

.input-group-text {
	background: var(--paper);
	border-color: #cfd5db;
}

/* Cards, alerts, badges */

.card {
	border: 1px solid var(--line);
	border-radius: var(--radius);
}

.alert {
	border-radius: var(--radius-sm);
}

.badge {
	font-weight: 500;
	border-radius: 999px;
	padding: .3em .7em;
}

.breadcrumb {
	background: transparent;
	padding: 0;
	margin: 0;
	font-size: .875rem;
}

.breadcrumb-item + .breadcrumb-item::before {
	content: "›";
	color: var(--muted);
}

/* Pagination */

.page-link {
	color: var(--ink);
	border-color: var(--line);
	min-width: 2.5rem;
	text-align: center;
}

.page-link:hover {
	color: var(--ink);
	background: var(--mist);
}

.page-item.active .page-link {
	background: var(--ink);
	border-color: var(--ink);
}

.page-item:first-child .page-link {
	border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.page-item:last-child .page-link {
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sr-only-focusable:focus {
	position: absolute;
	z-index: 2000;
	top: .5rem;
	left: .5rem;
	padding: .5rem 1rem;
	background: var(--paper);
	border-radius: var(--radius-sm);
}
