/* ==================================================================
   Matches the color/type language of the existing custom My Account
   page: "Satoshi" font, #4D4D4D body text, #F5F5F5 fills, black pill
   buttons with a trailing arrow, uppercase labels/links.
   Every rule is scoped under .caw-widget / .caw-modal so it can't leak
   into (or be leaked into by) the theme or other plugins.
   ================================================================== */

.caw-widget {
	position: relative;
	display: inline-block;
	line-height: 0;
	font-family: "Satoshi", -apple-system, BlinkMacSystemFont, sans-serif;
}
.caw-widget, .caw-widget *, .caw-widget *::before, .caw-widget *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- Trigger */
.caw-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	padding: 6px;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	color: #111;
}
.caw-trigger svg { width: 22px; height: 22px; display: block; }
.caw-trigger__avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

/* ---------------------------------------------------------------- Login/Register modal */
.caw-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.caw-widget.is-open .caw-modal { display: flex; }

.caw-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .35);
}
.caw-modal__box {
	position: relative;
	width: 480px;
	max-width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	background: #fff;
	border-radius: 8px;
	padding: 44px 36px 36px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}
.caw-modal__close {
	position: absolute;
	top: 16px;
	right: 18px;
	width: 32px;
	height: 32px;
	border: 0;
	background: none;
	color: #000;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.caw-panel { display: none; text-align: center; }
.caw-panel.is-active { display: block; }

.caw-panel h2 {
	margin: 0 0 10px;
	font-size: 26px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .01em;
	color: #111;
}
.caw-subtitle {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.6;
	color: #808080;
	text-transform: uppercase;
	letter-spacing: .01em;
}

.caw-form { text-align: left; }
.caw-field { margin-bottom: 18px; position: relative; }
.caw-field label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .02em;
	color: #111;
}
.caw-field input {
	width: 100%;
	padding: 15px 20px;
	border: 0;
	border-radius: 50px;
	background: #f5f5f5;
	font-size: 14px;
	font-family: inherit;
	color: #111;
}
.caw-field input:focus { outline: 2px solid #111; outline-offset: 1px; }
.caw-field--password input { padding-right: 52px; }
.caw-toggle-password {
	position: absolute;
	right: 8px;
	top: 38px;
	width: 34px;
	height: 34px;
	border: 0;
	background: none;
	color: #999;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.caw-toggle-password svg { width: 18px; height: 18px; }
.caw-toggle-password.is-visible { color: #111; }

.caw-lost-password { margin: -8px 0 18px; text-align: right; }
.caw-lost-password a { font-size: 12px; color: #808080; text-decoration: none; }
.caw-lost-password a:hover { color: #111; text-decoration: underline; }

.caw-form__message {
	display: none;
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 6px;
	font-size: 13px;
	background: #fdeceb;
	color: #c0392b;
}
.caw-form__message.is-visible { display: block; }
.caw-form__message.is-success { background: #eaf7ef; color: #1F6F4F; }

.caw-submit {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 24px;
	border: 0;
	border-radius: 50px;
	background: #111;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	cursor: pointer;
	transition: opacity .15s ease;
}
.caw-submit:hover { opacity: .85; }
.caw-submit:disabled { opacity: .6; cursor: default; }
.caw-submit b { font-weight: 400; }

.caw-switch {
	margin: 22px 0 0;
	font-size: 13px;
	text-transform: uppercase;
	color: #808080;
	text-align: center;
}
.caw-switch a { color: #111; font-weight: 700; text-decoration: underline; }

@media (max-width: 480px) {
	.caw-modal__box { padding: 36px 22px 28px; }
	.caw-panel h2 { font-size: 22px; }
}
