/*
 * Achtis Trade — front-end styles.
 *
 * Deliberately light: the strip is a WooCommerce "info" notice and the buttons
 * are WooCommerce buttons, so colours, fonts and radii come from the theme.
 * These rules only handle layout and the small product-page touches.
 */

/* Strip: a theme-styled WooCommerce notice. */
.achtis-trade-strip-wrap { margin: 0 0 1.5em; }
.achtis-trade-strip-wrap .achtis-trade-strip { margin-bottom: 0; }
.achtis-trade-strip__text { display: inline-block; }

/* Brand colours (Achtis navy and a pale tint of the theme's blue); override
   these two custom properties in the theme to restyle the trade prompts. */
:root {
	--achtis-trade-ink: #092c5f;
	--achtis-trade-tint: #eef6fc;
}

/* Product note, under the price: a soft panel with a "%" badge. */
.achtis-trade-note { margin: .6em 0 1.25em; font-size: .9375em; line-height: 1.45; }
.achtis-trade-note__link {
	display: flex;
	align-items: center;
	gap: .75em;
	padding: .7em 1em;
	border-radius: 8px;
	background: var(--achtis-trade-tint);
	color: var(--achtis-trade-ink);
	text-decoration: none;
	transition: background-color .15s ease, box-shadow .15s ease;
}
.achtis-trade-note__link:hover,
.achtis-trade-note__link:focus-visible {
	background: color-mix(in srgb, var(--achtis-trade-tint) 70%, var(--achtis-trade-ink) 8%);
	color: var(--achtis-trade-ink);
	text-decoration: none;
}
.achtis-trade-note__link:focus-visible { outline: 2px solid var(--achtis-trade-ink); outline-offset: 2px; }
/* Themes often style every link in the product summary (underline, colour);
   keep the panel's own look there. */
.single-product div.product .summary a.achtis-trade-note__link,
.single-product div.product .summary a.achtis-trade-note__link:hover {
	color: var(--achtis-trade-ink);
	text-decoration: none;
}
.achtis-trade-note__badge {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6em;
	height: 1.6em;
	border-radius: 50%;
	background: var(--achtis-trade-ink);
	color: #fff;
	font-size: .8em;
	font-weight: 600;
}
.achtis-trade-note__text strong { font-weight: 600; }

/* Login page: a card like the login/register boxes, across the full width. */
.achtis-trade-login {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px 48px;
	margin: 0 0 32px;
	padding: 28px 40px;
	border: 1px solid #e3e7ec;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(9, 44, 95, .04);
	color: var(--achtis-trade-ink);
}
.achtis-trade-login__intro { flex: 1 1 320px; }
.achtis-trade-login__eyebrow { margin: 0 0 6px; color: #56617a; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.achtis-trade-login__title { margin: 0 0 8px; color: var(--achtis-trade-ink); font-size: 24px; font-weight: 300; line-height: 1.25; }
.achtis-trade-login__text { margin: 0; color: #2f3846; font-size: 15px; line-height: 1.55; }
.achtis-trade-login__steps { flex: 1 1 420px; display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.achtis-trade-login__steps li { flex: 1; display: flex; align-items: center; gap: 10px; margin: 0; color: var(--achtis-trade-ink); font-size: 14px; line-height: 1.3; }
.achtis-trade-login__num {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #eef2f7;
	color: var(--achtis-trade-ink);
	font-size: 13px;
	font-weight: 600;
}
.achtis-trade-login__steps .is-current .achtis-trade-login__num { background: var(--achtis-trade-ink); color: #fff; }

@media (max-width: 600px) {
	.achtis-trade-login { padding: 22px 20px; }
	.achtis-trade-login__steps { flex-direction: column; gap: 10px; }
}

/* "Trade price" label next to a discounted price (trade accounts only). */
.achtis-trade-price-label {
	display: inline-block;
	margin-inline-start: .4em;
	padding: .15em .55em;
	border-radius: 999px;
	background: color-mix(in srgb, currentColor 10%, transparent);
	font-size: .7em;
	font-weight: 600;
	letter-spacing: .02em;
	line-height: 1.5;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}

/* Cart / Checkout block notice: same look as WooCommerce's block "info" notice
   (it can't use their classes; see Achtis_Trade_Orders::block_notice()). */
.achtis-trade-cart-notice {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0 0 24px;
	padding: 16px;
	border: 1px solid #0675c4;
	border-radius: 4px;
	background: #f4f8ff;
	color: #2f2f2f;
	font-size: .875em;
	line-height: 1.5;
}
.achtis-trade-cart-notice__icon {
	flex: none;
	padding: 2px;
	border-radius: 50%;
	background: #0675c4;
	color: #fff;
}

/* My Account > Trade account. */
.achtis-trade-account .achtis-trade-details { margin: 0 0 1.5em; }
.achtis-trade-account .achtis-trade-details th { width: 40%; }
.achtis-trade-form .achtis-trade-form__intro { margin-bottom: 1.25em; }
.achtis-trade-form .optional { opacity: .7; font-weight: normal; }
.achtis-trade-account .achtis-trade-reorder__title { margin-top: 2em; }

/* Accessibility (WCAG 2.1 AA, 4.5:1 contrast): the theme's table headings are
   a light grey (#919191, 3.2:1 on white); a slightly darker grey in this
   plugin's own tables keeps the look and passes (#6b6b6b is 5.3:1). */
.achtis-trade-account .achtis-trade-details th,
.achtis-trade-reorder th,
#page .achtis-trade-account table.achtis-trade-details th,
#page .achtis-trade-account table.achtis-trade-reorder th { color: #6b6b6b; }

/* Error box: a <div> (see Achtis_Trade_Accounts::error_notice()), so drop the
   list indent WooCommerce gives .woocommerce-error. */
.achtis-trade-error { list-style: none; }
.achtis-trade-reorder .button { white-space: nowrap; }

@media (max-width: 600px) {
	.achtis-trade-strip .button { float: none; display: block; margin: .75em 0 0; text-align: center; }
	.achtis-trade-strip { display: flex; flex-direction: column-reverse; }
}
