/* static/css/mailsms/send_history_modal.css */
.send-history-modal[hidden] {
    display: none;
}

.send-history-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.send-history-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.send-history-modal__dialog {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(56rem, calc(100vw - 2rem));
    background: #ffffff;
    border: 0.0625rem solid #dbe3f0;
    border-radius: 1rem;
    box-shadow: 0 1.5rem 3.5rem rgba(15, 23, 42, 0.2);
    overflow: hidden;
}

.send-history-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem 0.75rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
    border-bottom: 0.0625rem solid #dbe3f0;
}

.send-history-modal__drag-handle {
    cursor: move;
    user-select: none;
}

.send-history-modal__header-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.send-history-modal__title {
    margin: 0;
    color: #1f2a44;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.send-history-modal__header-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 0 0 auto;
}

.send-history-modal__body {
    padding: 1rem;
    background: #ffffff;
}

.send-history-modal__table-wrap {
    max-height: 14rem;
    overflow-y: auto;
    border: 0.0625rem solid #dbe3f0;
    border-radius: 0.75rem;
}

.send-history-modal__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
}

.send-history-modal__table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f6fb;
}

.send-history-modal__table th,
.send-history-modal__table td {
    padding: 0.75rem;
    border-bottom: 0.0625rem solid #e5e7eb;
    text-align: left;
    font-size: 0.9375rem;
    line-height: 1.5;
    word-break: break-word;
}

.send-history-modal__table th:nth-child(1),
.send-history-modal__table td:nth-child(1) {
    width: 42%;
}

.send-history-modal__table th:nth-child(2),
.send-history-modal__table td:nth-child(2) {
    width: 33%;
}

.send-history-modal__table th:nth-child(3),
.send-history-modal__table td:nth-child(3) {
    width: 25%;
}

.send-history-modal__close {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.75rem;
    background: #e5e7eb;
    color: #111111;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
}

.send-history-modal__close:hover {
    background: #dbe3ea;
}

.send-history-modal__close:focus {
    outline: none;
    box-shadow: 0 0 0 0.1875rem rgba(47, 106, 230, 0.18);
}

.send-history-modal__primary-button,
.send-history-modal__secondary-button {
    min-width: 7rem;
    min-height: 2.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    border: 0.0625rem solid #d6deeb;
}

.send-history-modal__primary-button {
    background: #2563eb;
    color: #ffffff;
}

.send-history-modal__secondary-button {
    background: #ffffff;
    color: #1f2937;
}

.send-history-modal__primary-button[disabled],
.send-history-modal__secondary-button[disabled] {
    opacity: 0.65;
    cursor: default;
}

@media (max-width: 40rem) {
    .send-history-modal__dialog {
        top: 0.5rem;
        left: 0.5rem;
        width: calc(100vw - 1rem);
        transform: none;
        border-radius: 0.875rem;
    }

    .send-history-modal__header {
        padding: 0.75rem;
    }

    .send-history-modal__body {
        padding: 0.75rem;
    }

    .send-history-modal__drag-handle {
        cursor: default;
    }
}