/**
 * nA Community App - Main Styles
 * 
 * @package NA_Community_App
 * @version 1.0.0
 */

/* Reset and Base Styles */
.na-event-detail[hidden] { display: none !important; }

:root {
    --na-font-family: Inter, "Segoe UI", Arial, sans-serif;
    --na-field-focus: #ffcc00;
    --na-highlight-text: #000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    background-color: #fff !important;
}

/* Organizer variants follow the app theme, including manual theme changes. */
html img.na-organizer-logo--dark { display: none; }
html[data-na-theme="dark"] img.na-organizer-logo--light { display: none; }
html[data-na-theme="dark"] img.na-organizer-logo--dark { display: block; }

html[data-na-theme="dark"] {
    --na-highlight-text: #fff;
    --na-dark-bg: #121017;
    --na-dark-surface: #1e1a26;
    --na-dark-soft: #282132;
    --na-dark-text: #f5f1fa;
    --na-dark-muted: #b9adc9;
    --na-dark-border: #393044;
    --na-dark-accent: #c7a3ed;
    color-scheme: dark;
    background-color: #121923 !important;
}

/* Override the theme's black link states without outranking component colors.
 * Links on yellow/light controls and outgoing messages still need dark text. */
html[data-na-theme="dark"] :where(body[class*="na-"]) a:where(:hover, :focus, :active):not(:where(
    .na-button-primary,
    .na-button-secondary,
    .na-settings-leave-stay,
    .na-status-action,
    .ni-own .ni-bubble a
)) {
    color: #fff;
}

body {
    font-family: var(--na-font-family);
    line-height: 1.6;
    color: #333;
    background-color: #fff !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Keep app typography consistent when the WordPress theme loads its own fonts. */
body[class*="na-"],
body[class*="na-"] :is(h1, h2, h3, h4, h5, h6, button, input, select, optgroup, textarea, .button) {
    font-family: var(--na-font-family);
}

/* Render the transparent brand mark in black on every light app screen. */
html:not([data-na-theme="dark"]) :is(.na-auth-mark, .na-logo-img, .na-community-home-logo-img, .na-app-header-logo-light) {
    filter: brightness(0);
}

/* Keep Sinhala text comfortably spaced; missing glyphs use the font fallbacks. */
html[lang^="si"] {
    --na-font-family: Inter, "Noto Sans Sinhala", "Nirmala UI", "Iskoola Pota", "Segoe UI", Arial, sans-serif;
}

:lang(si),
html[lang^="si"] body {
    font-family: var(--na-font-family);
    line-height: 1.55;
}

/* Sinhala marks need more room than the compact Latin heading styles. */
html[lang^="si"] body[class*="na-"] :is(h1, h2, h3, h4, h5, h6) {
    line-height: 1.55;
    letter-spacing: normal;
}

.na-language-switcher {
    position: fixed;
    z-index: 1000;
    top: max(14px, env(safe-area-inset-top));
    right: max(14px, env(safe-area-inset-right));
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid rgba(127, 127, 127, .24);
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    background: color-mix(in srgb, var(--na-bg, #fff) 90%, transparent);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .1);
    backdrop-filter: blur(12px);
}

.na-language-switcher-icon {
    padding-left: 8px;
    color: currentColor;
    opacity: .65;
}

.na-language-switcher button {
    min-height: 36px;
    padding: 6px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    color:#000
}

.na-language-switcher button:hover,
.na-language-switcher button:focus-visible {
    background: rgba(127, 127, 127, .13);
    outline: none;
}

.na-language-switcher button.is-active {
    background: #f1c40f;
    color: #121923;
}

@media (max-width: 560px) {
    .na-language-switcher {
        top: max(8px, env(safe-area-inset-top));
        right: max(8px, env(safe-area-inset-right));
    }
    .na-language-switcher-icon { display: none; }
}

/* Shared dark appearance for public and legacy authentication screens. */
html[data-na-theme="dark"] body { background-color: #121923 !important; color: #eef2f7; }
html[data-na-theme="dark"] .na-notification-bell { background: #f9c613; border-color: #f9c613; color: #000; }
html[data-na-theme="dark"] .na-notification-badge { border-color: #202b39; }
html[data-na-theme="dark"] .na-auth-page,
html[data-na-theme="dark"] .na-community-page,
html[data-na-theme="dark"] .na-new-auth-page { background: #121923 !important; color: #eef2f7; }
html[data-na-theme="dark"] .na-auth-card,
html[data-na-theme="dark"] .na-auth-flow-card,
html[data-na-theme="dark"] .na-community-card { background: #1b2532; border-color: #303e4e; color: #eef2f7; box-shadow: none; }
html[data-na-theme="dark"] .na-auth-title,
html[data-na-theme="dark"] .na-auth-brand-name,
html[data-na-theme="dark"] .na-step-heading,
html[data-na-theme="dark"] .na-verification-title,
html[data-na-theme="dark"] .na-community-title { color: #f7f9fc; }
html[data-na-theme="dark"] .na-auth-subtitle,
html[data-na-theme="dark"] .na-auth-copy,
html[data-na-theme="dark"] .na-step-copy,
html[data-na-theme="dark"] .na-auth-link,
html[data-na-theme="dark"] .na-auth-footer,
html[data-na-theme="dark"] .na-auth-bottom-link { color: #aeb9c7; }
html[data-na-theme="dark"] .na-auth-link:is(:hover, :focus-visible) { color: #f9c613; }
html[data-na-theme="dark"] .na-auth-page input,
html[data-na-theme="dark"] .na-new-auth-page input,
html[data-na-theme="dark"] .na-auth-page select,
html[data-na-theme="dark"] .na-auth-page textarea { background: #111923; border-color: #3a4858; color: #f4f7fb; }
html[data-na-theme="dark"] .na-sso-button { background: #202b39; border-color: #344354; }
html[data-na-theme="dark"] .na-auth-divider::before,
html[data-na-theme="dark"] .na-auth-divider::after { background: #344354; }
html[data-na-theme="dark"] .na-dashboard-kicker { color: #f9c613; }
html[data-na-theme="dark"] .na-form-select,
html[data-na-theme="dark"] .na-form-select option {
    color: #f7f9fc !important;
}

#trp-floater-ls.trp-bottom-right {
    display: none;
}

/* Container */
.na-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.na-header {
    background-color: #F1C40F;
    color: #000;
    padding: 20px 0;
    margin-bottom: 30px;
}

.na-header h1 {
    font-size: 2rem;
    font-weight: bold;
}

/* ===================================
   Authentication Pages Styles
   =================================== */

.na-auth-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* The WordPress theme's body color may be intended for a dark surface. */
    color: #333;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.na-auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

/* Auth Header */
.na-auth-header {
    text-align: center;
    margin-bottom: 32px;
}

::placeholder {
  color: #999 !important;
  opacity: 1; /* Firefox */
}

input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], input[type=number], input[type=tel], input[type=range], input[type=date], input[type=month], input[type=week], input[type=time], input[type=datetime], input[type=datetime-local], input[type=color], textarea {
    color: #000!important;
    border: 2px solid #f9c613 !important;
    background: #fff!important;
}

.na-auth-logo {
    width: 100px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.na-logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.na-auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    font-family: var(--na-font-family) !important;
}

.na-auth-subtitle {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 4px;
}

.na-auth-subtitle .na-highlight {
    color: var(--na-highlight-text);
    font-weight: 600;
}

.na-auth-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    max-width: 360px;
    margin: 0 auto;
}

/* Auth Card */
.na-auth-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

/* Auth Form */
.na-auth-form {
    margin-bottom: 0;
}

/* Form Groups */
.na-form-group {
    margin-bottom: 16px;
}

.na-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.na-form-input,
.na-form-textarea,
.na-form-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #f9c613 !important;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
    background-color: #fff !important;
    color: #000 !important;
}

.na-form-input:focus,
.na-form-textarea:focus,
.na-form-select:focus {
    outline: none;
    border-color: #F1C40F;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.1);
}

.na-form-input::placeholder {
    color: #adb5bd;
}

.na-form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Password visibility toggle (login) */
.na-password-wrapper {
    position: relative;
}

.na-password-wrapper .na-form-input {
    padding-right: 48px;
}

.na-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.na-password-toggle:hover {
    color: #495057;
    background-color: rgba(0, 0, 0, 0.04);
}

.na-password-toggle:focus {
    outline: none;
    color: #1a1a1a;
    background-color: rgba(241, 196, 15, 0.15);
    box-shadow: 0 0 0 2px rgba(241, 196, 15, 0.3);
}

.na-password-toggle:active {
    background-color: rgba(0, 0, 0, 0.06);
}

.na-password-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.na-password-toggle-icon[hidden] {
    display: none !important;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    border: 0;
    word-wrap: normal !important;
}

/* Remember Me Checkbox */
.na-form-remember {
    margin-bottom: 24px;
}

.na-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
}

.na-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #F1C40F;
}

/* Buttons */
.na-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.na-button-primary {
    background-color: #F1C40F;
    color: #1a1a1a;
}

.na-button-primary:hover:not(:disabled) {
    background-color: #D4AC0D;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(241, 196, 15, 0.3);
}

.na-button-primary:active:not(:disabled) {
    transform: translateY(0);
}

.na-button-secondary {
    background-color: #e9ecef;
    color: #495057;
}

.na-button-secondary:hover:not(:disabled) {
    background-color: #dee2e6;
}

.na-button-block {
    width: 100%;
}

.na-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Auth Links */
.na-auth-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e9ecef;
}

.na-auth-link {
    display: block;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.na-auth-link:last-child {
    margin-bottom: 0;
}

.na-auth-link:hover,
.na-auth-link:focus-visible {
    color: #796000;
}

.na-auth-link-forgot {
    font-weight: 600;
    color: var(--na-highlight-text);
}

.na-auth-link-forgot:hover {
    color: var(--na-highlight-text);
}

/* Auth Footer */
.na-auth-footer {
    text-align: center;
    color: #5f6871;
    font-size: 13px;
}

/* Verification Page Specific */
.na-verification-content {
    text-align: center;
}

.na-verification-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.na-verification-info {
    padding: 24px 0;
}

.na-verification-icon {
    color: #F1C40F;
    margin-bottom: 16px;
}

.na-verification-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.na-verification-info p {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
}

.na-verification-actions {
    margin-top: 24px;
}

.na-cooldown-timer {
    margin-top: 12px;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
}

/* Messages */
.na-message {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

/* Common toast design. Placement stays with each toast's existing controller. */
.na-toast-surface {
    --na-toast-accent: #2563eb;
    --na-toast-rgb: 37, 99, 235;
    --na-toast-background: #fff;
    --na-toast-heading: #172033;
    --na-toast-copy: #4b5563;
    --na-toast-shape: polygon(10px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 8px 100%, 0 calc(100% - 8px), 0 10px);
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
    min-width: 0;
    padding: 10px 8px 10px 18px;
    border: 0;
    border-radius: 0;
    clip-path: var(--na-toast-shape);
    background: rgba(var(--na-toast-rgb), .48);
    color: var(--na-toast-heading);
    font: 400 12px/1.5 var(--na-font-family, system-ui, sans-serif);
    text-align: start;
}
.na-toast-surface::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 1px;
    clip-path: var(--na-toast-shape);
    background: var(--na-toast-background);
    pointer-events: none;
}
.na-toast-surface::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(130deg, var(--na-toast-accent) 0 5px, transparent 5px 9px) right 26px top / 34px 5px no-repeat,
        linear-gradient(130deg, transparent 5px, var(--na-toast-accent) 5px, var(--na-toast-accent) calc(100% - 5px), transparent calc(100% - 5px)) right 30px bottom / 44px 5px no-repeat;
    pointer-events: none;
}
.na-toast-surface[data-toast-type="success"] { --na-toast-accent: #07966a; --na-toast-rgb: 7, 150, 106; }
.na-toast-surface[data-toast-type="error"] { --na-toast-accent: #dc354b; --na-toast-rgb: 220, 53, 75; }
.na-toast-surface[data-toast-type="warning"] { --na-toast-accent: #b77908; --na-toast-rgb: 183, 121, 8; }
.na-toast-surface[hidden], .na-toast-surface [hidden] { display: none !important; }
.na-toast-surface .na-toast-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 36px; color: var(--na-toast-accent); }
.na-toast-surface .na-toast-icon svg { display: block; width: 30px; height: 30px; }
.na-toast-surface .na-toast-copy { display: grid; flex: 1; min-width: 0; gap: 2px; overflow-wrap: anywhere; }
.na-toast-surface .na-toast-title { margin: 0; color: var(--na-toast-heading); font: 700 14px/1.35 var(--na-font-family, system-ui, sans-serif); }
.na-toast-surface .na-toast-text { min-width: 0; color: var(--na-toast-copy); font: 400 12px/1.5 var(--na-font-family, system-ui, sans-serif); overflow-wrap: anywhere; }
.na-toast {
    position: fixed;
    inset-inline: 16px;
    bottom: calc(var(--na-toast-controls, 0px) + 12px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    width: min(calc(100% - 32px), 648px);
    margin: 0 auto;
}
.na-toast-surface .na-toast-close,
.na-toast-surface .na-toast-retry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--na-toast-copy);
    box-shadow: none;
    font: inherit;
    cursor: pointer;
}
.na-toast-surface .na-toast-close { width: 44px; }
.na-toast-surface .na-toast-close svg { width: 18px; height: 18px; }
.na-toast-surface .na-toast-retry { text-decoration: underline; }
.na-toast-surface :is(button, a):hover { background: rgba(var(--na-toast-rgb), .1); color: var(--na-toast-heading); }
.na-toast-surface :is(button, a):focus-visible { outline: 2px solid var(--na-toast-accent); outline-offset: -3px; }
.na-profile-setup-page .na-toast { max-width: 520px; }
html[data-na-theme="dark"] .na-toast-surface {
    --na-toast-accent: #61a5ff;
    --na-toast-rgb: 97, 165, 255;
    --na-toast-background: #0e171c;
    --na-toast-heading: #f4f7fa;
    --na-toast-copy: #becbd2;
}
html[data-na-theme="dark"] .na-toast-surface::before { background: radial-gradient(ellipse at left, rgba(var(--na-toast-rgb), .1), transparent 75%), var(--na-toast-background); }
html[data-na-theme="dark"] .na-toast-surface[data-toast-type="success"] { --na-toast-accent: #21d997; --na-toast-rgb: 33, 217, 151; }
html[data-na-theme="dark"] .na-toast-surface[data-toast-type="error"] { --na-toast-accent: #ff6b80; --na-toast-rgb: 255, 107, 128; }
html[data-na-theme="dark"] .na-toast-surface[data-toast-type="warning"] { --na-toast-accent: #f6be40; --na-toast-rgb: 246, 190, 64; }
@media (prefers-reduced-motion: no-preference) {
    .na-toast-surface[data-toast-type="saving"] .na-toast-icon svg { animation: na-toast-spin 1s linear infinite; }
    @keyframes na-toast-spin { to { transform: rotate(360deg); } }
}

.na-message-icon {
    flex-shrink: 0;
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

.na-message-success {
    background-color: #d1f4e0;
    color: #0f5132;
    border: 1px solid #a3e4c1;
}

.na-message-error {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f1aeb5;
}

.na-message-info {
    background-color: #cfe2ff;
    color: #084298;
    border: 1px solid #9ec5fe;
}

/* Loading */
.na-loading {
    text-align: center;
    padding: 40px;
}

.na-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #F1C40F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Shared app header notification bell */
.na-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.na-page-title-wrapper {
    min-width: 0;
}

.na-page-heading {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.na-app-back-button {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: 1px solid #d8d2c2;
    background: #fffdf8;
    color: #2f261f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    position: relative;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(32, 24, 18, 0.04);
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.na-app-back-button::before {
    content: '';
    position: absolute;
    inset: -4px;
}

.na-app-back-button svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.na-app-back-button:hover {
    background: #f5efe5;
    border-color: #c9bda9;
    color: #17120d;
}

.na-app-back-button:active {
    transform: scale(.94);
}

.na-app-back-button:focus-visible {
    outline: 3px solid rgba(241, 196, 15, .42);
    outline-offset: 2px;
}

.na-page-heading .na-page-title-wrapper {
    overflow: hidden;
}

.na-page-heading .na-page-title,
.na-page-heading .na-page-subtitle {
    overflow-wrap: anywhere;
}

html[data-na-theme="dark"] .na-app-back-button {
    background: #1b2532;
    border-color: #3a4858;
    color: #f4f7fb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}

html[data-na-theme="dark"] .na-app-back-button:hover {
    background: #253242;
    border-color: #536276;
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .na-app-back-button {
        transition: none;
    }
}

.na-notification-bell {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #dedede;
    background: #ffffff;
    color: #333333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.06);
    -webkit-tap-highlight-color: transparent;
}

.na-notification-bell:hover {
    color: #111111;
    border-color: #cfcfcf;
}

.na-notification-bell svg {
    width: 18px;
    height: 18px;
}

.na-notification-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #df5960;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
}

.na-notification-badge.is-hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Forms (Legacy) */
.na-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .na-container {
        padding: 15px;
    }
    
    .na-header h1 {
        font-size: 1.5rem;
    }
    
    .na-form {
        padding: 20px;
    }

    .na-auth-page {
        padding: 16px;
    }

    .na-auth-card {
        padding: 24px;
    }

    .na-auth-logo {
        width: 100px;
        height: 80px;
    }

    .na-logo-img {
        width: 100px;
        height: 100px;
    }

    .na-auth-title {
        font-size: 20px;
    }

    .na-auth-subtitle {
        font-size: 14px;
    }

    .na-auth-description {
        font-size: 13px;
    }
}

/* ===================================
   Redesigned Auth Flow
   =================================== */

.na-new-auth-page {
    --na-auth-gold: #f2b705;
    --na-auth-gold-dark: #d89e00;
    --na-auth-navy: #172844;
    --na-auth-muted: #5b6b85;
    --na-auth-bg: #eef1f4;
    --na-auth-border: #e1e5ea;
    background: #dde3ea !important;
    align-items: center;
    padding: 0;
    color: var(--na-auth-navy);
    font-family: var(--na-font-family);
}

.na-auth-shell {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 32px 20px 28px;
    background: var(--na-auth-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.na-auth-brand-block,
.na-auth-flow-card,
.na-auth-made-in {
    width: 100%;
    max-width: 375px;
    margin-left: auto;
    margin-right: auto;
}

.na-auth-brand-block {
    text-align: center;
    margin-bottom: 24px;
}

.na-auth-mark {
    display: block;
    width: 90px;
    height: 90px;
    margin: 0 auto 18px;
    object-fit: contain;
}

.na-auth-brand-name {
    margin: 0 0 8px;
    color: var(--na-auth-navy);
    font-size: 21px;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.1;
    font-family: var(--na-font-family) !important;
}

.na-auth-tagline {
    margin: 0 0 6px;
    color: var(--na-auth-navy);
    font-size: 14px;
    line-height: 1.35;
}

.na-auth-tagline span {
    color: var(--na-highlight-text);
    font-weight: 800;
}

.na-auth-copy {
    max-width: 280px;
    margin: 0 auto;
    color: var(--na-auth-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.na-auth-flow-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 28px 20px 22px;
    box-shadow: 0 18px 40px -24px rgba(23, 40, 68, 0.32);
}

.na-auth-step[hidden] {
    display: none !important;
}

.na-new-auth-page .na-form-group {
    margin-bottom: 16px;
}

.na-new-auth-page .na-auth-input,
.na-new-auth-page input.na-form-input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--na-auth-gold) !important;
    border-radius: 9px;
    background: #ffffff !important;
    color: var(--na-auth-navy) !important;
    font-size: 14px;
    line-height: 40px;
}

.na-new-auth-page .na-auth-input:focus,
.na-new-auth-page input.na-form-input:focus {
    border-color: var(--na-auth-gold-dark) !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.18);
}

.na-auth-main-button {
    min-height: 38px;
    border-radius: 9px;
    background: var(--na-auth-gold);
    color: #241b00;
    font-size: 12.5px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.na-auth-main-button:hover:not(:disabled) {
    background: var(--na-auth-gold-dark);
}

.na-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
}

.na-auth-divider::before,
.na-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--na-auth-border);
}

.na-auth-divider span {
    color: var(--na-auth-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.na-auth-divider-tight {
    margin: 15px 0 6px;
}

.na-sso-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-inline: 14px;
}

.na-sso-button {
    min-height: 46px;
    padding: 10px 16px;
    border: 1.5px solid var(--na-auth-border);
    border-radius: 9px;
    background: #ffffff;
    color: var(--na-auth-navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.na-sso-button svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.na-sso-button:hover {
    border-color: var(--na-auth-muted);
    background: #fafbfc;
}

.na-sso-button:focus-visible {
    outline: 2px solid var(--na-auth-gold-dark);
    outline-offset: 3px;
}

.na-auth-bottom-link {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--na-auth-border);
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 11.5px;
}

.na-auth-bottom-link-compact {
    margin-top: 8px;
    padding-top: 0;
    border-top: 0;
}

.na-auth-bottom-link a,
.na-back-link,
.na-resend-button.is-ready {
    color: var(--na-highlight-text);
    font-weight: 800;
    text-decoration: none;
}

.na-auth-bottom-link a:hover,
.na-back-link:hover,
.na-resend-button.is-ready:hover {
    text-decoration: underline;
}

.na-verify-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #fdf3d6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.na-verify-icon svg {
    width: 24px;
    height: 24px;
}

.na-verify-icon-success {
    background: #e4f6eb;
}

.na-step-heading {
    margin: 0 0 8px;
    color: var(--na-auth-navy);
    text-align: center;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
}

.na-step-copy {
    margin: 0;
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.55;
}

.na-step-copy strong {
    color: var(--na-auth-navy);
    font-weight: 900;
}

.na-otp-label {
    margin: 22px 0 12px;
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.na-otp-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.na-otp-box {
    width: 100%;
    aspect-ratio: 1 / 1.05;
    min-height: 44px;
    border: 1.5px solid var(--na-auth-border) !important;
    border-radius: 9px;
    background: #ffffff !important;
    color: var(--na-auth-navy) !important;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
}

.na-otp-box:focus {
    border-color: var(--na-auth-gold-dark) !important;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.18);
    outline: none;
}

.na-otp-box.filled {
    border-color: var(--na-auth-muted) !important;
}

.na-otp-box.error {
    border-color: #d64545 !important;
    box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.12);
}

.na-verify-submit:disabled {
    opacity: 0.45;
}

.na-link-note {
    max-width: 250px;
    margin: 8px auto 0;
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 11.5px;
    line-height: 1.5;
}

.na-verify-status {
    margin: 18px 0 0;
    padding: 14px 12px;
    border: 1px solid var(--na-auth-border);
    border-radius: 9px;
    background: #f6f8fa;
    text-align: center;
}

.na-verify-timer {
    margin: 0;
    color: var(--na-auth-muted);
    font-size: 12px;
    line-height: 1.4;
}

.na-verify-timer strong {
    color: var(--na-auth-navy);
    font-variant-numeric: tabular-nums;
}

.na-resend-area {
    margin-top: 14px;
    text-align: center;
}

.na-resend-button,
.na-back-link {
    border: 0;
    background: transparent;
    color: #b9c0cc;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: default;
}

.na-resend-button.is-ready {
    cursor: pointer;
}

.na-resend-confirm {
    min-height: 16px;
    margin: 8px 0 0;
    color: #2e9b5c;
    font-size: 11px;
    font-weight: 800;
}

.na-back-link {
    display: block;
    margin: 16px auto 0;
    cursor: pointer;
}

.na-auth-made-in {
    margin-top: 20px;
    color: #9aa4b2;
    text-align: center;
    font-size: 10.5px;
}

.na-auth-made-in p {
    margin: 0;
}

.na-new-auth-page .na-message {
    display: block;
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 12px;
}

.na-new-auth-page .na-password-wrapper .na-form-input {
    padding-right: 48px;
}

.na-new-auth-page .na-password-toggle {
    right: 6px;
}

/* Compact login card, with the secondary actions and footer kept together. */
.na-login-page .na-auth-flow-card {
    max-width: 340px;
    padding: 20px 20px 18px;
}

.na-login-page .na-form-group,
.na-login-page .na-message {
    margin-bottom: 10px;
}

.na-login-page input.na-auth-input {
    border-color: var(--na-auth-border) !important;
}

.na-login-page .na-auth-main-button {
    min-height: 44px;
}

.na-login-page .na-auth-divider {
    margin: 16px 0;
}

.na-login-page .na-auth-bottom-link {
    margin-top: 18px;
    padding-top: 0;
    border-top: 0;
}

.na-login-page .na-auth-bottom-link-compact {
    margin-top: 6px;
}

/* ===================================
   Onboarding Preferences
   =================================== */

.na-preferences-shell {
    padding-top: 28px;
    padding-bottom: 20px;
}

.na-preferences-page .na-auth-brand-block {
    margin-bottom: 24px;
}

.na-preferences-card {
    padding: 28px 22px 22px;
}

.na-preferences-header {
    margin-bottom: 26px;
    text-align: center;
}

.na-preferences-header h2 {
    margin: 0 0 7px;
    color: var(--na-auth-navy);
    font-family: var(--na-font-family);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
}

.na-preferences-header p {
    max-width: 275px;
    margin: 0 auto;
    color: var(--na-auth-muted);
    font-size: 12px;
    line-height: 1.45;
}

.na-preference-group {
    min-width: 0;
    margin: 0 0 22px;
    padding: 0;
    border: 0;
}

.na-preference-group legend {
    width: 100%;
    margin-bottom: 10px;
    padding: 0;
    color: var(--na-auth-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.na-preference-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.na-preference-option {
    position: relative;
    cursor: pointer;
}

.na-preference-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.na-preference-tile {
    position: relative;
    min-height: 88px;
    padding: 14px 8px 10px;
    border: 1.5px solid var(--na-auth-border);
    border-radius: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.na-preference-option:hover .na-preference-tile {
    border-color: #c7ced8;
}

.na-preference-option input:focus-visible + .na-preference-tile {
    outline: 3px solid rgba(242, 183, 5, .25);
    outline-offset: 2px;
}

.na-preference-option input:checked + .na-preference-tile {
    border-color: var(--na-auth-gold);
    background: #fffaf0;
    box-shadow: 0 7px 16px -14px rgba(216, 158, 0, .8);
}

.na-preference-check {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--na-auth-gold-dark);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.na-preference-option input:checked + .na-preference-tile .na-preference-check {
    display: flex;
}

.na-preference-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 7px;
    border-radius: 50%;
    background: #f5f6f8;
    color: var(--na-auth-gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.na-preference-option input:checked + .na-preference-tile .na-preference-icon {
    background: #fff2cf;
}

.na-preference-icon svg {
    width: 20px;
    height: 20px;
}

.na-preference-name {
    color: var(--na-auth-navy);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.na-preferences-submit {
    min-height: 42px;
    margin-top: 4px;
}

.na-preferences-note {
    max-width: 245px;
    margin: 7px auto 0;
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 10.5px;
    line-height: 1.45;
}

.na-preferences-coming-soon {
    margin: -12px 0 18px;
    color: var(--na-auth-muted);
    text-align: center;
    font-size: 10.5px;
    line-height: 1.4;
}

.na-preference-option input:disabled + .na-preference-tile {
    cursor: not-allowed;
    opacity: .68;
}

.na-preferences-page .na-auth-made-in {
    margin-top: 20px;
}

html[data-na-theme="dark"] .na-new-auth-page {
    --na-auth-navy: #f4f7fb;
    --na-auth-muted: #aab5c4;
    --na-auth-bg: #121923;
    --na-auth-border: #354250;
    background: #0d131c !important;
}

html[data-na-theme="dark"] .na-auth-made-in,
html[data-na-theme="dark"] .na-password-toggle {
    color: var(--na-auth-muted, #aab5c4);
}

html[data-na-theme="dark"] .na-password-toggle:is(:hover, :focus-visible) {
    color: #f7f9fc;
}

html[data-na-theme="dark"] .na-auth-flow-card,
html[data-na-theme="dark"] .na-preference-tile {
    background: #1b2532;
}

html[data-na-theme="dark"] .na-preference-option input:checked + .na-preference-tile {
    background: #2c2b21;
}

html[data-na-theme="dark"] .na-preference-icon {
    background: #263240;
}

html[data-na-theme="dark"] .na-preference-option input:checked + .na-preference-tile .na-preference-icon {
    background: #493c19;
}

html[data-na-theme="dark"] .na-preferences-page .na-form-message .na-message-error {
    background: #47242b;
    color: #ffb8c0;
    border-color: #82434d;
}

html[data-na-theme="dark"] body.na-profile-page,
html[data-na-theme="dark"] body.na-profile-setup-page,
html[data-na-theme="dark"] body.na-settings-page,
html[data-na-theme="dark"] body.na-notifications-page,
html[data-na-theme="dark"] body.na-inbox-page {
    --nd-bg: var(--na-dark-bg);
    --nd-card: var(--na-dark-surface);
    --nd-text: var(--na-dark-text);
    --nd-muted: var(--na-dark-muted);
    --nd-line: var(--na-dark-border);
    --nd-soft: var(--na-dark-soft);
    --nd-purple: var(--na-dark-accent);
    background-color: var(--na-dark-bg) !important;
}

html[data-na-theme="dark"] body input[type=text],
html[data-na-theme="dark"] body input[type=email],
html[data-na-theme="dark"] body input[type=url],
html[data-na-theme="dark"] body input[type=password],
html[data-na-theme="dark"] body input[type=search],
html[data-na-theme="dark"] body input[type=number],
html[data-na-theme="dark"] body input[type=tel],
html[data-na-theme="dark"] body textarea,
html[data-na-theme="dark"] body select {
    background: #1b2532 !important;
    color: #f7f9fc !important;
}

html[data-na-theme="dark"] body select option {
    background: #1b2532;
    color: #f7f9fc !important;
}

html[data-na-theme="dark"] body ::placeholder {
    color: #8793a2 !important;
}

/* Account and Inbox fields share the dashboard's dark surfaces. */
html[data-na-theme="dark"] body:is(.na-profile-setup-page, .na-settings-page, .na-profile-page, .na-inbox-page) :is(
    input:not(:where([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"])),
    textarea,
    select
) {
    background-color: var(--na-dark-surface) !important;
    color: var(--na-dark-text) !important;
}

html[data-na-theme="dark"] body:is(.na-profile-setup-page, .na-settings-page, .na-profile-page, .na-inbox-page) select option {
    background-color: var(--na-dark-surface);
    color: var(--na-dark-text) !important;
}

html[data-na-theme="dark"] body:is(.na-profile-setup-page, .na-settings-page, .na-profile-page, .na-inbox-page) ::placeholder {
    color: var(--na-dark-muted) !important;
}

@media (min-width: 769px) {
    .na-preferences-shell {
        max-width: 430px;
        min-height: calc(100vh - 48px);
        min-height: calc(100dvh - 48px);
        margin: 24px auto;
        border-radius: 30px;
        box-shadow: 0 24px 70px -42px rgba(23, 40, 68, .55);
    }
}

@media (max-width: 360px) {
    .na-auth-shell {
        padding-right: 16px;
        padding-left: 16px;
    }
}

/* ===================================
   Community Home Screen (/na-community)
   =================================== */

.na-community-home-page {
    background: #ffffff;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.na-community-home-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Header / branding */
.na-community-home-header {
    margin-bottom: 32px;
}

.na-community-home-logo {
    width: 88px;
    height: 88px;
    margin: 0 auto 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.na-community-home-logo-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.na-community-home-title {
    font-size: 26px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    font-family: var(--na-font-family) !important;
}

.na-community-home-subtitle {
    font-size: 17px;
    font-weight: 500;
    color: #4a4a4a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.na-community-home-highlight {
    color: var(--na-highlight-text);
    font-weight: 700;
}

.na-community-home-description {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

/* Feature pills */
.na-community-home-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 36px;
}

.na-community-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 15px;
    border: 1.5px solid #dee2e6;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #495057;
    background: transparent;
    white-space: nowrap;
    line-height: 1;
}

/* CTA section */
.na-community-home-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.na-community-join-btn {
    font-size: 16px;
    font-weight: 700;
    padding: 16px 24px;
    border-radius: 100px;
    letter-spacing: 0.1px;
    text-transform: none;
}

/* The guest action submits a form, but must retain its secondary text-link design. */
.na-community-home-page .na-community-guest-link {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 8px 12px;
    font-family: inherit;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.na-community-home-page .na-community-guest-link:is(:hover, :focus, :active) {
    background: transparent;
    box-shadow: none;
    transform: none;
}

.na-community-home-page .na-community-guest-link:hover {
    color: #1a1a1a;
}

.na-community-guest-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Footer */
.na-community-home-footer {
    color: #adb5bd;
    font-size: 13px;
}

/* Public landing text must follow the selected appearance as well as the body. */
html[data-na-theme="dark"] .na-community-home-title,
html[data-na-theme="dark"] .na-community-home-subtitle {
    color: var(--na-dark-text);
}

html[data-na-theme="dark"] .na-community-home-description,
html[data-na-theme="dark"] .na-community-guest-link,
html[data-na-theme="dark"] .na-community-home-footer {
    color: var(--na-dark-muted);
}

html[data-na-theme="dark"] .na-community-pill {
    color: var(--na-dark-text);
    border-color: var(--na-dark-border);
}

html[data-na-theme="dark"] .na-community-guest-link:is(:hover, :focus-visible) {
    color: var(--na-dark-accent);
}

@media (max-width: 480px) {
    .na-community-home-page {
        padding: 32px 24px;
    }

    .na-community-home-title {
        font-size: 22px;
    }

    .na-community-home-subtitle {
        font-size: 15px;
    }
}

/* One typing highlight across app forms; preserve control sizes and error states.
 * Important colors override page styles and the later WordPress theme rules. */
html[data-na-app="1"] body[class*="na-"] :is(
    input:not(:where([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="button"], [type="submit"], [type="reset"], [type="image"], [type="hidden"])),
    textarea,
    select,
    [contenteditable="true"]
):focus:not([readonly], [aria-invalid="true"], .error, .is-error) {
    border-color: var(--na-field-focus) !important;
    outline-color: var(--na-field-focus) !important;
}

/* Touch browsers also match :focus-visible on text fields. Keep a quiet field
 * border and remove the extra tap ring throughout the app, including dialogs.
 * Desktop keyboard focus styles and validation borders remain available. */
@media (hover: none), (pointer: coarse) {
    html[data-na-app="1"] {
        --na-field-focus: var(--na-dark-border, #dee2e6);
    }

    html[data-na-app="1"] body[class*="na-"] :focus:not([aria-invalid="true"], .error, .is-error),
    html[data-na-app="1"] body[class*="na-"] input:focus-visible + :is(
        .na-preference-tile,
        .na-settings-theme-card,
        .na-settings-switch,
        .naps-notification-switch
    ),
    html[data-na-app="1"] body[class*="na-"] .naps-goal-option:has(input:focus-visible) {
        outline: none !important;
        box-shadow: none !important;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    .na-auth-card {
        padding: 20px;
    }

    .na-form-input,
    .na-form-textarea,
    .na-form-select {
        padding: 12px 14px;
        font-size: 16px;
    }

    .na-button {
        padding: 12px 20px;
        font-size: 15px;
    }
}
