#integrations_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

#integrations_grid.wait:before {
    content: '';
    display: block;
    height: 100px;
    background-image: url('/img/loader.svg');
    background-position: center;
    background-repeat: no-repeat;
    grid-column: 1/-1;
}

.integration_card {
    background-color: white;
    border-radius: 10px;
    border: 1px solid var(--grey_border);
}

.integration_card.wait {
    opacity: 0.7;
    position: relative;
}

.integration_card.wait::after {
    content: '';
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    background-image: url('/img/loader.svg');
    background-size: 100%;
    background-repeat: no-repeat;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.integration_card.empty {
    grid-column: 1/-1;
    height: 100px;
    color: var(--font_light);
    font-size: larger;
    display: grid;
    place-content: center;
}

.integration_card > * {
    padding: 16px;
}

.integration_card > *:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.integration_card > *:last-child {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.integration_card_logo {
    display: inline-flex;
    width: 48px;
    aspect-ratio: 1;
    border-radius: 50%;
    vertical-align: middle;
    border: 1px solid var(--grey_border);
}

.integration_card_logo img {
    margin: auto;
    width: 70%;
    height: 70%;
}

.integration_card_title {
    font-size: 18px;
    font-weight: 600;
    margin-left: 8px;
}

.integration_card_help_link {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.integration_card_help_link[href=""] {
    display: none;
}

.integration_card_body {
    position: relative;
}

.integration_card_footer {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 6px;
    background-color: var(--grey_border_light);
    text-align: right;
    border-top: 1px solid var(--grey_border);
}

.integration_card_footer .btn {
    height: 32px;
    line-height: 32px;
    box-sizing: border-box;
}

/* INTEGRATION DETAIL */

.integration_panel_title {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.integration_panel_title img {
    width: 35px;
    aspect-ratio: 1;
}

.integration_panel_form {
    margin-top: 1.5rem;
    gap: 0;
}

.integration_panel_form .form_control {
    min-height: 50px;
    padding: 0.5rem 1rem;
}

.integration_panel_form .form_control:hover {
    background-color: var(--blue_light);
    border-radius: 0.5rem;
}

.integration_panel_form .form_control + .form_control {
    border-top: 1px solid var(--grey_border_light);
}

.integration_panel_form .form_control label {
    font-size: 14px;
    flex-basis: 40em;
    font-weight: 600;
    color: var(--font_light);
}

.integration_panel_form .form_control.--row {
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
}

.integration_panel_footer {
    margin-inline: -50px;
    position: sticky;
    bottom: -50px;
    padding: 20px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    margin-bottom: -50px;
}

[data-panel="integration"] {
    box-sizing: border-box;
}

[data-panel="integration"] #panel_content {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}


[data-panel="integration"] .integration_panel_form {
    flex-grow: 1;
}


/* Call Types Modal Styling */


.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--blue);
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
}

.btn-link:hover {
    text-decoration: none;
}


.call_types_modal {
    max-width: 450px;
    max-height: 350px;
    overflow-y: auto;
    padding: 15px;
    margin: 0 auto;
}


.call_types_modal::-webkit-scrollbar {
    width: 5px;
}

.call_types_modal::-webkit-scrollbar-track {
    background: transparent;
}

.call_types_modal::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.call_types_container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 15px 0;
    overflow-y: auto;
}

.call_types_section {
    background-color: var(--blue_light);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9em;
}

.call_types_section h3 {
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--font_dark);
    border-bottom: 1px solid var(--grey_border);
    padding-bottom: 4px;
}

.call_types_modal .form_control.--row {
    justify-content: space-between;
    padding: 6px 0;
}

.call_types_modal .form_control.--row label {
    flex-grow: 1;
    font-size: 13px;
}

.call_types_modal .switch {
    transform: scale(0.9);
    transform-origin: right center;
}


.call_types_modal .form_control.--row .switch {
    margin-left: auto;
}

.modal_actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--grey_border_light);
    height: 40px;
}

.right_buttons {
    display: flex;
    gap: 10px;
}

.modal_content h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.modal_content p {
    color: var(--font_light);
    margin-bottom: 15px;
    font-size: 13px;
}

.channels_table {
    border: 1px solid var(--grey_border);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.channels_header {
    display: flex;
    background-color: var(--grey_border_light);
    font-weight: 600;
    border-bottom: 1px solid var(--grey_border);
}

.channels_body {
  overflow-y: auto;
  flex-grow: 1;
  height: 320px;
}

.channels_body::-webkit-scrollbar {
    width: 6px;
}

.channels_body::-webkit-scrollbar-track {
    background: transparent;
}

.channels_body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.channel_row {
    display: flex;
    border-bottom: 1px solid var(--grey_border_light);
}

.channel_row:last-child {
    border-bottom: none;
}

.channel_col {
    flex: 1;
    padding: 12px;
    display: flex;
    align-items: center;
}

.channel_col_actions {
    min-width: 32px;
    padding: 12px;
    padding-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel_col .select,
.channel_col .input {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--font_light);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--grey_border);
    color: var(--font_dark);
}

.phone-number-display {
    display: flex;
    align-items: center;
}

.phone-label {
    font-weight: normal;
    padding: 8px 12px;
}

.channels_header .channel_col {
    flex: 1;
    padding: 8px 12px;
}

.multi-select-container {
    position: relative;
    width: 100%;
}

.multi-select-selected {
    border: 1px solid var(--grey_border);
    border-radius: 4px;
    padding: 8px 12px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    min-height: 38px;
}

.multi-select-placeholder {
    color: var(--font_light);
    display: block;
}

.multi-select-values {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.multi-select-arrow {
    margin-left: auto;
    font-size: 10px;
    color: var(--font_light);
    transition: transform 0.2s ease;
}

.multi-select-container.open .multi-select-arrow {
    transform: rotate(180deg);
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid var(--grey_border);
    border-radius: 4px;
    margin-top: 4px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.multi-select-container.open .multi-select-dropdown {
    display: block;
}

.multi-select-option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    align-items: center;
}

.multi-select-option:hover {
    background-color: var(--blue_light);
}

.event-tag {
    background-color: var(--blue_light);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
    margin-bottom: 2px;
}

.event-tag-remove {
    margin-left: 4px;
    cursor: pointer;
    font-size: 10px;
}

.said-label {
    display: flex;
    align-items: center;
    justify-content: start;
    margin: 0;
}

.event-checkbox {
    width: 20px !important;
    margin: 0 !important;
}

.popup_integration_help_link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    vertical-align: middle;
}

.popup_integration_help_link:not(:hover) img {
    filter: grayscale(1);
    opacity: 0.6;
}

.popup_integration_help_link:hover {
    color: var(--blue)!important;
}
