/* Nuggits Default Styles */

/* Preload spinner — shown while WASM runtime loads */
.preload-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fa;
}

.preload-content {
    text-align: center;
}

.preload-spinner {
    width: 40px;
    height: 40px;
    margin: 16px auto;
    border: 4px solid #dee2e6;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preload-text {
    color: #6c757d;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Error boundary */
.error-content {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 4rem auto;
}

/* Not found */
.not-found {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 4rem auto;
}

/* Anonymous layout (login/register pages) */
.anonymous-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.anonymous-main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.anonymous-container {
    width: 100%;
    max-width: 400px;
}

.anonymous-footer {
    text-align: center;
    padding: 1rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.anonymous-footer a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 600;
}

.anonymous-footer a:hover {
    text-decoration: underline;
}

.anonymous-footer .separator {
    margin: 0 0.4rem;
}

/* Headings should never show a focus outline */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus {
    outline: none;
}

/* Anonymous logo */
.anonymous-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.anonymous-logo h1 {
    color: #2c3e50;
    font-weight: 700;
}

/* Login / registration pages */
.login-page {
    width: 100%;
}

.login-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-links {
    text-align: center;
    margin-top: 1rem;
}

.login-links .separator {
    margin: 0 0.5rem;
    color: #6c757d;
}

.login-links a {
    color: #0d6efd;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

/* The registration form's decoy field is now rendered by SoftCrow's <HoneypotField /> and hidden by
   _content/SoftCrow.Razor.Captcha/css/softcrow-captcha.css, which both hosts link in AppRoot.razor. */

/* ==========================================================================
   Public pages (landing, privacy, terms) — PublicLayout
   A wide, readable column for long-form copy. Served by both hosts, so these
   styles live here in the shared CommonApp stylesheet. Mobile-first.
   ========================================================================== */
.public-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #2c3e50;
}

.public-header {
    border-bottom: 1px solid #e9ecef;
    background: #fff;
}

.public-header__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.public-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -0.01em;
}

.public-signin {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0d6efd;
    text-decoration: none;
    padding: 0.4rem 0.9rem;
    border: 1px solid #0d6efd;
    border-radius: 999px;
    white-space: nowrap;
}

.public-signin:hover {
    background: #0d6efd;
    color: #fff;
}

.public-main {
    flex: 1;
    padding: 2rem 1.25rem 3rem;
}

.public-container {
    max-width: 72ch;
    margin: 0 auto;
    line-height: 1.65;
}

.public-container h1 {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.public-container h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.public-container p,
.public-container li {
    color: #3d4a57;
}

.public-container p {
    margin-bottom: 1rem;
}

.public-container ul {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.public-container li {
    margin-bottom: 0.4rem;
}

.public-container a {
    color: #0d6efd;
}

.public-lead {
    font-size: 1.15rem;
    color: #55606b;
}

.public-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Landing-only helpers */
.public-hero {
    margin-bottom: 2rem;
}

.public-hero h1 {
    font-size: 2.3rem;
}

.public-loops {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.public-loop {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    background: #fbfcfd;
}

.public-loop strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.public-categories {
    font-weight: 600;
    color: #55606b;
    margin-bottom: 1.5rem;
}

.alpha-callout {
    border: 1px solid #ffe08a;
    background: #fff9e6;
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    margin: 2rem 0 1rem;
}

.alpha-callout h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.alpha-callout p {
    margin-bottom: 0.75rem;
}

.alpha-callout .btn-signin {
    display: inline-block;
    font-weight: 700;
    color: #fff;
    background: #0d6efd;
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    text-decoration: none;
}

.alpha-callout .btn-signin:hover {
    background: #0b5ed7;
}

.public-footer {
    border-top: 1px solid #e9ecef;
    text-align: center;
    padding: 1.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

.public-footer__links a {
    color: #6c757d;
    text-decoration: none;
    font-weight: 600;
}

.public-footer__links a:hover {
    text-decoration: underline;
}

.public-footer__sep {
    margin: 0 0.5rem;
}

.public-footer__copy {
    margin: 0.4rem 0 0;
}

@media (min-width: 640px) {
    .public-main {
        padding: 3rem 1.5rem 4rem;
    }

    .public-loops {
        grid-template-columns: 1fr 1fr;
    }
}
