/* Staygo Property brand layer.
 * Loaded last on every page (see </head> of each HTML file) so it wins over page styles.
 * Palette from nexisdigital.tech: magenta #F52380, orange #FF6A00 (app-icon gradient),
 * lime #BBEF1F (call to action), cyan #00E5FF / teal #00727E, midnight #100A30, ink #111111.
 * Type: Manrope (display) + Inter (text). */

:root {
    --nx-magenta: #F52380;
    --nx-magenta-hover: #FF4D9A;
    --nx-magenta-deep: #C4146A;
    --nx-orange: #FF6A00;
    --nx-lime: #BBEF1F;
    --nx-cyan: #00E5FF;
    --nx-teal: #00727E;
    --nx-midnight: #100A30;
    --nx-ink: #111111;
    --nx-gradient: linear-gradient(135deg, #F52380 0%, #FF4D5E 55%, #FF6A00 100%);
    --nx-font-display: 'Manrope', 'Inter', system-ui, sans-serif;
    --nx-font-text: 'Inter', system-ui, sans-serif;

    /* the portal's own accent tokens now carry the Staygo magenta */
    --orange: var(--nx-magenta);
    --orange-hover: var(--nx-magenta-hover);
    --gold: var(--nx-magenta);
    --gold-hover: var(--nx-magenta-hover);
    --font-display: var(--nx-font-display);
}

/* Light screens use Staygo midnight for text instead of pure black. */
:root.light-theme {
    --text-primary: var(--nx-midnight);
}

::selection { background: rgba(245, 35, 128, 0.22); }

/* ---- Logo lockup: mark + STAYGO (+ optional tagline) --------------------- */
.webkeys-wordmark,
.webkeys-brand,
.brand.webkeys-wordmark,
.wordmark.webkeys-wordmark {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.42em;
    color: var(--nx-ink);
    font-family: var(--nx-font-display) !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em !important;
    line-height: 1 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.webkeys-wordmark .nexis-mark {
    width: 1.3em;
    height: 1.3em;
    flex: none;
    object-fit: contain;
}

.webkeys-wordmark .nexis-word {
    color: inherit;
}

.webkeys-wordmark .nexis-sub {
    align-self: center;
    margin-left: 0.1em;
    padding: 0.32em 0.55em 0.3em;
    border-radius: 999px;
    background: rgba(245, 35, 128, 0.12);
    color: var(--nx-magenta);
    font-family: var(--nx-font-text);
    font-size: 0.42em;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1;
}

/* Dark screens: white text and a white mark. */
:root:not(.light-theme) .webkeys-wordmark { color: #ffffff; }
:root:not(.light-theme) .webkeys-wordmark .nexis-mark { filter: none; } /* the Staygo mark is in colour on both themes */
:root:not(.light-theme) .webkeys-wordmark .nexis-sub { background: rgba(245, 35, 128, 0.18); color: #FF7AB4; }

/* Pages that are always light (guest/staff key cards, door QR, password pages)
   mark themselves with .nexis-light on a container; keep the black mark there. */
.nexis-light .webkeys-wordmark { color: var(--nx-ink) !important; }
.nexis-light .webkeys-wordmark .nexis-mark { filter: none !important; }

/* ---- Dashboard home: Staygo hero card + app tiles ----------------------- */
/* Clock and live numbers sit in the dark "ink" card used across nexisdigital.tech. */
html body .smart-widget {
    position: relative;
    overflow: hidden;
    background: var(--nx-ink) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 28px !important;
    box-shadow: 0 18px 40px rgba(16, 10, 48, 0.18) !important;
    color: #ffffff !important;
}
html body .smart-widget::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 35, 128, 0.35), rgba(255, 106, 0, 0.12) 45%, transparent 70%);
    pointer-events: none;
}
html body .smart-widget > * { position: relative; z-index: 1; }
html body .smart-widget .widget-time {
    color: #ffffff !important;
    font-family: var(--nx-font-display) !important;
    font-weight: 700 !important;
    letter-spacing: -0.05em !important;
}
html body .smart-widget .widget-date { color: rgba(255, 255, 255, 0.62) !important; }
html body .smart-widget .widget-time-section { border-color: rgba(255, 255, 255, 0.1) !important; }
html body .smart-widget .widget-status-item {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 18px !important;
    color: #ffffff !important;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
html body .smart-widget .widget-status-item:hover {
    background: rgba(245, 35, 128, 0.16) !important;
    border-color: rgba(245, 35, 128, 0.45) !important;
    transform: translateY(-1px);
}
html body .smart-widget .widget-status-item * { color: inherit; }
html body .smart-widget .widget-status-item :is(span, div):last-child { color: rgba(255, 255, 255, 0.6) !important; }
html body .smart-widget .widget-status-item :is(span, div):first-child { color: #ffffff !important; font-family: var(--nx-font-display); }

/* App tiles: midnight icons, Staygo gradient on hover. */
html body .app-icon-box {
    border-radius: 22px !important;
    color: var(--nx-midnight);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}
:root:not(.light-theme) .app-icon-box { color: #ffffff; }
html body .app-icon-wrapper:hover .app-icon-box,
html body .app-icon-wrapper:focus-visible .app-icon-box {
    background: var(--nx-gradient) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(245, 35, 128, 0.32) !important;
    transform: translateY(-3px);
}
html body .app-icon-wrapper:hover .app-icon-box svg { stroke: #ffffff; }
html body .app-icon-label {
    font-family: var(--nx-font-display) !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
}

/* ---- Type system (not on guest/staff key pages, which keep their own look) --
 * Manrope ExtraBold with tight tracking for headings and names,
 * Space Grotesk for times, dates, numbers and small labels, Inter for text. */
:root { --nx-font-tech: 'Space Grotesk', 'Inter', system-ui, sans-serif; }

html:not([data-i18n="guest"]) body :is(h1, h2, h3, .page-title, .section-heading, .modal-title) {
    font-family: var(--nx-font-display) !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em !important;
}

html:not([data-i18n="guest"]) body :is(.widget-time, .widget-date, .stat-value, .stat-number, .widget-status-item :first-child, #live-clock) {
    font-family: var(--nx-font-tech) !important;
    font-variant-numeric: tabular-nums;
}

html:not([data-i18n="guest"]) body :is(.form-label, .widget-status-item :last-child, .app-icon-label, .eyebrow) {
    font-family: var(--nx-font-tech) !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
}

/* ---- Buttons: Staygo pills --------------------------------------------------
 * Primary: ink pill on light screens, lime pill on dark screens (nexisdigital.tech CTA).
 * Secondary: outline pill. Sentence case, Manrope bold, no wide tracking. */
html:not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary,
              .pcm-btn-primary, .dr-btn.primary, .admin-create-button, .submit-btn, .wkp-btn, .team-btn) {
    border-radius: 999px !important;
    background: var(--nx-ink) !important;
    background-image: none !important;
    border: 1px solid var(--nx-ink) !important;
    color: #ffffff !important;
    font-family: var(--nx-font-display) !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    text-transform: none !important;
    box-shadow: 0 6px 18px rgba(16, 10, 48, 0.16) !important;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease !important;
}
html:not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary,
              .pcm-btn-primary, .dr-btn.primary, .admin-create-button, .submit-btn, .wkp-btn, .team-btn):hover:not(:disabled) {
    background: var(--nx-magenta) !important;
    border-color: var(--nx-magenta) !important;
    box-shadow: 0 10px 24px rgba(245, 35, 128, 0.32) !important;
    transform: translateY(-1px);
}
html:not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary,
              .pcm-btn-primary, .dr-btn.primary, .admin-create-button, .submit-btn, .wkp-btn, .team-btn):active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}
:root:not(.light-theme):not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary,
              .pcm-btn-primary, .dr-btn.primary, .admin-create-button, .submit-btn, .wkp-btn, .team-btn) {
    background: var(--nx-lime) !important;
    border-color: var(--nx-lime) !important;
    color: var(--nx-ink) !important;
    box-shadow: 0 8px 22px rgba(187, 239, 31, 0.18) !important;
}
:root:not(.light-theme):not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary,
              .pcm-btn-primary, .dr-btn.primary, .admin-create-button, .submit-btn, .wkp-btn, .team-btn):hover:not(:disabled) {
    background: #CDF54D !important;
    border-color: #CDF54D !important;
    color: var(--nx-ink) !important;
    box-shadow: 0 10px 26px rgba(187, 239, 31, 0.28) !important;
}
html:not([data-i18n="guest"]) body :is(.btn-primary, .btn-submit, .btn-create-key, .kp-primary, .se-primary, .nl-primary, .pcm-btn-primary, .dr-btn.primary,
              .admin-create-button, .submit-btn, .wkp-btn, .team-btn) svg { stroke: currentColor; }

html:not([data-i18n="guest"]) body :is(.btn-ghost, .logout-btn, .signout-btn, .pcm-btn-ghost, .se-btn, .kp-btn, .nl-btn, .ret-btn, .pcm-btn-print, .btn-primary-subtle, .dr-btn:not(.primary)) {
    border-radius: 999px !important;
    font-family: var(--nx-font-display) !important;
    font-weight: 700 !important;
    letter-spacing: -0.005em !important;
    text-transform: none !important;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease !important;
}
html:not([data-i18n="guest"]) body :is(.btn-ghost, .logout-btn, .signout-btn, .pcm-btn-ghost, .se-btn, .kp-btn, .nl-btn, .ret-btn, .pcm-btn-print, .btn-primary-subtle, .dr-btn:not(.primary)):hover:not(:disabled) {
    border-color: var(--nx-magenta) !important;
    color: var(--nx-magenta) !important;
}

/* Small "chip" actions (edit, logs, restore…) become soft pills. */
html:not([data-i18n="guest"]) body :is(.btn-edit-premium, .btn-logs-premium, .btn-restore-premium, .key-btn-edit, .key-btn-pause, .key-btn-qr, .key-btn-checkout, .view-tab-btn, .tab-btn) {
    border-radius: 999px !important;
    font-family: var(--nx-font-display) !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
html:not([data-i18n="guest"]) body :is(.view-tab-btn, .tab-btn).active {
    background: var(--nx-ink) !important;
    color: #ffffff !important;
    border-color: var(--nx-ink) !important;
}
:root:not(.light-theme):not([data-i18n="guest"]) body :is(.view-tab-btn, .tab-btn).active {
    background: var(--nx-lime) !important;
    color: var(--nx-ink) !important;
    border-color: var(--nx-lime) !important;
}

/* ---- Theme: follows the device (Settings → Appearance), no header button --- */
html body .theme-toggle-btn,
html body #headerThemeToggleBtn,
html body button[data-wk-on-click="h04958c9572"],
html body button.header-icon-btn[data-wk-on-click="h04958c9572"] {
    display: none !important;
}
#appearanceDropdownBtn .nx-theme-sep { display: none; }
#appearanceDropdownBtn .nx-theme-value {
    margin-left: auto;
    padding-left: 12px;
    color: var(--nx-magenta);
    font-weight: 700;
}

/* ---- Accent details ---------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-color: var(--nx-magenta);
}

input[type="checkbox"],
input[type="radio"],
input[type="range"],
progress {
    accent-color: var(--nx-magenta);
}

/* No tagline under the product name (brand.json "tagline": ""): nothing shown. */
.webkeys-wordmark .nexis-sub:empty { display: none !important; }

/* The wordmark: "Stay" in ink, "go" in the brand pink (brand.json "wordmarkAccent"). */
.webkeys-wordmark .nexis-word { text-transform: none !important; }
.webkeys-wordmark .nexis-go { color: #E3176F; }
:root:not(.light-theme) .webkeys-wordmark .nexis-go { color: #FF4D9A; }
