@use "flags";
@use "theme_settings";

.sticky-nav .nav-link {
  color: var(--tblr-body-color) !important;
} /* Override to fix top nav bar text colour in dark mode. Can be removed if tabler fix issue */

body {
    font-family: Verdana, sans-serif;
}

.modal-dialog {
    margin-right: auto;
    margin-left: auto;
}

.page {
    min-height: calc(100vh - 2px);
}

.ck.ck-content:not(.ck-comment__input *) {
    min-height: 300px;
    overflow-y: auto;
}

.ts-input {
    color: inherit;
}

.ts-wrapper {
    .ts-control {
        width: 100%;
        color: inherit;
        &.locale {
            width: 205px;
        }
        .dropdown-menu {
            width: 100%;
            height: auto;
        }
    }

    .ts-dropdown {
        .active {
            background-color: rgba(var(--tblr-muted-rgb), .06);
            color: inherit;
        }

        .selected {
            background-color: rgba(var(--tblr-muted-rgb), .1);
        }
    }
}

.ts-wrapper.autocomplete-selector-wrapper {
    min-height: 40px !important;
    height: 40px;
    align-items: stretch;

    .ts-control,
    &.single.input-active .ts-control {
        min-height: 38px !important;
        line-height: 20px;
        align-items: center;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }
}

.canned_ticket_response {
    width: 18rem;
}

.navbar-brand-image {
    height: 1.6rem
}

.ts-dropdown.locale-selector-dropdown {
    background-color: var(--tblr-bg-surface);
    border: var(--tblr-border-width) var(--tblr-border-style) var(--tblr-border-color);
    border-radius: 0 0 var(--tblr-border-radius) var(--tblr-border-radius);
    box-shadow: var(--tblr-box-shadow);
    z-index: 1080;
    border-top: 1px solid var(--tblr-border-color);
}

.ts-dropdown.locale-selector-dropdown .dropdown-item {
    background-color: transparent;
    color: var(--tblr-body-color);
    padding: 0.5rem 1rem;
}

.ts-dropdown-content {
    background-color: var(--tblr-bg-forms);
}

.ts-dropdown.locale-selector-dropdown .dropdown-item:hover,
.ts-dropdown.locale-selector-dropdown .dropdown-item.active,
.ts-dropdown.locale-selector-dropdown .dropdown-item.selected {
    background-color: rgba(var(--tblr-primary-rgb), .1);
    color: var(--tblr-primary);
}

.navbar-nav .nav-item {
    overflow: visible;
}

.navbar-nav {
    overflow: visible;
}

.header {
    overflow: visible;
}

.ts-wrapper.js-locale-selector.focus .ts-control.locale {
    border-color: var(--tblr-border-color) !important;
    box-shadow: none !important;
    outline: none !important;
}

.ts-wrapper.js-locale-selector .ts-control.locale {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    white-space: nowrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    line-height: 1.5;
    min-height: auto;
}

.ts-wrapper.js-locale-selector {
    min-width: 260px;
}

@media (max-width: 768px) {
    .ts-wrapper.js-locale-selector {
        min-width: 200px;
        width: auto;
    }
}

@media (max-width: 320px) {
    .js-theme-toggler {
        display: none;
    }
}

#script-code, #html-code, #html-code2 {
    resize: none;
}

[data-bs-theme=dark]
{
  .toast {
    background: var(--tblr-bg-surface);
    border: var(--tblr-border-width) var(--tblr-border-style) var(--tblr-secondary);
    }
  .toast-header {
    color: var(--tblr-secondary);
   }
}

.toast {
    position: relative;
  }

.search-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input-group > .input-group-text {
    color: var(--tblr-secondary);
}

.search-input-group > .form-control {
    min-width: 16rem;
}

.search-filter-toggle,
.search-submit-toggle {
    appearance: none;
    -webkit-appearance: none;
    min-width: 0;
    min-height: 0;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -0.375rem -0.75rem;
    color: inherit;
    border-radius: 0.25rem;

    &:focus,
    &:focus-visible,
    &:active {
        box-shadow: none;
        outline: 0;
    }
}

.new-client-modal-dialog {
    max-width: min(720px, calc(100vw - 1.5rem));
}

.fb-modal-form > .modal-body > .fb-modal-section + .fb-modal-section {
    margin-top: 1.75rem;
}

.fb-modal-section {
    padding: 0.25rem 0 0;
}

.fb-modal-section-header {
    margin-bottom: 1rem;
}

.fb-modal-section-header-collapsible {
    display: block;
}

.fb-modal-section-heading-row {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.fb-modal-section-title {
    margin: 0;
}

.fb-modal-section-description {
    margin-top: 0.25rem;
    color: var(--tblr-secondary);
    font-size: 0.875rem;
}

.fb-modal-section-toggle {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--tblr-secondary);
    box-shadow: none;
    line-height: 1;

    &:hover,
    &:focus,
    &:focus-visible,
    &:active {
        background: transparent;
        color: var(--tblr-body-color);
        box-shadow: none;
        outline: 0;
    }

    .icon {
        width: 0.9rem;
        height: 0.9rem;
        transition: transform 0.2s ease;
    }

    &[aria-expanded="true"] .icon {
        transform: rotate(180deg);
    }
}

.fb-modal-subsection-body {
    padding: 0 0 0.85rem;
}

.fb-phone-country-code {
    width: 5.5rem;
    flex: 0 0 5.5rem;
    max-width: 5.5rem;
}

@media (min-width: 992px) {
    .new-client-modal-dialog {
        max-width: min(820px, calc(100vw - 2rem));
    }
}

.activity-log-filters .form-label {
    margin-bottom: 0.5rem;
}

.activity-log-table .activity-message-cell {
    white-space: normal;
    overflow-wrap: anywhere;
}

#back-to-top {
    left: auto;
    right: 1.5rem;
    bottom: 2rem;
    z-index: 1030;
}

.back-to-top-hidden {
    display: none !important;
}

.back-to-top-visible {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

.dashboard-stat-link {
    color: var(--tblr-body-color);
    font-weight: 500;
    text-decoration: none;

    &:hover,
    &:focus {
        color: var(--tblr-primary);
        text-decoration: none;
    }
}

@media (min-width: 992px) {
    .activity-log-filters .form-label {
        margin-bottom: 0;
    }
}
