/* SSF Archive Access - modal and button styles
   These styles are namespaced (ssf-aa-) and use minimal specificity
   so the active theme can override colors and fonts. */

.ssf-aa-btn {
	display: inline-block;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ssf-aa-btn-primary {
	background-color: #1f3a52;
	color: #ffffff;
	border-color: #1f3a52;
}

.ssf-aa-btn-primary:hover,
.ssf-aa-btn-primary:focus {
	background-color: #2a5170;
	border-color: #2a5170;
	color: #ffffff;
}

.ssf-aa-btn-secondary {
	background-color: transparent;
	color: #1f3a52;
	border-color: #1f3a52;
}

.ssf-aa-btn-secondary:hover,
.ssf-aa-btn-secondary:focus {
	background-color: #1f3a52;
	color: #ffffff;
}

.ssf-aa-btn[disabled] {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Modal */
.ssf-aa-modal[hidden] {
	display: none;
}

.ssf-aa-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ssf-aa-modal__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.ssf-aa-modal__panel {
	position: relative;
	background-color: #ffffff;
	border-radius: 8px;
	max-width: 480px;
	width: 100%;
	padding: 32px 32px 28px 32px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	z-index: 1;
	max-height: 90vh;
	overflow-y: auto;
	font-family: inherit;
	color: #1a1a1a;
}

.ssf-aa-modal__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	background: transparent;
	border: 0;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #555;
	border-radius: 4px;
}

.ssf-aa-modal__close:hover,
.ssf-aa-modal__close:focus {
	background-color: #f2f2f2;
	color: #1a1a1a;
}

.ssf-aa-modal__panel h2 {
	margin: 0 0 12px 0;
	font-size: 22px;
	font-weight: 700;
	color: #1f3a52;
	line-height: 1.25;
}

.ssf-aa-modal__panel p {
	margin: 0 0 16px 0;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
}

/* Form */
.ssf-aa-form label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
	color: #1a1a1a;
}

.ssf-aa-form input[type="email"] {
	display: block;
	width: 100%;
	font-size: 16px;
	padding: 10px 12px;
	border: 1px solid #c4c4c4;
	border-radius: 4px;
	margin-bottom: 8px;
	background-color: #ffffff;
	color: #1a1a1a;
	box-sizing: border-box;
}

.ssf-aa-form input[type="email"]:focus {
	outline: none;
	border-color: #1f3a52;
	box-shadow: 0 0 0 3px rgba(31, 58, 82, 0.15);
}

.ssf-aa-error {
	color: #b00020;
	font-size: 14px;
	margin: 4px 0 12px 0;
}

.ssf-aa-submit {
	width: 100%;
	margin-top: 8px;
}

.ssf-aa-fineprint {
	font-size: 12px;
	color: #666;
	text-align: center;
	margin: 12px 0 0 0;
}

/* Success state */
.ssf-aa-password-box {
	display: flex;
	align-items: center;
	gap: 12px;
	background-color: #f2f6f9;
	border: 1px solid #d4dde4;
	border-radius: 6px;
	padding: 16px;
	margin: 16px 0 20px 0;
}

.ssf-aa-password {
	flex: 1;
	font-family: 'Courier New', Courier, monospace;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 1px;
	color: #1f3a52;
	word-break: break-all;
}

.ssf-aa-copy {
	background-color: #1f3a52;
	color: #ffffff;
	border: 0;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 4px;
	cursor: pointer;
	white-space: nowrap;
}

.ssf-aa-copy:hover,
.ssf-aa-copy:focus {
	background-color: #2a5170;
}

/* Lock body scroll while modal is open */
body.ssf-aa-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.ssf-aa-modal__panel {
		padding: 28px 20px 24px 20px;
	}
	.ssf-aa-modal__panel h2 {
		font-size: 20px;
	}
	.ssf-aa-password {
		font-size: 18px;
	}
}
