/**
 * BridgeWorks — Demo pubblica area aziende
 */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.co-demo-page {
    padding-top: 0;
}

body.co-demo-page .co-demo-banner {
    position: sticky;
    top: 0;
    z-index: 80;
    background: #1e293b;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.co-demo-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.co-demo-banner__text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.co-demo-banner__pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #c4a882;
    color: #1e293b;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.co-demo-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.co-demo-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.co-demo-banner__btn:hover {
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    color: #fff;
}

.co-demo-banner__btn--primary {
    background: #fff;
    color: #1e293b;
    border-color: #fff;
}

.co-demo-banner__btn--primary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.co-demo-banner__btn--ghost {
    opacity: 0.85;
}

body.company-pd2-page.co-demo-page .pd2.pd2-app,
body.co-demo-page .co-demo-app {
    min-height: calc(100vh - 54px);
}

body.company-pd2-page.co-demo-page .pd2-nav {
    overflow-y: auto;
    min-height: 0;
    max-height: calc(100vh - 54px);
}

body.co-demo-page .pd2-user {
    text-decoration: none;
    pointer-events: none;
}

.co-demo-screen[hidden] {
    display: none !important;
}

.co-demo-screen.is-active {
    display: block;
}

.co-demo-kicker {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.co-demo-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 22px 24px;
}

.co-demo-card h2,
.co-demo-card h3 {
    margin: 0 0 10px;
    color: #0f172a;
}

.co-demo-card h2 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.co-demo-card h3 {
    margin-top: 18px;
    font-size: 0.95rem;
}

.co-demo-job,
.co-demo-app-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
    gap: 20px;
    margin-bottom: 32px;
}

.co-demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.co-demo-chips li,
.co-demo-chips span,
.co-demo-source {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.08);
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.co-demo-list {
    margin: 0;
    padding-left: 1.15rem;
    color: #334155;
    line-height: 1.55;
}

.co-demo-dl {
    margin: 0;
}

.co-demo-dl div {
    display: grid;
    gap: 2px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.co-demo-dl dt {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.co-demo-dl dd {
    margin: 0;
    font-weight: 600;
    color: #0f172a;
}

.co-demo-note {
    margin: 16px 0 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

.co-demo-apps {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.co-demo-letter {
    white-space: pre-wrap;
    line-height: 1.65;
    color: #1e293b;
    font-size: 0.95rem;
}

.co-demo-score {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0f172a;
    line-height: 1;
}

.co-demo-score span {
    font-size: 1.25rem;
    color: #64748b;
    margin-left: 2px;
}

.co-demo-score-lead {
    margin: 8px 0 16px;
    font-size: 0.8125rem;
    color: #64748b;
}

.co-demo-layers {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.co-demo-layers li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
}

.co-demo-bar {
    grid-column: 1 / -1;
    height: 6px;
    background: #e2e8f0;
    overflow: hidden;
}

.co-demo-bar span {
    display: block;
    height: 100%;
    background: #363d4b;
}

.co-demo-notes-label {
    display: block;
    margin-top: 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.co-demo-notes {
    width: 100%;
    margin: 6px 0 10px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    font: inherit;
    color: #0f172a;
    resize: vertical;
}

.co-demo-chat {
    display: grid;
    gap: 12px;
    max-width: 760px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 18px;
    margin-bottom: 32px;
}

.co-demo-chat__thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 280px;
    max-height: 420px;
    overflow-y: auto;
    padding: 4px;
}

.co-demo-msg {
    max-width: 85%;
}

.co-demo-msg p {
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    line-height: 1.45;
}

.co-demo-msg time {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
}

.co-demo-msg--them {
    align-self: flex-start;
}

.co-demo-msg--them p {
    background: #f1f5f9;
    color: #0f172a;
}

.co-demo-msg--me {
    align-self: flex-end;
    text-align: right;
}

.co-demo-msg--me p {
    background: #363d4b;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.co-demo-chat__suggest {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.co-demo-chip {
    max-width: 100%;
    text-align: left;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f8fafc;
    color: #334155;
    font: inherit;
    font-size: 0.8125rem;
    cursor: pointer;
}

.co-demo-chip:hover {
    background: #eef2f6;
}

.co-demo-chat__composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}

.co-demo-chat__composer textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    font: inherit;
    resize: vertical;
}

.co-demo-pipe-card {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 12px;
    margin: 0;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.co-demo-pipe-card:hover {
    border-color: #363d4b;
}

.co-demo-pipe-card__av {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
}

.co-demo-pipe-card__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.co-demo-pipe-card__body strong {
    font-size: 0.875rem;
}

.co-demo-pipe-card__body span {
    font-size: 0.75rem;
    color: #64748b;
}

.co-demo-rank {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.co-demo-rank__card {
    display: grid;
    grid-template-columns: 36px 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    text-decoration: none;
    color: inherit;
}

.co-demo-rank__card:hover {
    border-color: #363d4b;
    text-decoration: none;
}

.co-demo-rank__pos {
    font-weight: 800;
    color: #94a3b8;
}

.co-demo-rank__av {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    font-weight: 700;
}

.co-demo-rank__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.co-demo-rank__body strong {
    font-size: 0.95rem;
}

.co-demo-rank__body > span:first-of-type {
    font-size: 0.8125rem;
    color: #64748b;
}

.co-demo-rank__score {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.co-demo-rank__score small {
    font-size: 0.75rem;
    color: #64748b;
}

.co-demo-rows {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    margin-bottom: 32px;
}

.co-demo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-decoration: none;
    color: inherit;
}

.co-demo-row:last-child {
    border-bottom: none;
}

a.co-demo-row:hover {
    background: #f8fafc;
    text-decoration: none;
}

.co-demo-row__av {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 700;
}

.co-demo-row__body {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.co-demo-row__body strong {
    font-size: 0.95rem;
}

.co-demo-row__body span {
    font-size: 0.8125rem;
    color: #64748b;
}

.co-demo-row__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.co-demo-row__meta {
    font-size: 0.75rem;
    color: #64748b;
}

.co-demo-form {
    display: grid;
    gap: 14px;
    max-width: 640px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    padding: 22px 24px;
    margin-bottom: 32px;
}

.co-demo-form label {
    display: grid;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.co-demo-form input,
.co-demo-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    font: inherit;
    font-weight: 500;
    color: #0f172a;
}

.co-demo-check {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
}

.co-demo-check input {
    width: auto;
}

.co-demo-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}

.co-demo-tool {
    display: block;
    padding: 18px 18px 16px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    text-decoration: none;
    color: inherit;
}

a.co-demo-tool:hover {
    border-color: #363d4b;
    text-decoration: none;
}

.co-demo-tool h2 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.co-demo-tool p {
    margin: 0;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.45;
}

.co-demo-welcome {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
}

.co-demo-welcome[hidden],
.co-demo-tour[hidden],
.co-demo-toast[hidden] {
    display: none !important;
}

.co-demo-welcome__card {
    width: min(520px, 100%);
    background: #fff;
    padding: 28px 28px 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.co-demo-welcome__card h2 {
    margin: 0 0 10px;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}

.co-demo-welcome__card p {
    margin: 0 0 18px;
    color: #475569;
    line-height: 1.5;
}

.co-demo-welcome__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.co-demo-tour {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 110;
    width: min(380px, calc(100vw - 24px));
}

.co-demo-tour__card {
    background: #0f172a;
    color: #f8fafc;
    padding: 18px 18px 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
}

.co-demo-tour__step {
    margin: 0 0 6px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c4a882;
    font-weight: 700;
}

.co-demo-tour__card h2 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.co-demo-tour__card p {
    margin: 0 0 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.co-demo-tour__nav {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.co-demo-tour__nav-end {
    display: flex;
    gap: 8px;
}

.co-demo-tour .cd-btn--ghost,
.co-demo-tour .cd-btn--secondary {
    background: transparent;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.2);
}

.co-demo-tour .cd-btn--primary {
    background: #fff;
    color: #0f172a;
    border-color: #fff;
}

.co-demo-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 130;
    max-width: min(480px, calc(100vw - 24px));
    padding: 12px 16px;
    background: #0f172a;
    color: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.3);
}

@media (max-width: 960px) {
    .co-demo-job,
    .co-demo-app-grid {
        grid-template-columns: 1fr;
    }

    .co-demo-rank__card {
        grid-template-columns: 28px 40px minmax(0, 1fr);
    }

    .co-demo-rank__score {
        grid-column: 2 / -1;
    }
}

@media (max-width: 720px) {
    .co-demo-banner__inner {
        padding: 10px 14px;
    }

    .co-demo-chat__composer {
        grid-template-columns: 1fr;
    }

    .co-demo-tour {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .co-demo-banner__btn,
    .co-demo-pipe-card,
    .co-demo-rank__card,
    .co-demo-tool {
        transition: none;
    }
}
