/* Confidence nav — 7 tabs + bottom sheets */

/* Cross-document View Transitions (Chromium) — keep chrome stable across hubs */
@view-transition {
    navigation: auto;
}

.top-nav {
    view-transition-name: unimart-top-nav;
}

.unimart-nav--confidence {
    view-transition-name: unimart-bottom-nav;
}

.nav-confidence-link[type="button"],
.unimart-nav--confidence button.unimart-nav__item {
    -webkit-appearance: none;
    appearance: none;
    border: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    outline: none;
    color: rgba(255, 255, 255, 0.45);
    font-family: inherit;
    text-align: center;
}
.unimart-nav--confidence button.unimart-nav__item:hover,
.unimart-nav--confidence button.unimart-nav__item.is-active {
    color: #fff !important;
    background: transparent !important;
}
.unimart-nav--confidence .unimart-nav__inner {
    max-width: 100%;
    padding: 0 0.15rem;
}
.unimart-nav--confidence .unimart-nav__inner--six {
    max-width: 520px;
}
.unimart-nav--confidence .unimart-nav__inner--5,
.unimart-nav--confidence .unimart-nav__inner--6 {
    max-width: 560px;
}
.unimart-nav--confidence .unimart-nav__inner--seven,
.unimart-nav--confidence .unimart-nav__inner--7 {
    max-width: 100%;
    padding: 0 0.05rem;
}
.unimart-nav--confidence .unimart-nav__inner--seven .unimart-nav__item span,
.unimart-nav--confidence .unimart-nav__inner--7 .unimart-nav__item span,
.unimart-nav--confidence .unimart-nav__inner--6 .unimart-nav__item span {
    font-size: 0.5rem;
}
.unimart-nav--confidence .unimart-nav__inner--seven .unimart-nav__item i,
.unimart-nav--confidence .unimart-nav__inner--7 .unimart-nav__item i,
.unimart-nav--confidence .unimart-nav__inner--6 .unimart-nav__item i {
    font-size: 0.98rem;
}
.unimart-nav--confidence .unimart-nav__item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    padding: 0.35rem 0.15rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}
.unimart-nav--confidence .unimart-nav__item span {
    font-size: 0.56rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.unimart-nav--confidence .unimart-nav__item i {
    font-size: 1.05rem;
}
/* Center Junior / custom agent name tab */
.unimart-nav--confidence .unimart-nav__item--center {
    flex: 1.15 1 0;
}
.unimart-nav--confidence .unimart-nav__item--center i {
    font-size: 1.2rem;
}
.unimart-nav--confidence .unimart-nav__item--center span {
    font-weight: 600;
}
.nav-confidence-badge,
.unimart-nav--confidence .unimart-nav__badge {
    position: absolute;
    top: 0.05rem;
    right: 0.1rem;
    min-width: 1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--unimart-orange, #f68b1e);
    color: #fff;
    font-size: 0.52rem;
    font-weight: 700;
    line-height: 1.2;
}

body.has-confidence-nav .home-intel__card--unread {
    border-left: 3px solid var(--unimart-orange, #f68b1e);
}
body.confidence-nav-modal-open {
    overflow: hidden;
}

/* Bottom sheets — List + More share one light UNIMART OS chrome */
.cn-sheet[hidden] {
    display: none !important;
}
.cn-sheet {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}
.cn-sheet.is-open {
    display: flex !important;
    pointer-events: auto;
}
.cn-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.cn-sheet.is-open .cn-sheet__backdrop {
    opacity: 1;
}
.cn-sheet__panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: min(86vh, 680px);
    margin: 0 auto;
    padding: 0 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
    border-radius: 22px 22px 0 0;
    background:
        linear-gradient(180deg, rgba(246, 139, 30, 0.07) 0%, rgba(255, 255, 255, 0) 4.5rem),
        #fff;
    box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.18);
    transform: translateY(100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}
.cn-sheet.is-open .cn-sheet__panel {
    transform: translateY(0);
}
.cn-sheet__handle {
    width: 2.25rem;
    height: 0.28rem;
    margin: 0.55rem auto 0.15rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.14);
}
.cn-sheet__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 1.1rem 0.75rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.cn-sheet__heading {
    flex: 1;
    min-width: 0;
}
.cn-sheet__heading .um-page-eyebrow {
    margin-bottom: 0.2rem;
}
.cn-sheet__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--um-navy, #2c3e50);
}
.cn-sheet__lead {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--um-gray-600, #6b7280);
}
.cn-sheet__close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 0.15rem;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--um-navy, #2c3e50);
    cursor: pointer;
    transition: background 0.15s ease;
}
.cn-sheet__close:hover {
    background: rgba(15, 23, 42, 0.1);
}
.cn-sheet__close:focus-visible {
    outline: 2px solid var(--unimart-orange, #f68b1e);
    outline-offset: 2px;
}
.cn-sheet__body {
    padding: 0.9rem 1.1rem 0.55rem;
    overflow-y: auto;
    max-height: calc(min(86vh, 680px) - 7.5rem);
    -webkit-overflow-scrolling: touch;
}
.cn-sheet__empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--um-gray-600, #6b7280);
}

/* List modal */
.cn-list-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cn-list-action {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    text-decoration: none;
    text-align: left;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.cn-list-action:hover {
    border-color: rgba(246, 139, 30, 0.35);
    box-shadow: 0 2px 12px rgba(246, 139, 30, 0.1);
    background: rgba(246, 139, 30, 0.03);
}
.cn-list-action:focus-visible {
    outline: 2px solid var(--unimart-orange, #f68b1e);
    outline-offset: 2px;
}
.cn-list-action__icon {
    flex-shrink: 0;
    width: 2.55rem;
    height: 2.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1rem;
}
.cn-list-action--orange .cn-list-action__icon {
    background: rgba(246, 139, 30, 0.14);
    color: var(--unimart-orange, #f68b1e);
}
.cn-list-action--blue .cn-list-action__icon {
    background: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}
.cn-list-action--green .cn-list-action__icon {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.cn-list-action--indigo .cn-list-action__icon {
    background: rgba(246, 139, 30, 0.1);
    color: #c2410c;
}
.cn-list-action--slate .cn-list-action__icon {
    background: rgba(44, 62, 80, 0.1);
    color: #2c3e50;
}
.cn-list-action__copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}
.cn-list-action__label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--um-navy, #2c3e50);
}
.cn-list-action__sub {
    font-size: 0.76rem;
    color: var(--um-gray-600, #6b7280);
    line-height: 1.35;
}
.cn-list-action__arrow {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--unimart-orange, #f68b1e);
}

/* More grid — light tiles, brand-led accents */
.cn-more-group {
    margin: 0 0 1rem;
}
.cn-more-group:last-child {
    margin-bottom: 0.25rem;
}
.cn-more-group__label {
    margin: 0 0 0.45rem 0.15rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--unimart-text-muted, #64748b);
}
.cn-more-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 0.5rem;
}
.cn-more-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-height: 5rem;
    padding: 0.65rem 0.35rem 0.55rem;
    text-decoration: none;
    color: inherit;
    text-align: center;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    font: inherit;
    transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}
.cn-more-tile:hover {
    border-color: rgba(246, 139, 30, 0.35);
    box-shadow: 0 2px 10px rgba(246, 139, 30, 0.1);
}
.cn-more-tile:focus-visible {
    outline: 2px solid var(--unimart-orange, #f68b1e);
    outline-offset: 2px;
}
.cn-more-tile__icon {
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.1rem;
}
.cn-more-tile__icon--blue { background: rgba(44, 62, 80, 0.1); color: #2c3e50; }
.cn-more-tile__icon--purple { background: rgba(246, 139, 30, 0.12); color: #c2410c; }
.cn-more-tile__icon--teal { background: rgba(15, 118, 110, 0.1); color: #0f766e; }
.cn-more-tile__icon--indigo { background: rgba(44, 62, 80, 0.1); color: #334155; }
.cn-more-tile__icon--cyan { background: rgba(8, 145, 178, 0.1); color: #0e7490; }
.cn-more-tile__icon--amber { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.cn-more-tile__icon--green { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.cn-more-tile__icon--orange { background: rgba(246, 139, 30, 0.14); color: #e96703; }
.cn-more-tile__icon--slate { background: rgba(44, 62, 80, 0.1); color: #2c3e50; }
.cn-more-tile__label {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--um-navy, #2c3e50);
    line-height: 1.25;
}
.cn-more-tile__sub {
    font-size: 0.62rem;
    color: var(--um-gray-600, #6b7280);
    line-height: 1.25;
    max-width: 6.75rem;
}

.home-intel__persona {
    margin-bottom: 1rem;
}
.home-intel__persona-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid var(--um-gray-200, #e8e8e8);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 0.5rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.home-intel__persona-card:hover {
    border-color: var(--unimart-orange, #f68b1e);
    box-shadow: 0 2px 8px rgba(246, 139, 30, 0.12);
}
.home-intel__persona-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: rgba(246, 139, 30, 0.12);
    color: var(--unimart-orange, #f68b1e);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.home-intel__persona-body {
    flex: 1;
    min-width: 0;
}
.home-intel__persona-title {
    display: block;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--um-navy, #2c3e50);
}
.home-intel__persona-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--um-gray-600, #6b7280);
    margin-top: 0.1rem;
}
.home-intel__persona-action {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--unimart-orange, #f68b1e);
    white-space: nowrap;
}

@media (max-width: 380px) {
    .unimart-nav--confidence .unimart-nav__item span {
        font-size: 0.52rem;
    }
    .cn-more-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem 0.35rem;
    }
}

@media (min-width: 768px) {
    .unimart-nav--confidence .unimart-nav__inner--six,
    .unimart-nav--confidence .unimart-nav__inner--seven,
    .unimart-nav--confidence .unimart-nav__inner--5,
    .unimart-nav--confidence .unimart-nav__inner--6,
    .unimart-nav--confidence .unimart-nav__inner--7 {
        max-width: 42rem;
    }
    .unimart-nav--confidence .unimart-nav__item span {
        font-size: 0.58rem;
    }
}

@media (min-width: 1024px) {
    .unimart-nav--confidence .unimart-nav__inner--six,
    .unimart-nav--confidence .unimart-nav__inner--seven,
    .unimart-nav--confidence .unimart-nav__inner--5,
    .unimart-nav--confidence .unimart-nav__inner--6,
    .unimart-nav--confidence .unimart-nav__inner--7 {
        max-width: 48rem;
    }
}

/* ── Soft nav transitions ────────────────────────────────────────── */
.content-wrapper {
    will-change: opacity;
}
.content-wrapper[data-soft-loading] {
    opacity: 0.45 !important;
    transition: opacity 0.08s ease !important;
}
@media (prefers-reduced-motion: reduce) {
    .content-wrapper,
    .content-wrapper[data-soft-loading] {
        transition: none !important;
    }
}
