/*
Theme Name: nexushud-theme
Template: blueprint-theme
Author: Jamie Chang

*/

:root {
    --nx-bg: #f6f7fb;
    --nx-bg-2: #ffffff;
    --nx-surface: rgba(20, 22, 45, 0.035);
    --nx-surface-2: rgba(20, 22, 45, 0.06);
    --nx-border: rgba(20, 22, 45, 0.12);
    --nx-text: #191c2e;
    --nx-muted: #6a6f86;
    --nx-accent: #7c5cff;
    --nx-accent-2: #0891b2;
}

body.nexushud {
    background: var(--nx-bg);
    color: var(--nx-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.nexushud a {
    color: var(--nx-accent);
}

.nx-grid-bg {
    background-color: var(--nx-bg);
    background-image:
        radial-gradient(circle at 20% 0%, rgba(124, 92, 255, 0.10), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(8, 145, 178, 0.08), transparent 40%),
        linear-gradient(rgba(20, 22, 45, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 22, 45, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 38px 38px, 38px 38px;
}

.nx-wordmark {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--nx-text);
    text-decoration: none;
    font-size: 1.4rem;
}

.nx-wordmark span {
    color: var(--nx-accent);
}

/* ---------- Front page hero ---------- */
.nx-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nx-hero-title {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    background: linear-gradient(120deg, #191c2e 0%, #7c5cff 60%, var(--nx-accent-2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nx-hero-sub {
    color: var(--nx-muted);
    max-width: 640px;
}

.nx-inputbar {
    background: var(--nx-surface-2);
    border: 1px solid var(--nx-border);
    border-radius: 18px;
    padding: 10px 10px 10px 22px;
    box-shadow: 0 12px 40px rgba(20, 22, 45, 0.10);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nx-inputbar:focus-within {
    border-color: var(--nx-accent);
    box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16), 0 12px 40px rgba(20, 22, 45, 0.10);
}

.nx-inputbar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--nx-text);
    font-size: 1.1rem;
}

.nx-inputbar input::placeholder {
    color: var(--nx-muted);
}

.nx-send {
    border: none;
    border-radius: 12px;
    background: linear-gradient(120deg, var(--nx-accent), #9d7bff);
    color: #fff;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.nx-send:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.nx-chip {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    color: var(--nx-muted);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.nx-chip:hover {
    color: var(--nx-text);
    border-color: var(--nx-accent);
}

/* ---------- HUD ---------- */
.nx-topbar {
    border-bottom: 1px solid var(--nx-border);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
}

.nx-section-label {
    color: var(--nx-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 600;
}

.nx-slot {
    border: 2px dashed var(--nx-border);
    border-radius: 16px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--nx-muted);
    cursor: pointer;
    transition: all 0.18s ease;
    background: transparent;
    text-align: center;
}

.nx-slot:hover {
    border-color: var(--nx-accent);
    color: var(--nx-text);
    background: rgba(124, 92, 255, 0.06);
    transform: translateY(-2px);
}

.nx-slot i {
    font-size: 1.6rem;
}

.nx-tile {
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    min-height: 180px;
    background: var(--nx-surface);
    overflow: hidden;
    position: relative;
    transition: all 0.18s ease;
}

.nx-tile:hover {
    border-color: var(--nx-border);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 22, 45, 0.12);
}

.nx-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.nx-tile-remove {
    position: absolute;
    top: 10px;
    right: 12px;
    color: var(--nx-muted);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nx-tile:hover .nx-tile-remove {
    opacity: 1;
}

.nx-tile-row {
    color: var(--nx-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--nx-border);
}

/* ---------- Tool library ---------- */
.nexushud .modal-content {
    background: var(--nx-bg-2);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    border-radius: 18px;
}

.nexushud .modal-header,
.nexushud .modal-footer {
    border-color: var(--nx-border);
}

.nx-tool-card {
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    height: 100%;
}

.nx-tool-card:hover {
    border-color: var(--nx-accent);
    background: rgba(124, 92, 255, 0.07);
    transform: translateY(-2px);
}

.nx-form-control {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    border-radius: 10px;
}

.nx-form-control:focus {
    background: var(--nx-surface);
    border-color: var(--nx-accent);
    color: var(--nx-text);
    box-shadow: none;
    outline: none;
}

/* ---------- Automations ---------- */
.nx-agent-card {
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    background: var(--nx-surface);
    transition: border-color 0.18s ease;
}

.nx-agent-card.working {
    border-color: rgba(124, 92, 255, 0.5);
}

.nx-pulse {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nx-accent-2);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.6);
    animation: nx-pulse 1.6s infinite;
}

.nx-pulse.done {
    background: #2ca01c;
    animation: none;
    box-shadow: none;
}

@keyframes nx-pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.nx-step {
    color: var(--nx-muted);
    font-size: 0.9rem;
}

.nexushud #footer {
    background: transparent !important;
    border-top: 1px solid var(--nx-border);
}

/* ---------- Dashboard (My HUDs) ---------- */
.nx-hud-card {
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    background: var(--nx-surface);
    color: var(--nx-text);
    overflow: hidden;
    transition: all 0.18s ease;
}

.nx-hud-card:hover {
    border-color: var(--nx-accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(20, 22, 45, 0.12);
    color: var(--nx-text);
}

.nx-hud-card-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--nx-accent);
    background:
        radial-gradient(circle at 30% 20%, rgba(124, 92, 255, 0.12), transparent 60%),
        linear-gradient(rgba(20, 22, 45, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 22, 45, 0.05) 1px, transparent 1px);
    background-size: 100% 100%, 26px 26px, 26px 26px;
    border-bottom: 1px solid var(--nx-border);
}

#nxModel {
    height: 52px;
}

/* ---------- Gmail connector tile ---------- */
.nx-tile.nx-connector {
    min-height: 0;
}

.nx-tile.nx-connector:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--nx-border);
}

.nx-gmail-feed {
    max-height: 320px;
    overflow-y: auto;
}

.nx-mail-row {
    gap: 12px;
    border-bottom: 1px solid var(--nx-border);
    transition: background 0.12s ease;
}

.nx-mail-row:last-child {
    border-bottom: none;
}

.nx-mail-row:hover {
    background: var(--nx-surface);
}

.nx-mail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nx-accent);
    margin-top: 6px;
    flex: 0 0 auto;
}

.nx-mail-dot.empty {
    background: transparent;
    border: 1px solid var(--nx-border);
}

.nx-gmail-unread {
    color: var(--nx-accent);
    border-color: var(--nx-accent);
}

/* ---------- Morning brief ---------- */
.nx-brief-card {
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    background: var(--nx-bg-2);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(20, 22, 45, 0.06);
}

.nx-brief-task {
    border-bottom: 1px solid var(--nx-border);
    transition: background 0.12s ease;
}

.nx-brief-task:last-child {
    border-bottom: none;
}

.nx-brief-task:hover {
    background: rgba(124, 92, 255, 0.04);
}

.nx-brief-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.nx-brief-do:disabled {
    opacity: 0.6;
    cursor: default;
}
