/*
 * swpl-security-core-customer.css -- the shopper-facing passkey surface.
 *
 * This is the ONE stylesheet this plugin puts on a storefront, and it is
 * enqueued only on the WooCommerce account page, only when the customer passkey
 * module is on. It is deliberately NOT built on the admin token stylesheet: a
 * shop's account page has the merchant's own visual language and the right
 * thing to do is sit inside it rather than repaint it.
 *
 * So: no colours of our own beyond one hairline border and one muted grey, no
 * font stack, no !important, and buttons that inherit rather than declare. A
 * theme that styles `button` styles ours; a theme that styles
 * `.woocommerce-Button` can reach ours through the class it already uses,
 * because ours carry their own single-purpose class and nothing else.
 *
 * Every selector is scoped to .swpl-sec-customer, so nothing here can reach any
 * other markup on the page.
 */

.swpl-sec-customer {
	margin: 1.5em 0;
}

.swpl-sec-customer__title {
	margin: 0 0 0.35em;
	font-size: 1.15em;
}

.swpl-sec-customer__body,
.swpl-sec-customer__note,
.swpl-sec-customer__empty,
.swpl-sec-customer__nudge-body {
	margin: 0 0 0.75em;
	line-height: 1.5;
}

.swpl-sec-customer__note,
.swpl-sec-customer__empty,
.swpl-sec-customer__used {
	opacity: 0.75;
}

.swpl-sec-customer__nudge-title {
	margin: 0 0 0.35em;
	font-weight: 600;
}

/* The nudge is the only thing here that gets a box, because it is the only
   thing here that arrived uninvited. One hairline, no colour: it has to read as
   part of the shop, not as an alert. */
.swpl-sec-customer--nudge {
	border: 1px solid currentColor;
	border-radius: 3px;
	padding: 1em 1.25em;
	opacity: 0.95;
}

.swpl-sec-customer__list {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
}

.swpl-sec-customer__item {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.75em;
	padding: 0.5em 0;
	border-bottom: 1px solid currentColor;
}

/* The border is drawn in the inherited text colour at a tenth of its weight,
   which is the one way to get a hairline that works on a dark theme and a light
   one without this file knowing which it is on. */
.swpl-sec-customer__item {
	border-bottom-color: rgba( 128, 128, 128, 0.25 );
}

.swpl-sec-customer--nudge {
	border-color: rgba( 128, 128, 128, 0.35 );
}

.swpl-sec-customer__label {
	font-weight: 600;
}

.swpl-sec-customer__used {
	font-size: 0.9em;
}

.swpl-sec-customer__remove {
	margin-left: auto;
	font-size: 0.9em;
}

.swpl-sec-customer__input {
	display: block;
	margin: 0 0 0.75em;
	max-width: 20em;
	width: 100%;
}

/* A status line that is empty must take no room: an always-present blank line
   under a button reads as something having gone wrong. */
.swpl-sec-customer__status:empty {
	display: none;
}

.swpl-sec-customer__status {
	margin: 0.75em 0 0;
	line-height: 1.5;
}

.swpl-sec-customer__dismiss {
	margin-left: 0.75em;
}

/* ---------------------------------------------------------------------------
   The sign-in methods block (plan T-F), wherever it is placed.

   Deliberately almost nothing: this renders inside somebody else's theme, on
   five different surfaces, and a block that imposed its own look would fight
   the shop it is standing in. What is styled here is only what is needed to
   stop it reading as part of the form above it -- one rule, one gap -- plus the
   phone/code fields, which must not inherit a width that pushes a checkout form
   sideways on a phone.
--------------------------------------------------------------------------- */

.swpl-sec-signin {
	margin-top:  1.25em;
	padding-top: 1em;
	border-top:  1px solid rgba( 128, 128, 128, 0.25 );
}

.swpl-sec-signin__lead {
	margin: 0 0 0.75em;
}

.swpl-sec-signin__notice {
	margin: 0 0 0.75em;
	font-weight: 600;
}

.swpl-sec-signin__sms label {
	display: block;
	margin:  0.5em 0 0.25em;
}

.swpl-sec-signin__sms input {
	display:   block;
	width:     100%;
	max-width: 20em;
	margin:    0 0 0.5em;
}

.swpl-sec-signin__provider {
	display:      inline-block;
	margin:       0.25em 0.5em 0.25em 0;
	text-align:   center;
	text-decoration: none;
}

/* On the checkout prompt the block sits above somebody's checkout form: it gets
   the same breathing room a WooCommerce notice would and nothing else. */
.swpl-sec-signin--checkout {
	margin-bottom: 1.5em;
}

/* The second step, where the login form was. It is the only thing on the page
   at that moment, so it gets a little more room than the block it replaces. */
.swpl-sec-signin--step-required {
	margin-top:  0;
	padding-top: 0;
	border-top:  0;
}

.swpl-sec-signin__title {
	margin: 0 0 0.5em;
}
