/**
 * Sign in, sign up, verification and account settings screens.
 *
 * Every rule is scoped under .ccw-root. That is deliberate rather than
 * decorative: the Elementor kit styles bare element selectors like
 * ".elementor-kit-6 button", which at specificity 0,1,1 beats a lone
 * ".ccw-button" at 0,1,0. Scoping under the root class lands these at 0,2,0,
 * so plugin controls win inside plugin markup and nothing needs !important,
 * while everything outside .ccw-root is left completely untouched.
 *
 * @package    CCW_Directory
 * @subpackage assets/css
 * @author     Shakib Shown <hi@shakib6472.com>
 * @link       https://shakib6472.com
 * @since      1.0.0
 */

/*
 * The control reset and the button system that used to live here now sit in
 * ccw-tokens.css, which every plugin page loads. Keeping them here meant the
 * search bar, the archive and the listing cards, on pages that never load this
 * file, fell back to whatever the theme and the Elementor kit happened to do.
 */

/* ------------------------------------------------------------ Split layout */

.ccw-auth {
	display: grid;
	grid-template-columns: 1fr;
	background-color: var(--ccw-paper);
}

.ccw-auth__aside {
	display: none;
	padding: var(--ccw-space-7) var(--ccw-space-6);
	background-color: var(--ccw-surface-dark);
	color: var(--ccw-paper);
}

.ccw-auth__aside-inner {
	max-width: 420px;
	margin-left: auto;
}

/* ------------------------------------------------------------------- Logo */

/*
 * These screens are often reached straight from an email link, so the logo is
 * the only way back to the site. It appears twice in the markup: once in the
 * dark rail for desktop, once above the form for narrow screens where the rail
 * is hidden. Only ever one of them is visible.
 */
.ccw-root .ccw-auth__logo {
	display: inline-flex;
	align-items: center;
	margin-bottom: var(--ccw-space-6);
	text-decoration: none;
	line-height: 1;
}

.ccw-auth__logo-img {
	display: block;
	width: auto;
	height: 40px;
	max-width: 220px;
	object-fit: contain;
}

.ccw-root .ccw-auth__logo-text {
	font-family: var(--ccw-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ccw-root .ccw-auth__logo--light .ccw-auth__logo-text {
	color: var(--ccw-paper);
}

.ccw-root .ccw-auth__logo--dark .ccw-auth__logo-text {
	color: var(--ccw-ink);
}

.ccw-root .ccw-auth__logo:focus-visible {
	outline: 2px solid var(--ccw-accent);
	outline-offset: 4px;
	border-radius: 4px;
}

/*
 * The rail is hidden below 1024px, so its logo goes with it and the panel copy
 * takes over. Above that the rail is showing, so the panel copy stands down
 * unless the layout has no rail at all.
 */
@media (min-width: 1024px) {
	.ccw-auth__main:not(.ccw-auth__main--solo) .ccw-auth__logo--dark {
		display: none;
	}
}

.ccw-root .ccw-auth__headline {
	margin: 0 0 var(--ccw-space-6);
	font-family: var(--ccw-font-heading);
	font-size: clamp(1.75rem, 2.4vw, 2.375rem);
	font-weight: 700;
	line-height: 1.18;
	letter-spacing: -0.01em;
	color: var(--ccw-paper);
}

.ccw-auth__points {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccw-auth__points li {
	display: flex;
	align-items: flex-start;
	gap: var(--ccw-space-3);
	margin-bottom: var(--ccw-space-4);
	font-size: 0.9375rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
}

.ccw-auth__tick {
	position: relative;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border-radius: 50%;
	background-color: var(--ccw-accent);
}

.ccw-auth__tick::after {
	content: '';
	position: absolute;
	top: 4px;
	left: 7px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ccw-auth__main {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--ccw-space-6) var(--ccw-space-4);
}

.ccw-auth__panel {
	width: 100%;
	max-width: 420px;
}

.ccw-root .ccw-auth__title {
	margin: 0 0 var(--ccw-space-2);
	font-family: var(--ccw-font-heading);
	font-size: clamp(1.5rem, 2vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--ccw-ink);
}

.ccw-auth__subtitle {
	margin: 0 0 var(--ccw-space-5);
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--ccw-muted);
}

.ccw-auth__note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: var(--ccw-space-5) 0 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--ccw-muted);
}

.ccw-auth__note-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	margin-top: 3px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5821f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

@media (min-width: 1024px) {
	.ccw-auth {
		grid-template-columns: 42% 1fr;
		min-height: 100vh;
	}

	.ccw-auth__aside {
		display: flex;
		align-items: center;
	}

	.ccw-auth__main {
		padding: var(--ccw-space-7) var(--ccw-space-6);
	}

	.ccw-auth__main--solo {
		grid-column: 1 / -1;
	}
}

/* ------------------------------------------------------------------- Forms */

/*
 * The field, label, hint, checkbox and link primitives moved to ccw-tokens.css.
 * The contact form on a listing page and the filter panel on the archive use
 * them too, and neither page loads this file.
 */

.ccw-form__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0 var(--ccw-space-4);
}

@media (min-width: 640px) {
	.ccw-form__grid {
		grid-template-columns: 1fr 1fr;
	}
}

.ccw-form__row--split {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccw-space-3);
	flex-wrap: wrap;
	margin-bottom: var(--ccw-space-5);
}

.ccw-rule {
	margin: var(--ccw-space-5) 0;
	border: 0;
	border-top: 1px solid var(--ccw-line);
}

/* ------------------------------------------------------------- Password UI */

.ccw-password {
	position: relative;
}

.ccw-root .ccw-password .ccw-input {
	padding-right: 46px;
}

.ccw-root .ccw-password__toggle {
	position: absolute;
	top: 50%;
	right: 6px;
	/* Sized for a thumb rather than a cursor. The icon inside stays 19px, so
	   this grows the tap area without growing the visual weight. */
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	transform: translateY(-50%);
	border: 0;
	border-radius: 6px;
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 19px 19px;
	box-shadow: none;
	cursor: pointer;
}

.ccw-root .ccw-password__toggle:hover,
.ccw-root .ccw-password__toggle:focus {
	background-color: var(--ccw-wash);
}

.ccw-root .ccw-password__toggle.is-visible {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5821f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.9 4.24A9.1 9.1 0 0 1 12 4c6.4 0 10 7 10 7a17.6 17.6 0 0 1-2.16 3.19M6.6 6.6A17.7 17.7 0 0 0 2 11s3.6 7 10 7a9.7 9.7 0 0 0 5.4-1.6'/%3E%3Cpath d='m2 2 20 20'/%3E%3C/svg%3E");
}

.ccw-strength {
	margin-top: 8px;
}

.ccw-strength__bar {
	height: 4px;
	border-radius: 2px;
	background-color: var(--ccw-line);
	overflow: hidden;
}

.ccw-strength__bar span {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 2px;
	background-color: var(--ccw-closed);
	transition: width 0.2s ease, background-color 0.2s ease;
}

.ccw-strength[data-level='2'] .ccw-strength__bar span {
	background-color: #d97706;
}

.ccw-strength[data-level='3'] .ccw-strength__bar span,
.ccw-strength[data-level='4'] .ccw-strength__bar span {
	background-color: var(--ccw-ok);
}

/* --------------------------------------------------------------- OTP boxes */

.ccw-root .ccw-otp {
	display: flex;
	gap: 10px;
	margin: 0 0 var(--ccw-space-3);
	padding: 0;
	border: 0;
}

.ccw-root .ccw-otp__box {
	width: 100%;
	max-width: 58px;
	height: 58px;
	min-height: 0;
	padding: 0;
	border: 1px solid var(--ccw-line);
	border-radius: var(--ccw-radius-button);
	background-color: var(--ccw-paper);
	font-family: var(--ccw-font-heading);
	font-size: 1.5rem;
	font-weight: 600;
	text-align: center;
}

.ccw-root .ccw-otp__box.is-filled {
	border-color: var(--ccw-accent);
	background-color: var(--ccw-accent-soft);
}

.ccw-otp__timer {
	margin: 0 0 var(--ccw-space-4);
	font-size: 0.875rem;
	color: var(--ccw-muted);
}

/* ----------------------------------------------------------------- Notices */

/* ----------------------------------------------------------------- Account */

.ccw-account {
	max-width: var(--ccw-container);
	margin: 0 auto;
	padding: var(--ccw-space-6) var(--ccw-space-4) var(--ccw-space-7);
}

.ccw-account__header {
	margin-bottom: var(--ccw-space-6);
}

.ccw-root .ccw-account__title {
	margin: 0 0 var(--ccw-space-2);
	font-family: var(--ccw-font-heading);
	font-size: clamp(1.75rem, 2.4vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--ccw-ink);
}

.ccw-account__subtitle {
	margin: 0;
	font-size: 1rem;
	color: var(--ccw-muted);
}

.ccw-account__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--ccw-space-5);
	align-items: start;
}

@media (min-width: 1024px) {
	.ccw-account__layout {
		grid-template-columns: 200px minmax(0, 1fr);
		gap: var(--ccw-space-7);
	}

	.ccw-account__nav {
		position: sticky;
		top: var(--ccw-space-5);
	}
}

.ccw-account__nav-label {
	margin: 0 0 var(--ccw-space-3);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--ccw-muted);
}

.ccw-account__nav ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ccw-account__nav li {
	margin: 0;
}

.ccw-root .ccw-account__nav a {
	display: block;
	padding: 9px 14px;
	border-left: 2px solid var(--ccw-line);
	color: var(--ccw-muted);
	font-size: 0.9375rem;
	text-decoration: none;
}

.ccw-root .ccw-account__nav a:hover,
.ccw-root .ccw-account__nav a:focus,
.ccw-root .ccw-account__nav a.is-active {
	border-left-color: var(--ccw-accent);
	color: var(--ccw-accent);
	font-weight: 600;
}

.ccw-account__panels {
	display: grid;
	gap: var(--ccw-space-5);
	min-width: 0;
}

.ccw-account__panel {
	padding: var(--ccw-space-5);
	border: 1px solid var(--ccw-line);
	border-radius: var(--ccw-radius-card);
	background-color: var(--ccw-paper);
	box-shadow: var(--ccw-shadow);
	scroll-margin-top: var(--ccw-space-5);
}

.ccw-account__panel--danger {
	border-left: 3px solid var(--ccw-closed);
}

.ccw-root .ccw-account__panel-title {
	margin: 0 0 var(--ccw-space-5);
	font-family: var(--ccw-font-heading);
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--ccw-ink);
}

.ccw-account__panel-text {
	margin: 0 0 var(--ccw-space-4);
	color: var(--ccw-muted);
}

/* Avatar and the file picker, which browsers style very differently. */

.ccw-avatar-row {
	display: flex;
	align-items: center;
	gap: var(--ccw-space-4);
	margin-bottom: var(--ccw-space-5);
	flex-wrap: wrap;
}

.ccw-avatar__preview {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: var(--ccw-wash);
	overflow: hidden;
}

.ccw-avatar__preview img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ccw-avatar__initial {
	font-family: var(--ccw-font-heading);
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--ccw-muted);
}

.ccw-avatar__actions {
	min-width: 0;
}

.ccw-root .ccw-avatar__file {
	width: auto;
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 0.8125rem;
	color: var(--ccw-muted);
}

.ccw-root .ccw-avatar__file::file-selector-button {
	margin-right: 10px;
	padding: 9px 16px 9px 34px;
	border: 1px solid var(--ccw-line);
	border-radius: var(--ccw-radius-button);
	background-color: var(--ccw-paper);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101828' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3l2-3h6l2 3h3a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='3.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 11px center;
	background-size: 16px 16px;
	font-family: var(--ccw-font-heading);
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ccw-ink);
	cursor: pointer;
}

.ccw-root .ccw-avatar__file::file-selector-button:hover {
	background-color: var(--ccw-wash);
}

.ccw-email-row {
	display: flex;
	align-items: center;
	gap: var(--ccw-space-3);
	flex-wrap: wrap;
	margin-bottom: var(--ccw-space-4);
	padding: 13px 16px;
	border-radius: var(--ccw-radius-chip);
	background-color: var(--ccw-wash);
}

.ccw-email-row__address {
	font-weight: 600;
	word-break: break-all;
}

.ccw-root .ccw-chip {
	display: inline-block;
	padding: 2px 10px;
	border: 1px solid var(--ccw-line);
	border-radius: var(--ccw-radius-chip);
	background-color: var(--ccw-paper);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.7;
	color: var(--ccw-muted);
	white-space: nowrap;
}

.ccw-root .ccw-chip--ok {
	border-color: rgba(22, 128, 60, 0.25);
	background-color: #f0fdf4;
	color: var(--ccw-ok);
}

.ccw-root .ccw-chip--warn {
	border-color: rgba(245, 130, 31, 0.3);
	background-color: var(--ccw-accent-soft);
	color: #9a6700;
}

.ccw-disclosure {
	margin-bottom: var(--ccw-space-4);
}

.ccw-root .ccw-disclosure > summary {
	display: inline-flex;
	align-items: center;
	width: auto;
	cursor: pointer;
	list-style: none;
}

.ccw-root .ccw-disclosure > summary::-webkit-details-marker {
	display: none;
}

.ccw-disclosure[open] > summary {
	margin-bottom: var(--ccw-space-4);
}

.ccw-toggle-list {
	margin: 0 0 var(--ccw-space-5);
	padding: 0;
	list-style: none;
}

.ccw-toggle-list__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ccw-space-4);
	padding: var(--ccw-space-4) 0;
	border-bottom: 1px solid var(--ccw-line);
}

.ccw-toggle-list__item:first-child {
	padding-top: 0;
}

.ccw-toggle-list__item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.ccw-toggle-list__label {
	display: block;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ccw-ink);
}

.ccw-toggle-list__hint {
	display: block;
	margin-top: 2px;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--ccw-muted);
}

/* .screen-reader-text moved to ccw-tokens.css. Kept here it was undefined on
   the archive and the listing page, so every label meant only for a screen
   reader was rendering as visible text. */
