@charset "UTF-8";

/* App Template */
.topbar {
    padding: 1rem;
    z-index: 1030;
}

.top-left-controls {
    width: calc(220px - 1rem);
}

.top-bar-search-form > .input-group {
    width: 100%;
    max-width: 500px;
}

.app-body {
    min-height: 0; /* Ensures children can shrink if needed */
}

.sidebar {
    width: 220px;
    border-right: 1px solid #dee2e6;
    padding: 1rem 0.75rem;

    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
    overflow-y: auto;
}

#left-menu .nav-link.active {
    background-color: #e9ecef;
    font-weight: bold;
}

#left-menu .nav-subheading {
    margin-top: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
}

.collapse-icon {
    font-size: 1rem;
}

.main-wrapper {
    padding: 1.5rem;
}

.breadcrumb-bar {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
}

#topNotificationMenu > .dropdown-menu {
    min-width: 300px;
}

#notificationDropdown > .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border-radius: 50% !important;
    min-width: 1em;
    min-height: 1em;
    letter-spacing: 0;
    width: auto;
    height: auto;
}

#topNotificationMenu a.unread .title {
    font-weight: 500;
}

/* Logo */
#logoInman {
    font-size: 1rem;
    color: #e5e7eb;
}

/* Spinner buttons */
.btn-submit-spinner:not(.submitted)::after {
    content: attr(data-label);
}
.btn-submit-spinner:not(.submitted) .spinner-item {
    display: none;
}
.btn-submit-spinner.submitted::after {
    content: attr(data-submit-label);
}

/* Generic fixes */
.card > .list-group-flush > .list-group-item {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

tr[data-href] {
    cursor: pointer;
}

.attachment-text-preview a {
    word-break: break-word; /* or 'break-all' if needed */
    white-space: normal;
}

/* Category Color Picker */
.category-color-label input[type="radio"]:checked + .color-circle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #333;
    box-sizing: border-box;
    pointer-events: none;
}

.category-color-label {
    position: relative;
}
.color-circle {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    vertical-align: middle;
    position: relative;
}

/* Sharing Statuses */
.badge-private {
    background-color: #6c757d;
    color: #fff;
    min-width: 60px;
}
.badge-sharedTeam,
.badge-sharedUsers {
    background-color: #adb5bd;
    color: #fff;
    min-width: 60px;
}
.badge-public {
    background-color: #dee2e6;
    color: #212529;
    min-width: 60px;
}

/* Category Colors */
/* Note: Use these colors for category backgrounds, icons, etc. */
.category-green {
    background-color: #198754;
}
.category-cyan {
    background-color: #0dcaf0;
}
.category-purple {
    background-color: #6f42c1;
}
.category-orange {
    background-color: #fd7e14;
}
.category-teal {
    background-color: #20c997;
}
.category-red {
    background-color: #dc3545;
}
.category-indigo {
    background-color: #6610f2;
}
.category-yellow {
    background-color: #ffc107;
}
.category-pink {
    background-color: #d63384;
}
.category-brown {
    background-color: #795548;
}
.category-navy {
    background-color: #001f3f;
}
/* Attachment extensions */
.file-extension {
    min-width: 50px;
    text-align: center;
    background-color: #6c7a91;
    text-transform: uppercase;
    color: #fff;
}
.extension-pdf {
    background-color: #ff0000;
}
.extension-xls {
    background-color: #28a745;
}
.extension-doc {
    background-color: #0078d4;
}
.extension-ppt {
    background-color: #d24726;
}

/* Condition Builder Form */
#filterBuilder > .condition-group {
    position: relative;
}
#filterBuilder > .condition-group + .condition-group {
    margin-top: 2rem;
}
#filterBuilder > .condition-group + .condition-group::before {
    content: "OR";
    display: block;
    text-align: center;
    margin: 1rem 0;
    position: absolute;
    width: 100%;
    top: -2.5rem;
    font-size: 0.75rem;
    color: #6c7a91;
}

/* General */
@view-transition {
    navigation: auto;
}

/* Alerts */
body > .alert {
    position: fixed;
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1055; /* higher than the header */
    width: auto;
    min-width: 30%;
    max-width: 90%; /* prevent overflow on small screens */
    pointer-events: auto;
    background-color: #fff;
}

body > .alert.alert-danger {
    background-color: #d63939;
    color: #fff;
}

/* Widget Editor */
#widgetEditorModal .modal-body {
    background-color: var(--tblr-body-bg);
}

.widget-item {
    cursor: move;
}
.widget-item.dragging {
    opacity: 0.6;
}
.widget-edit-btn,
.widget-delete-btn {
    -webkit-user-drag: none;
    user-drag: none;
}

/* Record lists */
.records-table-container th.sortable-column {
    cursor: pointer;
}
.records-table-container th.sortable-column::after {
    content: "⇅";
    font-size: 0.75rem;
    margin-left: 0.25rem;
    color: #6c7a91;
    opacity: 0.6;
}

.records-table-container th.sortable-column.sort-asc::after {
    content: "↑";
    opacity: 1;
}
.records-table-container th.sortable-column.sort-desc::after {
    content: "↓";
    opacity: 1;
}

.records-table-container .col-source {
    width: 200px;
}
.records-table-container .col-from {
    width: 250px;
}
.records-table-container .col-subject {
    min-width: 100px;
}
.records-table-container .col-attachment {
    width: 40px;
}
.records-table-container .col-sent-date,
.records-table-container .col-source-record-date {
    width: 120px;
}
.records-table-container .col-categories {
    width: 110px;
}
.records-table-container .col-scores {
    width: 110px;
}
.records-table-container .col-flags {
    width: 110px;
}
.records-table-container .col-threads {
    width: 60px;
}
.records-table-container .col-preview {
    width: 40px;
}
.records-table-container .col-filename {
    min-width: 150px;
}
.records-table-container .col-attachment-type {
    width: 80px;
}
.records-table-container .col-size {
    width: 80px;
}
.records-table-container .col-email-link,
.records-table-container .col-source-link {
    width: 70px;
}
.records-table-container .col-created {
    width: 120px;
}
.records-table-container .col-organization {
    width: 200px;
}
.records-table-container .col-name {
    width: 250px;
}
.records-table-container .col-email {
    min-width: 150px;
}
.records-table-container .col-start-date {
    width: 230px;
}
.records-table-container .col-location {
    width: 200px;
}
.records-table-container .col-duration {
    width: 100px;
}
.records-table-container .col-summary {
    min-width: 100px;
}

/* Automations */
#automationForm #shared-record-types {
    visibility: hidden;
    height: 0px;
}

/* Home / Overview */
.next-steps > .list-group-item > span:first-child {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
}

.next-steps .solo-suggestion {
    font-size: 1rem;
}

/* Each (box+arrow) flexes equally, wrapping as needed */
.steps .step {
    flex: 1 1 14rem; /* grow/shrink equally, with an optional min width */
    gap: 0.25rem; /* small gap between box and arrow */
}

/* Boxes stretch to match tallest neighbour in the row */
.steps .step-box {
    display: flex; /* center content inside */
    flex: 1 1 auto; /* fill the height */
}

/* Arrow stays minimal */
.steps .step-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    width: 1ch; /* narrow arrow column */
    text-align: center;
    color: #6c7a91;
}

.dataflow-card .badge-count {
    min-width: 25px;
}

/* Notifications page */
.badge.severity {
    min-width: 60px;
}

/* Responsive adjustments */

@media (max-width: 991.98px) {
    .sidebar {
        display: none !important;
    }

    .records-table-container .col-subject,
    .records-table-container .col-filename,
    .records-table-container .col-email {
        width: 200px;
    }

    #topNotificationMenu > .dropdown-menu {
        max-width: 300px;
    }

    #topNotificationMenu a.dropdown-item .title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
