/**
 * Companies module -- styles genuinely scoped to this module only
 * (extracted from root styles.css per ADR 0023; classes/ids renamed from
 * their old kv2-/#kv2 prefix to companies-/#companies to match). Anything
 * shared with companies_old (the .reject-dialog* family) lives in
 * frontend/shared/styles/reject-dialog.css instead -- not duplicated here.
 */

/* Master Data, Sæsonpræferencer (2026-08-27) -- stacked vertically, not
   the wrapped-row layout .segment-chips-group uses elsewhere (product
   tags etc. in the old lead modal) -- scoped to this one id so those
   other chip groups are untouched. Each item is its own chip+deadline
   column (companies-tab-master-data.js), so stacking those columns puts
   each season on its own row with its deadline text directly underneath. */
#companiesSeasonChips {
    flex-direction: column;
    align-items: flex-start;
}

/* Summary tab's copy of the same chips (companies-tab-summary.js) has no
   click handler -- .segment-chip's own cursor: pointer and :hover
   color/border change otherwise both imply it's pressable there too, so
   override both just for this read-only instance (not-active :hover
   falls back to exactly its own resting state, so hovering has no
   visible effect). */
#companiesSeasonChips.companies-readonly .segment-chip {
    cursor: default;
}

#companiesSeasonChips.companies-readonly .segment-chip:not(.active):hover {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* Master Data -- missing_payment warning (2026-08-28). Deliberately its
   own class rather than reusing .prospect-banner: same layout shape, but
   danger tokens instead of primary, and bold/larger text since this is
   meant to be impossible to miss, unlike the informational prospect
   banner. */
.companies-missing-payment-warning {
    background: var(--danger-light);
    border: 1px solid var(--danger-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--danger-color);
    font-weight: 700;
    font-size: 0.95rem;
}

.companies-missing-payment-warning-icon {
    font-size: 1.25rem;
}

/* SAP/Shopify link-status badges that are actually clickable (Master
   Data's company-level ones, and the Contacts table's per-row ones) need
   to look different from the same badge used read-only elsewhere (e.g.
   Summary tab), or there's no visual hint they're pressable. Hover
   highlight + a link icon that brightens on hover, rather than a
   permanently-loud treatment that would clutter a table full of these
   badges. */
.companies-link-badge-btn {
    background: none;
    border: none;
    padding: 2px 6px 2px 2px;
    margin: -2px -6px -2px -2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 20px;
    transition: background-color 0.15s ease;
}

.companies-link-badge-btn:hover {
    background: var(--bg-secondary);
}

.companies-link-badge-icon {
    font-size: 0.7rem;
    opacity: 0.55;
}

.companies-link-badge-btn:hover .companies-link-badge-icon {
    opacity: 1;
}

/* Company detail header (2026-08-27) -- the lifecycle badge next to the
   company name used the plain .badge size, easy to miss next to an <h2>.
   Combined with a color class (badge-neutral/blue/success/danger per
   stage, see lifecycleBadgeClass in companies-detail-helpers.js) so the
   stage reads at a glance instead of blending into the header text. */
.companies-lifecycle-badge {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.3rem 0.85rem;
    border-radius: 6px;
    vertical-align: middle;
}

/* Companies Overview (Phase 5) -- row action buttons wrap instead of
   forcing the table wider than its column needs. */
.companies-row-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* Company detail page -- Files tab (Phase 6) drag & drop zone. */
.companies-files-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: border-color 0.15s, background 0.15s;
}

.companies-files-dropzone-active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.06);
}

.companies-files-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

.companies-files-breadcrumb-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary-color);
    cursor: pointer;
    font-size: inherit;
}

.companies-files-breadcrumb-link:hover {
    text-decoration: underline;
}

.companies-files-breadcrumb-sep {
    color: var(--text-secondary);
}

.companies-files-breadcrumb-current {
    color: var(--text-secondary);
}

.companies-files-folder-row {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-primary);
    cursor: pointer;
    font-size: inherit;
    text-align: left;
}

.companies-files-folder-row:hover {
    text-decoration: underline;
}

/* The #/companies in-place login gate (2026-08-22) -- shown in place of
   #companies-view whenever there's no valid SimplyCRM-backend session
   yet, separate from the main app's own login. */
.companies-login-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
}

.companies-login-error {
    color: #c0392b;
}
