/* Custom styles goes here */

.cursor-pointer {
    cursor: pointer;
}

.min-width-0 {
    min-width: 0;
}

.page-context-card .card-body {
    padding: 1.25rem 1.5rem;
}

.page-context-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.page-context-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .375rem;
    flex: 0 0 auto;
}

.page-context-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    color: var(--bs-secondary-color);
    font-size: .8125rem;
}

.page-context-meta span,
.page-context-address {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.page-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.summary-tile {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-paper-bg);
    height: 100%;
}

.summary-tile .summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .375rem;
}

.module-tile {
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-paper-bg);
    height: 100%;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.module-tile:hover {
    border-color: color-mix(in sRGB, var(--bs-primary) 35%, var(--bs-border-color));
    box-shadow: 0 .125rem .5rem rgba(var(--bs-black-rgb), .05);
}

.module-tile-warning {
    border-color: rgba(var(--bs-warning-rgb), .55);
}

.module-tile-danger {
    border-color: rgba(var(--bs-danger-rgb), .55);
}

.module-tile .module-tile-title {
    min-width: 0;
}

.module-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.lead-action-cell {
    min-width: 13rem;
}

.lead-field-status-cell {
    min-width: 8.5rem;
}

.lead-process-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: .125rem;
    white-space: nowrap;
}

.crm-lead-status-select {
    width: 6.5rem !important;
    min-width: 6.5rem;
}

.crm-lead-site-status-select {
    width: 8.25rem !important;
    min-width: 8.25rem;
}

.timesheet-entry-row {
    border: 1px solid transparent;
    border-radius: .375rem;
    padding: .375rem .5rem;
    margin-inline: -.5rem;
}

.timesheet-entry-row:hover {
    border-color: var(--bs-border-color);
    background-color: color-mix(in sRGB, var(--bs-primary) 5%, transparent);
}

.standby-assignment-badge {
    max-width: 100%;
    white-space: normal;
    text-align: left;
}

.offcanvas-action-bar {
    position: sticky;
    bottom: 0;
    z-index: 2;
}

.lead-editor-offcanvas {
    --bs-offcanvas-width: min(980px, 100vw);
}

.lead-editor-offcanvas .offcanvas-body {
    overflow: hidden;
}

.lead-editor-shell {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr);
    height: 100%;
    min-height: 0;
}

.lead-editor-nav {
    border-right: 1px solid var(--bs-border-color);
    background: var(--bs-paper-bg);
    padding: 1.25rem 1rem;
    overflow-y: auto;
}

.lead-editor-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .625rem;
    color: var(--bs-body-color);
    border-radius: .375rem;
    padding: .625rem .75rem;
    min-height: 2.5rem;
}

.lead-editor-nav .nav-link:hover,
.lead-editor-nav .nav-link.active {
    color: var(--bs-primary);
    background: color-mix(in sRGB, var(--bs-primary) 10%, transparent);
}

.lead-editor-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
}

.lead-editor-content {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.lead-editor-section {
    scroll-margin-top: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.lead-editor-section.is-hidden {
    display: none;
}

.lead-editor-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.lead-editor-section-header h6 {
    font-size: .95rem;
}

.lead-editor-error-summary {
    position: sticky;
    top: 0;
    z-index: 4;
}

.lead-editor-section .dropzone .dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    margin: 0;
    text-align: center;
}

.lead-editor-section .dropzone .dz-message .icon-base {
    position: static;
    margin-inline: auto;
}

.wizard-icons .bs-stepper-header .step-trigger {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.wizard-icons .bs-stepper-header .bs-stepper-label {
    margin-top: .75rem;
    margin-inline: 0;
    text-align: center;
}

.wizard-icons .bs-stepper-header .bs-stepper-title,
.wizard-icons .bs-stepper-header .bs-stepper-subtitle {
    display: block;
    text-align: center;
}

.dispatch-fallback-list {
    display: grid;
    gap: .5rem;
}

.dispatch-fallback-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-paper-bg);
    padding: .75rem 1rem;
    text-align: left;
}

.dispatch-fallback-dot {
    width: .75rem;
    height: .75rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

@media (min-width: 768px) {
    .w-md-auto {
        width: auto !important;
    }
}

@media (max-width: 575.98px) {
    .page-context-card .card-body {
        padding: 1rem;
    }

    .page-action-group,
    .page-action-group > .btn,
    .page-action-group > a,
    .module-action-row > .btn:not(.btn-icon),
    .module-action-row > a:not(.btn-icon) {
        width: 100%;
    }

    .offcanvas-action-bar > .btn,
    .offcanvas-action-bar > .dropdown {
        flex: 1 1 auto;
    }

    .offcanvas-action-bar .dropdown > .btn {
        width: 100%;
    }

    .lead-editor-offcanvas .offcanvas-body {
        overflow: auto;
    }

    .lead-editor-shell {
        display: block;
        height: auto;
    }

    .lead-editor-nav {
        position: sticky;
        top: 0;
        z-index: 3;
        border-right: 0;
        border-bottom: 1px solid var(--bs-border-color);
        padding: .75rem 1rem;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .lead-editor-nav .nav {
        flex-direction: row !important;
        flex-wrap: nowrap;
    }

    .lead-editor-nav .nav-link {
        white-space: nowrap;
    }

    .lead-editor-main {
        overflow: visible;
    }

    .lead-editor-content {
        padding: 1rem;
    }

    .lead-editor-section {
        padding-bottom: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

.text-truncate-200 {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-300 {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
