/**
 * OAuth Pages Styles
 *
 * Styles for the standalone OAuth authorization flow pages
 * (consent, error, access denied, success).
 *
 * @package Albert
 * @since   1.0.0
 */

/* Common base */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	background: #f0f0f1;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

/* Consent page */
.auth-container {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
	max-width: 400px;
	width: 100%;
	padding: 40px;
}

.auth-header {
	text-align: center;
	margin-bottom: 30px;
}

.auth-header h1 {
	font-size: 24px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 10px;
}

.auth-header p {
	color: #50575e;
	font-size: 14px;
}

.client-info {
	background: #f6f7f7;
	border-radius: 4px;
	padding: 20px;
	margin-bottom: 20px;
}

.client-name {
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 8px;
}

.permission-text {
	color: #50575e;
	font-size: 14px;
	line-height: 1.5;
}

.redirect-destination {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #dcdcde;
	font-size: 13px;
	color: #50575e;
}

.redirect-destination__label {
	display: block;
	margin-bottom: 2px;
}

.redirect-destination__value {
	font-family: Menlo, Consolas, monospace;
	font-size: 14px;
	font-weight: 600;
	color: #1d2327;
	word-break: break-all;
}

.client-age-notice {
	margin-top: 12px;
	padding: 8px 10px;
	background: #fcf0e6;
	border-left: 3px solid #d98a3d;
	border-radius: 2px;
	font-size: 13px;
	color: #6a4a1f;
}

.user-info {
	font-size: 13px;
	color: #646970;
	margin-bottom: 20px;
	padding: 10px;
	background: #fff8e5;
	border-radius: 4px;
}

.connection-label {
	margin-bottom: 20px;
}

.connection-label label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: #1d2327;
	margin-bottom: 6px;
}

.connection-label input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
	color: #1d2327;
}

.connection-label input[type="text"]:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -1px;
	border-color: #2271b1;
}

.connection-label__hint {
	margin-top: 6px;
	font-size: 12px;
	color: #646970;
}

.button-group {
	display: flex;
	gap: 10px;
}

.button {
	flex: 1;
	padding: 12px 20px;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.button-primary {
	background: #2271b1;
	color: #fff;
}

.button-primary:hover {
	background: #135e96;
}

.button-secondary {
	background: #f0f0f1;
	color: #50575e;
}

.button-secondary:hover {
	background: #dcdcde;
}

/* Error page */
.error-container {
	background: #fff;
	border-left: 4px solid #d63638;
	padding: 20px 25px;
	max-width: 400px;
}

.error-container h1 {
	font-size: 18px;
	color: #1d2327;
	margin-bottom: 10px;
}

.error-container p {
	color: #50575e;
	font-size: 14px;
	line-height: 1.5;
}

/* Refusal page: one card, the site named above it */
.albert-oauth {
	inline-size: 100%;
	max-inline-size: 440px;
	min-inline-size: 0;
	/* App names and hosts are the app's own and can be one long word. */
	overflow-wrap: anywhere;
}

.albert-oauth__site {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin-block-end: 16px;
}

.albert-oauth__card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 28px;
}

.albert-oauth__eyebrow,
.albert-oauth__meta {
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
}

.albert-oauth__title {
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
	margin-block: 4px 16px;
}

.albert-oauth__title--done {
	display: flex;
	align-items: center;
	gap: 8px;
}

.albert-oauth__check {
	flex: none;
	inline-size: 22px;
	block-size: 22px;
	fill: #1d2327;
	stroke: #fff;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.albert-oauth__check path {
	fill: none;
}

@media (forced-colors: active) {
	.albert-oauth__check {
		fill: CanvasText;
		stroke: Canvas;
	}
}

.albert-oauth__subtitle {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin-block-end: 6px;
}

.albert-oauth__text {
	font-size: 14px;
	line-height: 1.6;
	color: #1d2327;
	margin-block-end: 16px;
}

.albert-oauth__meta {
	margin-block-end: 20px;
}

.albert-oauth__fix {
	margin-block-end: 20px;
}

.albert-oauth__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.albert-oauth__actions .button {
	flex: 0 1 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-block-size: 44px;
	white-space: normal;
	text-align: center;
	text-decoration: none;
}

.albert-oauth .button-secondary {
	border: 1px solid #8c8f94;
}

.albert-oauth .button:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.albert-oauth__external {
	flex: none;
	inline-size: 14px;
	block-size: 14px;
}

.albert-oauth__footer {
	border-block-start: 1px solid #f0f0f1;
	padding-block-start: 16px;
	font-size: 14px;
}

.albert-oauth__footer a {
	display: inline-block;
	padding-block: 6px;
}

.albert-oauth__destination {
	font-size: 13px;
	line-height: 1.5;
	color: #646970;
	margin-block-start: 4px;
}

.albert-oauth a:not(.button) {
	color: #2271b1;
}

.albert-oauth a:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}
