/* RoadLeopard: WordPress toolbar fix, the customer portal and the Apply form's account parts.
   Plain CSS on top of the compiled Tailwind file, using its colour tokens. */

/* Keep the fixed site header below the WordPress toolbar for signed-in staff. */
body.admin-bar #site-header { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar #site-header { top: 46px; }
}
@media (max-width: 600px) {
	/* WordPress lets the toolbar scroll away on phones; pin it so the header never covers it. */
	body.admin-bar #wpadminbar { position: fixed; }
}

/* Portal layout */
.rl-portal { background: var(--color-paper); color: var(--color-ink); min-height: 70vh; padding: 7.5rem 0 5rem; }
.rl-wrap { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .rl-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .rl-wrap { padding: 0 2rem; } }
.rl-title { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.rl-lead { margin-top: .75rem; font-size: 1.125rem; color: var(--color-mute); }
.rl-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.rl-signin { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .rl-signin { grid-template-columns: 1.2fr .8fr; } .rl-new { margin-top: 7.5rem; } }

.rl-card { background: #fff; border: 1.5px solid #e6e0d1; border-radius: 1.25rem; padding: 1.5rem; min-width: 0; scroll-margin-top: 6.5rem; }
.rl-card > * + * { margin-top: .75rem; }
.rl-login { margin-top: 1.5rem; max-width: 30rem; }
.rl-grid { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
@media (min-width: 900px) { .rl-grid { grid-template-columns: 1fr 1fr; } }
.rl-h2 { font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.375rem; line-height: 1.2; }
.rl-h3 { font-weight: 600; font-size: 1rem; margin-top: 1.25rem; }
.rl-desc { color: var(--color-mute); }
.rl-small { font-size: .875rem; color: var(--color-mute); }
.rl-small a, .rl-card a:not(.btn) { color: var(--color-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.rl-empty { padding: .9rem 1rem; border-radius: .75rem; background: #f6f3ea; color: #3d4350; font-size: .95rem; }
.rl-opt { font-weight: 400; color: var(--color-mute); }

/* Section tabs */
.rl-tabs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; }
.rl-tabs a { flex: none; padding: .55rem 1rem; border-radius: 999px; background: #fff; border: 1.5px solid #e6e0d1; font-size: .9rem; font-weight: 600; color: var(--color-ink); text-decoration: none; transition: border-color .2s, background-color .2s; }
.rl-tabs a:hover, .rl-tabs a:focus-visible { border-color: var(--color-ink); background: #fffbea; }

/* Notices and badges */
.rl-notice { margin: 1rem 0; padding: .9rem 1.1rem; border-radius: .75rem; background: #e7f8ee; border: 1.5px solid #8fd6ad; color: #0f5132; font-weight: 500; }
.rl-notice.is-error { background: #fff4f2; border-color: #f0b4ab; color: #8a1c10; }
.rl-badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #eceae3; color: var(--color-ink); white-space: nowrap; }
.rl-badge.is-approved, .rl-badge.is-active { background: #dcf5e6; color: #0f5132; }
.rl-badge.is-received, .rl-badge.is-review, .rl-badge.is-pending { background: #fff1c2; color: #6b4e00; }
.rl-badge.is-declined { background: #fde2de; color: #8a1c10; }

/* Lists, facts, tables */
.rl-docs, .rl-list { list-style: none; padding: 0; margin: .75rem 0 0; }
.rl-docs li, .rl-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid #eee8da; }
.rl-docs li span:first-child, .rl-list li span:first-child { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.rl-docs small, .rl-list small { font-weight: 400; color: var(--color-mute); overflow-wrap: anywhere; }
.rl-doc-links { display: flex; gap: .9rem; flex: none; }
.rl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.25rem; margin-top: 1rem; }
.rl-facts .is-wide { grid-column: 1 / -1; }
.rl-facts dt { font-size: .8rem; font-weight: 600; color: var(--color-mute); }
.rl-facts dd { margin: .15rem 0 0; font-weight: 600; }
.rl-table-wrap { overflow-x: auto; }
.rl-table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.rl-table th, .rl-table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid #eee8da; }
.rl-table th:last-child, .rl-table td:last-child { text-align: right; }

/* Support thread */
.rl-thread { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .6rem; }
.rl-thread li { max-width: 88%; padding: .7rem .9rem; border-radius: 1rem; background: #f3f1ea; }
.rl-thread li.is-customer { justify-self: end; background: #fff3c4; }
.rl-thread small { display: block; margin-top: .3rem; font-size: .78rem; color: var(--color-mute); }

/* Forms in the portal */
.rl-form { display: grid; gap: .5rem; margin-top: 1rem; }
.rl-form label { font-weight: 600; font-size: .9rem; margin-top: .35rem; }
.rl-form .btn { justify-self: start; margin-top: .5rem; }
.rl-login form p { margin-top: .75rem; }
.rl-login label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.rl-login input[type="text"], .rl-login input[type="password"] { width: 100%; min-height: 3rem; font: inherit; border: 1.5px solid #cfc8b6; border-radius: .75rem; padding: .7rem .9rem; background: #fff; }
.rl-login input[type="text"]:focus, .rl-login input[type="password"]:focus { outline: none; border-color: var(--color-ink); }
.rl-login .login-remember label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.rl-login .login-submit input { cursor: pointer; border: 0; border-radius: 999px; background: var(--color-ink); color: #fff; font: inherit; font-weight: 600; padding: .8rem 1.6rem; }
.rl-login .login-submit input:hover { background: #222a35; }
.btn-ghost-dark { border: 1.5px solid var(--color-ink); color: var(--color-ink); background: transparent; }
.btn-ghost-dark:hover { background: var(--color-ink); color: #fff; }

/* Apply form: account error box and the hidden field for bots */
.rl-form-error { padding: .9rem 1.1rem; border-radius: .75rem; background: #fff4f2; border: 1.5px solid #f0b4ab; color: #8a1c10; font-weight: 500; }
.rl-form-error a { color: inherit; font-weight: 700; text-decoration: underline; }
.rl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
