﻿
/* Keep sidebar from creating horizontal scroll on small screens */
#productSidebar {
    max-width: 100%;
}

/* Desktop sticky sidebar (only on lg+) */
@@media (min-width: 992px) {
    #productSidebar {
        position: sticky;
        top: calc(var(--nav-h, 64px));
        align-self: start;
        height: calc(100vh - var(--nav-h, 64px));
        overflow: auto;
        border-right: 1px solid #e5e7eb;
    }
}

/* Mobile: sidebar becomes normal flow */
@@media (max-width: 991.98px) {
    #productSidebar {
        position: static !important;
        height: auto !important;
        overflow: visible !important;
        border-right: none !important;
    }
}

/* Defensive: avoid weird min-width forcing on nested controls */
.progress, .small, .form-text, .card, .alert, .btn {
    min-width: 0;
    max-width: 100%;
}
.ring-error {
    box-shadow: 0 0 0 .25rem rgba(220,53,69,.25);
    transition: box-shadow .2s;
}

.qb-connect-btn {
    height: 44px; /* Intuit-compliant */
    width: auto;
    display: block;
}

.qb-connect-wrap {
    line-height: 0;
    text-decoration: none;
}

    .qb-connect-wrap:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: 4px;
        border-radius: 6px;
    }

.qbo-company {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- NEW: QuickBooks connection row polish --- */
.qb-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .65rem .75rem;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: .5rem;
    background: rgba(0,0,0,.02);
}

.qb-status-left {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 0; /* allows truncation */
    flex: 1 1 auto;
}

.qb-status-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

/* Ensure Disconnect never becomes full-width unless we want it to */
.qb-disconnect-btn {
    width: auto !important;
    white-space: nowrap;
}

/* Nice mobile stacking */
@@media (max-width: 575.98px) {
    .qb-statusbar {
        align-items: stretch;
    }

    .qb-status-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Optional "landed here" pulse when returning from QBO */
@@keyframes qbPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(25,135,84,.35);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(25,135,84,0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25,135,84,0);
    }
}

.qb-pulse {
    animation: qbPulse 1.25s ease-out 1;
}


.pp-guidance-card {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

.pp-guidance-title {
    font-size: 1.35rem;
    line-height: 1.2;
    margin: 0 0 .35rem 0;
    font-weight: 700;
}

.pp-guidance-sub {
    color: rgba(0,0,0,.62);
    margin: 0;
}

.pp-steps {
    margin: .25rem 0 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: .6rem 1rem;
    grid-template-columns: 1fr;
}

@@media (min-width: 768px) {
    .pp-steps {
        grid-template-columns: 1fr 1fr;
    }
}

.pp-step {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .15rem 0;
}

.pp-step-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,.14);
    color: rgba(0,0,0,.55);
    margin-top: .05rem;
    flex: 0 0 22px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(0,0,0,.02);
}

.pp-step--done .pp-step-icon {
    background: rgba(25,135,84,.12);
    border-color: rgba(25,135,84,.35);
    color: #198754;
}

.pp-step-title {
    font-weight: 700;
    margin: 0;
    font-size: .98rem;
}

.pp-step-desc {
    margin: .05rem 0 0 0;
    color: rgba(0,0,0,.55);
    font-size: .93rem;
}

.lp-emphasis {
    border: 1px solid rgba(0,0,0,.08) !important;
    border-top: 4px solid #198754 !important;
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.08) !important;
}

.pp-next-step-card {
    border-radius: 14px;
}

.pp-next-step-body {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    padding: 1rem 1.1rem 1.05rem;
}

.pp-next-step-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}

.pp-next-step-kicker {
    color: rgba(0,0,0,.58);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.pp-next-step-badge {
    flex: 0 0 auto;
}

.pp-next-step-title {
    font-size: 1.55rem;
    line-height: 1.08;
    font-weight: 800;
    color: #172033;
    margin: 0;
}

.pp-next-step-desc {
    color: rgba(0,0,0,.63);
    font-size: .96rem;
    line-height: 1.5;
    margin: 0;
}

.pp-next-step-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.pp-next-step-note {
    color: rgba(0,0,0,.58);
    font-size: .9rem;
    line-height: 1.45;
    margin: 0;
}

@@media (max-width: 575.98px) {
    .pp-next-step-body {
        padding: .95rem 1rem 1rem;
    }

    .pp-next-step-title {
        font-size: 1.35rem;
    }
}

/* Compact action cluster for card headers */
.pp-card-actions {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.pp-limit-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.18);
    background: rgba(108,117,125,.10);
    color: rgba(0,0,0,.70);
    font-size: .85rem;
    white-space: nowrap;
}

.pp-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.14);
    color: rgba(0,0,0,.55);
    background: rgba(0,0,0,.02);
    cursor: help;
    line-height: 1;
}
