﻿/* bulk-sms.css - Bulk SMS pages (Send Bulk SMS, batch page, Bulk SMS History). Prefix "bk-". */

/* ***** modal (Bootstrap markup, shown without bootstrap.js) ***** */
.bk-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 1055;
}

.bk-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1rem;
    overflow: auto;
}

    .bk-modal .modal-content {
        width: min(640px, 100%);
        border-top: 3px solid var(--iris-orange);
        box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    }

    .bk-modal.bk-modal-wide .modal-content {
        width: min(1000px, 100%);
    }

/* ***** upload ***** */
.bk-drop {
    border: 2px dashed #c9d1dd;
    border-radius: .5rem;
    padding: 1.5rem;
    text-align: center;
    background: #fafbfd;
    position: relative;
    transition: border-color .15s, background .15s;
}

    .bk-drop:hover, .bk-drop.bk-drop-over {
        border-color: var(--iris-orange);
        background: rgba(var(--iris-peach-rgb), .08);
    }

    .bk-drop input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

.bk-choice {
    border: 1px solid #e3e7ee;
    border-radius: .5rem;
    padding: .75rem 1rem;
    cursor: pointer;
    height: 100%;
}

    .bk-choice.active {
        border-color: var(--iris-orange);
        box-shadow: 0 0 0 .15rem rgba(var(--iris-peach-rgb), .45);
    }

/* ***** preview / sample table ***** */
.bk-sample th, .bk-sample td {
    white-space: nowrap;
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .82rem;
}

.bk-sample .bk-col-muted {
    color: #a3acb9;
}

.bk-sample .bk-col-mobile {
    background: rgba(13, 110, 253, .07);
}

.bk-sample .bk-col-message {
    background: rgba(var(--iris-peach-rgb), .18);
}

.bk-sample .bk-header-row td {
    font-weight: 600;
    font-style: italic;
    color: var(--iris-slate);
}

/* ***** rows table ***** */
.bk-rows td {
    vertical-align: middle;
    font-size: .875rem;
}

.bk-msg {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ***** "Sending & summary" accordion (draft batch page) ***** */
.bk-acc {
    border: 1px solid #e3e7ee;
    border-radius: .5rem;
    background: #fff;
}

.bk-acc-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-width: 0;
    padding: .7rem 1.25rem;
    border: 0;
    border-radius: .5rem;
    background: none;
    text-align: left;
    color: var(--iris-navy);
}

    .bk-acc-head:hover {
        background: #fafbfd;
    }

    .bk-acc-head:focus-visible {
        outline: 2px solid var(--iris-orange);
        outline-offset: -2px;
    }

.bk-acc-title {
    font-weight: 700;
    white-space: nowrap;
}

.bk-acc-sum {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .85rem;
    color: var(--iris-slate);
}

.bk-acc-chev {
    line-height: 1;
}

.bk-acc-body {
    border-top: 1px solid #eef1f6;
    padding: 1rem 1.25rem;
}

    .bk-acc-body .form-label {
        font-weight: 600;
        font-size: .9rem;
        color: var(--iris-navy);
    }

@media (min-width: 992px) {
    .bk-acc-split {
        border-left: 1px solid #eef1f6;
        padding-left: 1.5rem !important;
    }
}

.bk-email-input {
    width: min(300px, 100%);
}

/* counts strip */
.bk-stats {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #e3e7ee;
    border-radius: .5rem;
    background: #fafbfd;
    overflow: hidden;
}

.bk-stat {
    flex: 1 1 0;
    min-width: 96px;
    padding: .4rem .75rem;
    border-right: 1px solid #eef1f6;
}

    .bk-stat:last-child {
        border-right: 0;
    }

    .bk-stat.bk-stat-send {
        background: rgba(var(--iris-peach-rgb), .12);
    }

    .bk-stat:not(.bk-stat-send) + .bk-stat-send {
        border-left: 2px solid rgba(var(--iris-peach-rgb), .8);
    }

.bk-stat-val {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--iris-navy);
}

.bk-stat-label {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    color: var(--iris-slate);
}

.bk-stat-dim .bk-stat-val {
    color: #a3acb9;
}

/* ***** rows table: own scroll area, header row stays visible ***** */
.bk-search {
    width: min(280px, 100%);
}

.bk-rows-scroll {
    max-height: min(65vh, 720px);
}

    .bk-rows-scroll thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        box-shadow: inset 0 -1px 0 #dee2e6;
    }

.bk-rows-panel:focus {
    outline: none;
}

/* Expand: the rows over the whole window (below the row / message dialogs) */
.bk-rows-panel.bk-rows-expanded {
    position: fixed;
    inset: 0;
    z-index: 1045;
    display: flex;
    flex-direction: column;
    padding: 1rem 1.25rem .25rem;
    background: #fff;
}

    .bk-rows-expanded .bk-rows-scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    .bk-rows-expanded .bk-msg {
        max-width: min(60vw, 900px);
    }

    .bk-rows-expanded > .mb-3 {
        margin-bottom: .5rem !important;
    }

.bk-row-deleted td {
    text-decoration: line-through;
    color: #8a96a3;
}

    .bk-row-deleted td.bk-actions, .bk-row-deleted td.bk-edited {
        text-decoration: none;
    }

.bk-row-pending > td {
    background: rgba(var(--iris-peach-rgb), .14) !important;
}

.bk-actions {
    white-space: nowrap;
    width: 1%;
}

    .bk-actions .btn {
        padding: .1rem .4rem;
    }

.bk-filter .btn {
    font-size: .8rem;
}

.bk-unsaved {
    background: #fff8ec;
    border: 1px solid #f3d29a;
    border-radius: .5rem;
    padding: .5rem 1rem;
}

.bk-footer {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: #fff;
    border-top: 1px solid #e3e7ee;
    padding: .75rem 0;
}

.bk-strike {
    text-decoration: line-through;
}

.bk-mark {
    background: #ffd6d6;
    color: #b00020;
    border-radius: .15rem;
    padding: 0 .1rem;
}

.bk-progress {
    height: .9rem;
}

/* keep wide tables inside the content area (the sidebar would otherwise shrink) */
@media (min-width: 641px) {
    .bk-page {
        max-width: calc(100vw - 250px);
    }
}

.bk-when {
    white-space: nowrap;
    font-size: .8rem;
}

    .bk-when .bk-by {
        display: block;
        color: var(--bs-secondary-color, #6c757d);
        white-space: normal;
    }

/* status email recipients */
.bk-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .25rem .15rem .6rem;
    border-radius: 1rem;
    background: #eef1f6;
    color: var(--iris-navy);
    font-size: .85rem;
}

    .bk-chip .btn-close {
        width: .5rem;
        height: .5rem;
        background-size: .5rem;
    }
