/* Peptide Compliance Registration — Institutional Application Form */
/*
 * These styles are intentionally structural. Typography (font family, base
 * color) is inherited from the active theme so the form reads as native page
 * content. Surfaces and borders are derived from the inherited text color via
 * color-mix(), so the form adapts to both light and dark themes. Brand accents
 * come from --pcr-primary / --pcr-accent, which are injected inline and default
 * to the theme's own color presets (see PCR_Settings::color_css_value).
 *
 * Every color-mix()-based value is paired with a solid fallback (either a
 * preceding literal declaration or a var() fallback) so browsers without
 * color-mix() support still render sane borders, surfaces and muted text.
 */

.pcr-registration {
        --pcr-primary: #171733;
        --pcr-accent: #4a90d9;
        --pcr-border: color-mix(in srgb, currentColor 18%, transparent);
        --pcr-muted: color-mix(in srgb, currentColor 60%, transparent);
        --pcr-surface: color-mix(in srgb, currentColor 4%, transparent);
        max-width: 760px;
        margin: 0 auto;
        font-family: inherit;
        color: inherit;
        line-height: inherit;
}

.pcr-registration * {
        box-sizing: border-box;
}

.pcr-callout {
        background: #f4f8ff;
        background: color-mix(in srgb, var(--pcr-accent) 8%, transparent);
        border: 1px solid #d6e4fb;
        border: 1px solid color-mix(in srgb, var(--pcr-accent) 30%, transparent);
        border-left: 4px solid var(--pcr-accent);
        border-radius: 10px;
        padding: 18px 20px;
        margin-bottom: 26px;
}

.pcr-callout h3 {
        margin: 0 0 6px;
        font-size: 1.05em;
        color: inherit;
}

.pcr-callout p { margin: 0; font-size: 0.95em; color: #56607a; color: var(--pcr-muted, #56607a); }

.pcr-alert {
        border-radius: 10px;
        padding: 16px 18px;
        margin-bottom: 22px;
        font-size: 0.95em;
}

.pcr-alert--success {
        background: #ecfdf3;
        border: 1px solid #bbf0cf;
        color: #166534;
}

.pcr-alert--error {
        background: #fef2f2;
        border: 1px solid #fbcaca;
        color: #b42318;
}

.pcr-alert ul { margin: 8px 0 0; padding-left: 20px; }

.pcr-form__title {
        margin: 0 0 4px;
        font-size: 1.6em;
        color: inherit;
}

.pcr-form__subtitle {
        margin: 0 0 26px;
        color: #6b7280;
        color: var(--pcr-muted, #6b7280);
        font-size: 0.95em;
}

.pcr-section {
        border: none;
        border-top: 1px solid #e5e7eb;
        border-top: 1px solid var(--pcr-border, #e5e7eb);
        border-radius: 0;
        padding: 24px 0 4px;
        margin: 0;
        background: transparent;
}

.pcr-section:first-of-type { border-top: none; padding-top: 4px; }

.pcr-section legend {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.8em;
        font-weight: 700;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #6b7280;
        color: var(--pcr-muted, #6b7280);
        padding: 0;
        margin-bottom: 4px;
}

.pcr-step {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 999px;
        background: var(--pcr-accent);
        color: #fff;
        font-size: 0.75em;
        font-weight: 700;
        letter-spacing: 0;
}

.pcr-field { margin-bottom: 18px; }

.pcr-field label {
        display: block;
        margin-bottom: 7px;
        font-size: 0.92em;
        font-weight: 600;
        color: inherit;
}

.pcr-req { color: #dc2626; }

.pcr-hint { font-weight: 400; color: #9ca3af; color: var(--pcr-muted, #9ca3af); font-size: 0.82em; }

.pcr-field input[type="text"],
.pcr-field input[type="email"],
.pcr-field input[type="tel"],
.pcr-field input[type="password"],
.pcr-field select,
.pcr-field textarea {
        width: 100%;
        box-sizing: border-box;
        padding: 12px 14px;
        font-size: 1em;
        font-family: inherit;
        line-height: 1.4;
        color: inherit;
        background: transparent;
        background: var(--pcr-surface, transparent);
        border: 1px solid #d1d5db;
        border: 1px solid var(--pcr-border, #d1d5db);
        border-radius: 9px;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pcr-field input:focus,
.pcr-field select:focus,
.pcr-field textarea:focus {
        outline: none;
        border-color: var(--pcr-accent);
        box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.18);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcr-accent) 20%, transparent);
}

.pcr-field textarea { resize: vertical; min-height: 120px; }

.pcr-grid { display: grid; gap: 18px; }
.pcr-grid--2 { grid-template-columns: 1fr 1fr; }

.pcr-check-row {
        display: flex;
        gap: 12px;
        align-items: flex-start;
        padding: 12px 0;
        font-size: 0.92em;
        color: inherit;
        border-top: 1px solid #e5e7eb;
        border-top: 1px solid var(--pcr-border, #e5e7eb);
        cursor: pointer;
}

.pcr-check-row:first-of-type { border-top: none; }

.pcr-check-row input[type="checkbox"] {
        margin-top: 3px;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        accent-color: var(--pcr-accent);
}

.pcr-btn {
        appearance: none;
        border: none;
        cursor: pointer;
        font-size: 1em;
        font-weight: 600;
        border-radius: 12px;
        padding: 15px 20px;
        font-family: inherit;
        transition: opacity 0.15s ease, transform 0.12s ease;
}

.pcr-btn--primary { background: var(--pcr-accent); color: #fff; }
.pcr-btn--primary:hover { opacity: 0.92; }
.pcr-btn--primary:active { transform: translateY(1px); }
.pcr-btn--block { display: block; width: 100%; margin-top: 6px; }

.pcr-form__terms {
        margin: 14px 0 0;
        text-align: center;
        font-size: 0.82em;
        color: #9ca3af;
        color: var(--pcr-muted, #9ca3af);
}

.pcr-form__signin {
        margin: 18px 0 0;
        text-align: center;
        font-size: 0.92em;
        color: #6b7280;
        color: var(--pcr-muted, #6b7280);
}

.pcr-form__signin a { color: var(--pcr-accent); font-weight: 600; text-decoration: none; }
.pcr-form__signin a:hover { text-decoration: underline; }

@media (max-width: 560px) {
        .pcr-grid--2 { grid-template-columns: 1fr; }
}

/* Research application checkbox columns */
.pcr-check-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 24px;
}
.pcr-check-grid .pcr-check-row {
	border-top: none;
	padding: 9px 0;
}
@media (max-width: 560px) {
	.pcr-check-grid { grid-template-columns: 1fr; }
}

/* Guest registration prompt modal */
.pcr-modal {
	--pcr-primary: #171733;
	--pcr-accent: #4a90d9;
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99998;
	padding: 20px;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	line-height: 1.5;
}
.pcr-modal.is-open { display: flex; }
.pcr-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 12, 28, 0.72);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}
.pcr-modal__card {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	animation: pcr-modal-rise 0.28s ease-out;
}
@keyframes pcr-modal-rise {
	from { transform: translateY(16px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}
.pcr-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 2;
	appearance: none;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
}
.pcr-modal__close:hover { opacity: 1; }
.pcr-modal__header {
	background: var(--pcr-primary);
	color: #fff;
	text-align: center;
	padding: 26px 20px 22px;
}
.pcr-modal__brand {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 4px;
}
.pcr-modal__tag {
	display: inline-block;
	margin-top: 12px;
	padding: 6px 15px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1.5px;
	color: #bcd7f2;
	background: rgba(74, 144, 217, 0.18);
	border: 1px solid rgba(74, 144, 217, 0.35);
	border-radius: 999px;
}
.pcr-modal__body { padding: 28px 30px 26px; text-align: center; }
.pcr-modal__title {
	margin: 0 0 12px;
	font-size: 23px;
	font-weight: 700;
	color: var(--pcr-primary);
}
.pcr-modal__intro { margin: 0 0 22px; color: #4b5563; font-size: 15px; }
.pcr-modal__actions { margin-bottom: 14px; }
.pcr-modal a.pcr-btn { text-decoration: none; }
.pcr-modal__signin { margin: 0; font-size: 14px; color: #6b7280; }
.pcr-modal__signin a { color: var(--pcr-accent); font-weight: 600; }
body.pcr-modal-open { overflow: hidden; }

@media (max-width: 480px) {
	.pcr-modal__header { padding: 22px 18px 18px; }
	.pcr-modal__brand { font-size: 19px; letter-spacing: 3px; }
	.pcr-modal__body { padding: 24px 22px 20px; }
	.pcr-modal__title { font-size: 20px; }
}
