/**
 * SiteStaffr Calls Page Styles
 *
 * Styles for call log table and call details page only
 *
 * @package    SiteStaffr
 * @subpackage SiteStaffr/assets/css
 * @since      0.5.0
 */

/* ==========================================================================
   CALLS PAGE LAYOUT
   ========================================================================== */

/* max-width and margin now set globally on .wrap in sitestaffr-global.css */

/* ==========================================================================
   CALL LOG TABLE & WIDGET
   ========================================================================== */

.sitestaffr-calls-widget {
    min-height: 200px;
}

.sitestaffr-calls-list {
    padding: 8px;
}

.sitestaffr-call-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
}

.sitestaffr-call-card:hover {
    background: #f6f7f7;
}

.sitestaffr-call-unread {
    background: #f0f6fc;
}

.sitestaffr-call-unread:hover {
    background: #e5f0fa;
}

.sitestaffr-call-avatar {
    width: 40px;
    height: 40px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sitestaffr-call-avatar .dashicons {
    color: #1976d2;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.sitestaffr-call-info {
    flex: 1;
    min-width: 0;
}

.sitestaffr-call-number {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.sitestaffr-call-time {
    display: block;
    font-size: 12px;
    color: #646970;
}

.sitestaffr-call-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sitestaffr-call-duration {
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 12px;
    color: #646970;
    background: #f0f0f1;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Badge and status styles moved to sitestaffr-global.css */
/* Empty state styles moved to sitestaffr-global.css */

/* ==========================================================================
   CALL DETAILS PAGE
   ========================================================================== */

/* Conversation Details page - constrain both grid AND transcript to 1200px */
.sitestaffr-detail {
    max-width: 1200px;
    margin: 12px auto 20px auto;
}

/* Transcript card flows naturally inside .sitestaffr-detail-main */
.sitestaffr-detail-main .sitestaffr-transcript-card {
    margin-top: 24px;
}

/* Hide transcript toggle on desktop — only visible on mobile */
.sitestaffr-transcript-toggle {
    display: none;
}

/* ---- Card base ---- */
.sitestaffr-call-detail .sitestaffr-detail-card {
    border: 1px solid #e8e2d8;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    background: #fff;
    overflow: hidden;
}

.sitestaffr-call-detail .sitestaffr-summary-card {
    background: #FDFBF7;
    border-color: #e8e2d8;
}

.sitestaffr-call-detail .sitestaffr-transcript-card {
    background: #FDFBF7;
}

.sitestaffr-call-detail .sitestaffr-detail-side-card {
    background: #FDFBF7;
}

.sitestaffr-call-detail .sitestaffr-detail-card .inside {
    padding: 20px 24px;
    margin: 0;
    background: #fff;
}

.sitestaffr-call-detail .sitestaffr-summary-card .inside {
    margin: 0;
}

/* ---- Card headers with icons ---- */
.sitestaffr-call-detail .sitestaffr-detail-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 60px;
    padding: 0 18px !important;
    border-bottom: 1px solid #f0ebe0;
    background: #FAF8F4 !important;
}

.sitestaffr-call-detail .sitestaffr-detail-card-header .hndle {
    margin: 0;
    padding: 0;
    color: #1d2327;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
}

.sitestaffr-call-detail .sitestaffr-detail-card-header .hndle .dashicons {
    color: #00838F;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Prevent WordPress postbox drag cursor on static detail headers */
.sitestaffr-call-detail .sitestaffr-detail-card-header,
.sitestaffr-call-detail .sitestaffr-detail-card-header .hndle {
    cursor: default !important;
}

/* ---- Empty states ---- */
.sitestaffr-empty-copy,
.sitestaffr-empty-value {
    color: #646970;
    font-style: italic;
}

/* ---- Summary blocks ---- */
.sitestaffr-summary-block {
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #eef0f2;
}

.sitestaffr-summary-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sitestaffr-summary-block + .sitestaffr-summary-block {
    padding-top: 16px;
}

.sitestaffr-summary-block h3 {
    margin: 0 0 8px;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #00838F;
    text-transform: uppercase;
}

.sitestaffr-summary-block .sitestaffr-summary-body {
    padding: 0;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.65;
}

.sitestaffr-summary-block .sitestaffr-summary-body ul {
    margin: 10px 0 14px 22px;
    padding: 0;
    list-style: disc;
}

.sitestaffr-summary-block .sitestaffr-summary-body li {
    margin: 0 0 6px;
    padding: 0;
}


.sitestaffr-recap-followup {
    margin-top: 14px !important;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}

.sitestaffr-summary-block.is-summary h3 {
    color: #00838F;
}

.sitestaffr-summary-block.is-followup h3 {
    color: #92400e;
}

/* ---- Unified detail page action buttons ---- */
.sitestaffr-detail-action-btn {
    display: inline-block;
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

/* Teal variant (default) — matches Call SID code */
.sitestaffr-detail-action-btn--teal {
    color: #00838F;
    background: #e0f2f1;
    border-color: #b2dfdb;
}

.sitestaffr-detail-action-btn--teal:hover {
    background: #b2dfdb;
    color: #004D40;
    border-color: #80cbc4;
}

/* Danger variant (red) — for Ban IP */
.sitestaffr-detail-action-btn--danger {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fca5a5;
}

.sitestaffr-detail-action-btn--danger:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #f87171;
}

/* ---- Channel pill ---- */
.sitestaffr-channel-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border: 1px solid #b8dce2;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8f8fb 0%, #f2fafc 100%);
    color: #006f80;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- IP action row ---- */
.sitestaffr-ip-action-row {
    margin-top: 8px !important;
}

/* ---- Recording player ---- */
.sitestaffr-recording-player {
    width: 100%;
    margin-top: 8px;
}

.sitestaffr-recording-download {
    width: 100%;
    margin-top: 8px !important;
    text-align: center;
    justify-content: center;
}

.sitestaffr-meta-note {
    margin-top: 8px !important;
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

/* ---- Inline warnings ---- */
.sitestaffr-inline-warning {
    margin: 8px 0 !important;
    padding: 8px 12px !important;
}

.sitestaffr-inline-warning p {
    margin: 0;
}

.sitestaffr-inline-warning p + p {
    margin-top: 8px;
}

.sitestaffr-inline-warning .dashicons {
    color: #f0a50f;
    vertical-align: middle;
    margin-right: 4px;
}

.sitestaffr-inline-warning-sid {
    font-size: 11px;
    color: #646970;
}

.sitestaffr-inline-code {
    font-size: 12px;
}

/* ---- Transcript header meta (Duration badge) ---- */
.sitestaffr-transcript-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    white-space: nowrap;
}

.sitestaffr-transcript-meta-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #646970;
}

.sitestaffr-transcript-meta-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #646970;
}

.sitestaffr-transcript-meta-value {
    font-size: 13px;
    color: #646970;
    font-weight: 600;
}

/* ---- Summary card header meta (Date/Time) ---- */
.sitestaffr-summary-meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    white-space: nowrap;
}

.sitestaffr-summary-meta-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #646970;
}

.sitestaffr-summary-meta-value {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
}

/* Quick Actions */
.sitestaffr-quick-actions-card .sitestaffr-detail-side-content {
    padding: 0;
}

.sitestaffr-quick-action {
    padding: 0;
}

.sitestaffr-action-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border: none;
    border-bottom: 1px solid #eef0f2;
    background: transparent;
    color: #1d2327;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-align: left;
    box-sizing: border-box;
}

.sitestaffr-action-link:last-child,
.sitestaffr-quick-action:last-child .sitestaffr-action-link {
    border-bottom: none;
}

.sitestaffr-action-link:hover {
    background: #f0f8f9;
    color: #00838F;
}

.sitestaffr-action-link .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #646970;
    transition: color 0.15s ease;
}

.sitestaffr-action-link:hover .dashicons {
    color: #00838F;
}

.sitestaffr-action-delete {
    color: #646970;
}

.sitestaffr-action-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.sitestaffr-action-delete:hover .dashicons {
    color: #dc2626;
}

/* Report Issue action */
.sitestaffr-action-report {
    color: #646970;
}

.sitestaffr-action-report:hover {
    background: #E0F7FA;
    color: #00838F;
}

.sitestaffr-action-report:hover .dashicons {
    color: #1FB6CC;
}

/* Report Issue modal form fields */
.sitestaffr-report-issue-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #dc2626;
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 13px;
}

#sitestaffr-report-issue-modal .sitestaffr-form-field {
    margin-bottom: 16px;
}

#sitestaffr-report-issue-modal .sitestaffr-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #1d2327;
}

#sitestaffr-report-issue-modal select,
#sitestaffr-report-issue-modal textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#sitestaffr-report-issue-modal textarea {
    resize: vertical;
    min-height: 72px;
}

/* ---- Transcript items — chat bubble layout ---- */
.sitestaffr-transcript-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.sitestaffr-transcript-item:last-child {
    margin-bottom: 0;
}

/* Chat-ended indicator — small muted line at the end of the transcript */
.sitestaffr-transcript-ended-by {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    font-style: italic;
    color: #646970;
}

/* Speaker avatar circle */
.sitestaffr-transcript-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.sitestaffr-transcript-avatar .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #fff;
}

.sitestaffr-transcript-item.is-visitor .sitestaffr-transcript-avatar {
    background: linear-gradient(135deg, #1fb6cc, #00838F);
}

.sitestaffr-transcript-item.is-ai .sitestaffr-transcript-avatar {
    display: none;
}

/* Message bubble */
.sitestaffr-transcript-bubble {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e6ea;
}

.sitestaffr-transcript-item.is-visitor .sitestaffr-transcript-bubble {
    background: #f0f9fb;
    border-color: #a0d4de;
    border-width: 1.5px;
}

.sitestaffr-transcript-item.is-ai .sitestaffr-transcript-bubble {
    background: #fafafa;
    border-color: #e5e7eb;
}

.sitestaffr-transcript-item-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 4px;
}

.sitestaffr-transcript-speaker {
    color: #1d2327;
    font-size: 13px;
    font-weight: 700;
}

.sitestaffr-transcript-item.is-visitor .sitestaffr-transcript-speaker {
    color: #00838F;
}

.sitestaffr-transcript-item.is-ai .sitestaffr-transcript-speaker {
    color: #6b7280;
}

.sitestaffr-transcript-time,
.sitestaffr-transcript-confidence {
    color: #646970;
    font-size: 12px;
}

.sitestaffr-transcript-item-body {
    color: #1d2327;
    font-size: 14px;
    line-height: 1.6;
}

.sitestaffr-call-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sitestaffr-call-actions {
    display: flex;
    gap: 10px;
}

/* ==========================================================================
   CALL DETAIL PAGE - TWO-COLUMN LAYOUT
   ========================================================================== */

/* Two-column grid layout: 70% main + 30% sidebar */
.sitestaffr-detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    margin-top: 20px;
}

/* Main content area (left, 70%) */
.sitestaffr-detail-main {
    min-width: 0; /* Prevent grid overflow */
}

/* Sidebar (right, 30%) */
.sitestaffr-detail-sidebar {
    min-width: 0; /* Prevent grid overflow */
}

/* ==========================================================================
   BUSINESS INFORMATION CARD - Call Information Sidebar
   ========================================================================== */

/* ---- Sidebar card ---- */
.sitestaffr-detail-side-card {
    background: #fff;
    border: 1px solid #e8e2d8;
    border-radius: 12px !important;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Sidebar header bar — mirrors detail-card-header */
.sitestaffr-detail-side-card .sitestaffr-detail-side-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    height: 60px;
    padding: 0 18px !important;
    background: #FAF8F4 !important;
    border-bottom: 1px solid #f0ebe0;
}

.sitestaffr-detail-side-card .sitestaffr-detail-side-header .dashicons {
    color: #00838F;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.sitestaffr-detail-side-card .sitestaffr-detail-side-header h3 {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    letter-spacing: normal;
    text-transform: none;
}

/* Sidebar body section */
.sitestaffr-detail-side-card .sitestaffr-detail-side-content {
    padding: 8px 16px 12px;
}

/* Field labels */
.sitestaffr-detail-side-card .sitestaffr-info-field label,
.sitestaffr-detail-side-card .sitestaffr-info-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

/* Field values */
.sitestaffr-detail-side-card .sitestaffr-info-field p,
.sitestaffr-detail-side-card .sitestaffr-info-value {
    font-size: 14px;
    font-weight: 400;
    color: #1d2327;
    line-height: 1.5;
    margin: 0;
}

/* Each field as a clean stacked row */
.sitestaffr-detail-side-card .sitestaffr-info-field {
    padding: 12px 0;
    margin: 0;
    border-bottom: 1px solid #eef0f2;
}

.sitestaffr-detail-side-card .sitestaffr-info-field:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

/* Call SID code styling - monospace with copy functionality */
.sitestaffr-call-sid-code {
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #00838F;
    background: #e0f2f1;
    border: 1px solid #b2dfdb;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    user-select: all;
    transition: all 0.2s;
    word-break: break-word;
    line-height: 1.4;
}

.sitestaffr-call-sid-code:hover {
    background: #b2dfdb;
    color: #004D40;
    border-color: #80cbc4;
}

/* ==========================================================================
   TAB NAVIGATION SYSTEM
   ========================================================================== */

/* Tab Navigation Styles */
/* Scoped under the page wrapper — these restyle WP core classes, and this
   stylesheet can load outside plugin screens (the ?call_id enqueue branch),
   so bare .nav-tab rules would leak onto other plugins' tabs. */
.sitestaffr-calls-list-page .nav-tab-wrapper {
    margin: 12px 0 0 0;
    border-bottom: 2px solid var(--sitestaffr-gray-border);
}

/* Tabs + inline search — flex row */
.nav-tab-wrapper.sitestaffr-tabs-with-search {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.sitestaffr-tab-links {
    display: flex;
    align-items: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.sitestaffr-tab-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    padding-bottom: 6px;
}

/* One consistent size for every control in the tab bar — buttons and the search
   input share the same height, padding, and vertical centering. */
.sitestaffr-tab-controls .button,
.sitestaffr-tab-controls input[type="search"] {
    height: 32px !important;
    min-height: 32px !important;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1 !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    margin: 0 !important;
}

/* Inline search form in tab bar */
.sitestaffr-tab-search {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 0;
    flex: 0 0 auto;
}

/* "Open shareable page" — icon + label gap; height/padding come from the shared rule. */
.sitestaffr-tab-controls .sitestaffr-tab-leadlink {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}
.sitestaffr-tab-controls .sitestaffr-view-leads-btn {
    gap: 6px;
}
.sitestaffr-tab-controls .sitestaffr-view-leads-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Empty Trash — red destructive action styling */
.sitestaffr-tab-controls .sitestaffr-tab-empty-trash {
    color: #b32d2e !important;
    border-color: #b32d2e !important;
    text-decoration: none;
}

.sitestaffr-tab-controls .sitestaffr-tab-empty-trash:hover {
    background: #b32d2e !important;
    color: #fff !important;
}

.sitestaffr-tab-search input[type="search"] {
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    transition: border-color 0.2s ease;
    width: 220px;
    max-width: 100%;
}

.sitestaffr-tab-search input[type="search"]:focus {
    border-color: #1FB6CC;
    box-shadow: 0 0 0 1px #1FB6CC;
    outline: none;
}

.sitestaffr-tab-search .button {
    border-radius: 4px;
    background: linear-gradient(135deg, #1FB6CC, #1AA5BA);
    border-color: #1AA5BA;
    color: #fff;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sitestaffr-tab-search .button:hover {
    background: linear-gradient(135deg, #1AA5BA, #1895A8);
    border-color: #1895A8;
    color: #fff;
}

/* View links styled to match the shared underline-tab look
   (.sitestaffr-agent-tabs in sitestaffr-global.css); these stay links —
   server-side list views, not JS tabpanels. */
.sitestaffr-calls-list-page .nav-tab {
    position: relative;
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px -2px 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--sitestaffr-text-soft);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.sitestaffr-calls-list-page .nav-tab:hover,
.sitestaffr-calls-list-page .nav-tab:focus {
    color: var(--sitestaffr-teal-dark);
    background: transparent;
}

.sitestaffr-calls-list-page .nav-tab-active {
    color: var(--sitestaffr-teal-dark);
    border-bottom: 2px solid var(--sitestaffr-teal-dark);
    background: transparent;
}

.sitestaffr-calls-list-page .nav-tab-active:hover,
.sitestaffr-calls-list-page .nav-tab-active:focus {
    color: var(--sitestaffr-teal-dark);
    background: transparent;
    border-bottom: 2px solid var(--sitestaffr-teal-dark);
}

@media (max-width: 1100px) {
    .nav-tab-wrapper.sitestaffr-tabs-with-search {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 8px;
    }

    .sitestaffr-tab-links {
        flex: 1 1 100%;
    }

    .sitestaffr-tab-controls {
        flex: 1 1 100%;
        margin-left: 0;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .sitestaffr-tab-search {
        flex: 1 1 320px;
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 0;
    }

    .sitestaffr-tab-search input[type="search"] {
        width: 100%;
        max-width: 420px;
    }

    .sitestaffr-tab-controls .sitestaffr-tab-ban,
    .sitestaffr-tab-controls .sitestaffr-tab-empty-trash {
        margin-bottom: 0 !important;
    }
}

/* Tab Content */
.sitestaffr-tab-content {
    padding-top: 0;
}

.sitestaffr-tab-content.active {
    display: block;
}

/* Desktop: hide mobile toggle buttons */
.sitestaffr-mobile-toggle {
	display: none;
}

/* ==========================================================================
   MOBILE RESPONSIVE - TWO-COLUMN LAYOUT
   ========================================================================== */

@media (max-width: 960px) {
    .sitestaffr-detail-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* On mobile: main content first (Recap + Transcript), then sidebar */
    .sitestaffr-detail-main {
        order: 0;
    }

    .sitestaffr-detail-sidebar {
        order: 1;
    }

    /* Consistent 16px spacing between all stacked sections */
    .sitestaffr-detail-main .sitestaffr-detail-card,
    .sitestaffr-detail-sidebar .sitestaffr-detail-side-card {
        margin-bottom: 16px;
    }

    .sitestaffr-detail-main .sitestaffr-transcript-card {
        margin-top: 0;
    }

    .sitestaffr-call-detail .sitestaffr-detail-card-header {
        height: auto;
        min-height: 60px;
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .sitestaffr-summary-meta,
    .sitestaffr-transcript-meta {
        width: 100%;
        margin-left: 0;
    }
}

@media screen and (max-width: 782px) {
    .sitestaffr-call-detail .sitestaffr-detail-card-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
    }

    .sitestaffr-call-detail .sitestaffr-detail-card .inside {
        padding: 16px;
        margin: 0;
    }

    .sitestaffr-transcript-meta {
        margin-left: 0;
    }

    .sitestaffr-detail-side-card .sitestaffr-detail-side-content {
        padding: 8px 12px 12px;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 12px;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field {
        grid-column: 1 / -1;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--session-id {
        grid-column: 1 / -1;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--visitor-ip {
        grid-column: 1 / 2;
        align-self: start;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--channel {
        grid-column: 2 / 3;
        align-self: start;
    }

    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--session-id,
    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--visitor-ip,
    .sitestaffr-session-details-card .sitestaffr-detail-side-content .sitestaffr-info-field--channel {
        text-align: center;
    }

    .sitestaffr-detail-side-card .sitestaffr-info-label {
        font-size: 10px;
    }

    .sitestaffr-detail-side-card .sitestaffr-info-value {
        font-size: 13px;
    }

    .sitestaffr-transcript-avatar {
        width: 28px;
        height: 28px;
    }

    .sitestaffr-transcript-avatar .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

    .sitestaffr-transcript-bubble {
        padding: 10px 12px;
    }

    /* ── Mobile Accordion: Transcript + Session Details ── */

    /* Override the column direction for transcript header — keep it row-based
       so title + meta sit inline with the chevron at the right. */
    .sitestaffr-transcript-card .sitestaffr-detail-card-header {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        height: 60px;
        padding: 0 18px !important;
        gap: 8px;
    }

    .sitestaffr-transcript-card.is-expanded .sitestaffr-detail-card-header {
        height: auto;
        min-height: 60px;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    .sitestaffr-transcript-card .sitestaffr-detail-card-header .hndle {
        flex: 1 1 auto;
    }

    /* Hide duration meta when transcript is collapsed — it's visible in the expanded content */
    .sitestaffr-transcript-card .sitestaffr-transcript-meta {
        display: none;
    }

    .sitestaffr-transcript-card.is-expanded .sitestaffr-transcript-meta {
        display: flex;
        width: 100%;
        order: 1;
    }

    .sitestaffr-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        padding: 4px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: #50575e;
        transition: color 0.15s ease;
    }

    .sitestaffr-mobile-toggle:hover {
        color: #00838F;
    }

    .sitestaffr-mobile-toggle .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
        transition: transform 0.2s ease;
    }

    .sitestaffr-mobile-toggle[aria-expanded="true"] .dashicons {
        transform: rotate(180deg);
    }

    /* Match Session Details header layout for consistent accordion sizing */
    .sitestaffr-session-details-card .sitestaffr-detail-side-header {
        display: flex;
        align-items: center;
    }

    /* Transcript: collapsed by default on mobile */
    .sitestaffr-transcript-card > .inside {
        display: none;
    }

    .sitestaffr-transcript-card.is-expanded > .inside {
        display: block;
    }

    /* Session Details: collapsed by default on mobile */
    .sitestaffr-session-details-card > .sitestaffr-detail-side-content {
        display: none;
    }

    .sitestaffr-session-details-card.is-expanded > .sitestaffr-detail-side-content {
        display: block;
    }

    /* Mobile responsive tabs */
    .sitestaffr-calls-list-page .nav-tab-wrapper {
        margin: 15px 0;
    }

    .nav-tab-wrapper.sitestaffr-tabs-with-search {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .sitestaffr-tab-search {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
        padding-bottom: 0;
    }

    .sitestaffr-tab-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sitestaffr-tab-links .nav-tab {
        white-space: nowrap;
    }

    .sitestaffr-tab-controls {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .sitestaffr-tab-controls > * {
        width: 100%;
    }

    .sitestaffr-tab-search input[type="search"] {
        flex: 1 1 auto;
        width: 100%;
    }

    .sitestaffr-tab-search .button {
        width: 100%;
        justify-content: center;
    }

    .sitestaffr-calls-list-page .nav-tab {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ==========================================================================
   BANNED NUMBERS TAB
   ========================================================================== */

/* Banned Numbers container padding */
.sitestaffr-calls-list-page #tab-content-banned-numbers {
    padding: 0;
}

/* Banned Numbers Header */
.sitestaffr-banned-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
    margin-bottom: 20px;
}

.sitestaffr-banned-header h2 {
    margin: 0;
    font-size: 23px;
    font-weight: 400;
    color: #1d2327;
}

/* Ban Number Button (Teal Gradient) */
.sitestaffr-ban-btn {
    background: linear-gradient(135deg, #1FB6CC, #1AA5BA) !important;
    border: none !important;
    color: #fff !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none !important;
}

.sitestaffr-ban-btn:hover {
    background: linear-gradient(135deg, #1AA5BA, #1895A8) !important;
    box-shadow: 0 4px 12px rgba(31, 182, 204, 0.4) !important;
    transform: translateY(-1px);
}

.sitestaffr-ban-btn:active {
    transform: translateY(0);
}

.sitestaffr-ban-btn .dashicons {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

/* Banned Numbers Table — remove default widefat border since tab container provides it */
.sitestaffr-banned-table {
    background: #fff;
    border: none;
    border-collapse: collapse;
}

.sitestaffr-banned-table th {
    background: #f6f7f7;
    border-bottom: 1px solid #e8e2d8;
    padding: 10px 16px;
    text-align: left;
    font-weight: 600;
    color: #1d2327;
}

.sitestaffr-banned-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0ebe3;
}

.sitestaffr-banned-table tr:hover {
    background: rgba(31, 182, 204, 0.02); /* Subtle teal tint */
}

.sitestaffr-banned-table .column-phone {
    width: 20%;
}

.sitestaffr-banned-table .column-date {
    width: 20%;
}

.sitestaffr-banned-table .column-reason {
    width: 45%;
}

.sitestaffr-banned-table .column-actions {
    width: 15%;
}

/* Unban Button */
.sitestaffr-unban-btn {
    color: #6b5e50 !important;
    border-color: #e8e2d8 !important;
    background: transparent !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sitestaffr-unban-btn:hover {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
}

/* Empty State */
.sitestaffr-banned-empty {
    padding: 0;
    text-align: center;
    background: rgba(31, 182, 204, 0.02); /* Subtle teal background */
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.sitestaffr-banned-empty-inner {
    text-align: center;
    padding: 60px 20px;
    color: #646970;
}

.sitestaffr-banned-empty .dashicons {
    font-size: 48px;
    opacity: 0.3;
    color: #646970;
    display: block;
    margin-bottom: 15px;
}

.sitestaffr-banned-empty-inner p:first-of-type {
    font-size: 16px;
    margin: 0;
}

.sitestaffr-banned-empty-inner p:last-of-type {
    font-size: 14px;
    margin: 5px 0 0 0;
}

/* Loading Spinner */
#sitestaffr-banned-loading {
    text-align: center;
    padding: 40px;
}

#sitestaffr-banned-loading .spinner {
    float: none;
    margin: 0 auto 15px;
}

/* Mobile Responsive - Banned Numbers Table */
@media screen and (max-width: 782px) {
    .sitestaffr-banned-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .sitestaffr-ban-btn {
        width: 100%;
        justify-content: center;
    }

    .sitestaffr-banned-table .column-phone,
    .sitestaffr-banned-table .column-date,
    .sitestaffr-banned-table .column-reason,
    .sitestaffr-banned-table .column-actions {
        width: auto;
    }

    .sitestaffr-banned-table td {
        padding: 10px 8px;
    }
}

/* ==========================================================================
   BAN NUMBER MODAL
   ========================================================================== */

/* Chrome (overlay, card, header/body/footer, close X) comes from the shared
   component in sitestaffr-modal.css; only the form-content styles below
   remain page-owned. */

/* Form Fields */
.sitestaffr-form-field {
    margin-bottom: 20px;
}

.sitestaffr-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.sitestaffr-form-field label .required {
    color: #f44336;
    margin-left: 2px;
}

.sitestaffr-form-field input[type="text"],
.sitestaffr-form-field input[type="tel"],
.sitestaffr-form-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.sitestaffr-form-field input[type="text"]:focus,
.sitestaffr-form-field input[type="tel"]:focus,
.sitestaffr-form-field textarea:focus {
    border-color: var(--sitestaffr-teal);
    outline: none;
    box-shadow: 0 0 0 1px var(--sitestaffr-teal);
}

.sitestaffr-form-field input[type="text"].error,
.sitestaffr-form-field input[type="tel"].error {
    border-color: #f44336; /* Red error */
}

.sitestaffr-form-field .description {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #646970;
}

/* Error Messages */
.sitestaffr-error-message {
    margin: 6px 0 0 0;
    font-size: 13px;
    color: #f44336;
    font-weight: 500;
}

/* Ban Submit Button (Teal Gradient) */
.sitestaffr-ban-submit-btn {
    background: linear-gradient(135deg, #1FB6CC, #1AA5BA) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.sitestaffr-ban-submit-btn:hover {
    background: linear-gradient(135deg, #1AA5BA, #1895A8) !important;
    box-shadow: 0 4px 12px rgba(31, 182, 204, 0.4);
    transform: translateY(-1px);
}

.sitestaffr-ban-submit-btn .dashicons {
    font-size: 16px;
    vertical-align: middle;
}

/* ==========================================================================
   CONVERSATIONS PAGE - WP_LIST_TABLE POLISH
   Shared styles for All Conversations and Trash views
   ========================================================================== */

/* Table container — flush with tabs (no border-radius, no top border) */
.sitestaffr-calls-list-page #tab-content-all-calls,
.sitestaffr-calls-list-page #tab-content-trash,
.sitestaffr-calls-list-page #tab-content-banned-numbers {
    background: #fff;
    border: 1px solid #e8e2d8;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

/* Section header removed — redundant with tab navigation */

/* Search box + tablenav area inner padding */
.sitestaffr-calls-list-page #tab-content-all-calls .search-box,
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav,
.sitestaffr-calls-list-page #tab-content-trash .search-box,
.sitestaffr-calls-list-page #tab-content-trash .tablenav {
    padding-left: 16px;
    padding-right: 16px;
}

/* Table itself — remove double border since container already has border */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table {
    border: none;
    border-top: 1px solid #dcdcde;
    margin: 0;
    border-radius: 0;
}

/* Table header — light teal-gray background */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th {
    background: #f0f8f9;
    border-bottom: 2px solid #b2dfdb;
    color: #00838F;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 10px 8px;
}

/* Uniform header typography across top/bottom headers and sortable links */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th a {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Date/Time cell — stacked on desktop */
.sitestaffr-date-value {
    display: block;
    font-weight: 600;
}

.sitestaffr-time-value {
    display: block;
    color: #666;
}

/* Align Date/Time and Duration headers with the row values */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-created_at,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-created_at,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-call_duration,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-call_duration,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-created_at,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-created_at,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-call_duration,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-call_duration {
    text-align: left;
    padding: 10px 8px;
}


/* Column widths — keep Summary the widest; Status/Date/Channel/Duration compact
   so Channel sits near Duration on the right instead of hogging the middle. */
.sitestaffr-calls-list-page .wp-list-table .column-status { width: 92px; }
.sitestaffr-calls-list-page .wp-list-table .column-created_at { width: 130px; }
.sitestaffr-calls-list-page .wp-list-table .column-channel { width: 120px; }
.sitestaffr-calls-list-page .wp-list-table .column-call_duration { width: 80px; }
/* Summary (from_number) has no width set, so it absorbs the remaining space. */

/* Checkbox column alignment + consistent header/footer checkbox cell styling */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.check-column,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.check-column,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.check-column,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.check-column {
    background: #f0f8f9 !important;
    border-bottom: 2px solid #b2dfdb !important;
    text-align: center;
    vertical-align: middle;
    width: 32px;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody th.check-column,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody th.check-column {
    text-align: center;
    vertical-align: middle;
    padding: 0;
    width: 32px;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .check-column input[type="checkbox"],
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .check-column input[type="checkbox"] {
    float: none;
    display: block;
    margin: 0 auto;
}

/* Force select-all checkbox cells to match header/footer background */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead .column-cb,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead .check-column,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot .column-cb,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot .check-column,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead .column-cb,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead .check-column,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot .column-cb,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot .check-column {
    background: #f0f8f9 !important;
    border-bottom: 2px solid #b2dfdb !important;
}

/* Sortable column links in header */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead .sortcolumn a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead .sortcolumn a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th a {
    color: #00838F;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th a:hover,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th a:hover {
    color: #004D40;
}

/* Row stripes — visible contrast */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:nth-child(even) td,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:nth-child(even) th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:nth-child(even) td,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:nth-child(even) th {
    background: #f9fafb;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:nth-child(odd) td,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:nth-child(odd) th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:nth-child(odd) td,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:nth-child(odd) th {
    background: #fff;
}

/* Consistent hover across entire row including checkbox */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:hover td,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr:hover th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:hover td,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr:hover th {
    background: #eef7f8 !important;
}

/* Table cell padding — a touch more breathing room */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table td,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table td {
    padding: 10px 8px;
    vertical-align: middle;
}

/* Subtle highlight for unread/new conversations */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr.sitestaffr-row-new td,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr.sitestaffr-row-new th,
.sitestaffr-calls-list-page #tab-content-leads .wp-list-table tbody tr.sitestaffr-row-new td,
.sitestaffr-calls-list-page #tab-content-leads .wp-list-table tbody tr.sitestaffr-row-new th,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr.sitestaffr-row-new td,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr.sitestaffr-row-new th {
    background: #FFF8EE !important;
    font-weight: 600;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr.sitestaffr-row-new .column-summary span,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tbody tr.sitestaffr-row-new .column-from_number span,
.sitestaffr-calls-list-page #tab-content-leads .wp-list-table tbody tr.sitestaffr-row-new .column-summary span,
.sitestaffr-calls-list-page #tab-content-leads .wp-list-table tbody tr.sitestaffr-row-new .column-from_number span,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr.sitestaffr-row-new .column-summary span,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tbody tr.sitestaffr-row-new .column-from_number span {
    color: #1a2332;
}

/* Summary column — slightly larger, dark text */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .column-summary,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .column-from_number,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .column-summary,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .column-from_number {
    font-size: 13px;
    color: #1d2327;
    line-height: 1.5;
}

/* Duration column — monospace font for alignment */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .column-call_duration,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .column-call_duration {
    font-family: inherit;
    font-size: 13px;
    color: #646970;
}

/* Keep Duration sort chevrons inline with text (top and bottom headers) */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-call_duration.sortable a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-call_duration.sorted a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-call_duration.sortable a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-call_duration.sorted a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-call_duration.sortable a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-call_duration.sorted a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-call_duration.sortable a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-call_duration.sorted a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-created_at.sortable a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-created_at.sorted a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-created_at.sortable a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-created_at.sorted a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-created_at.sortable a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-created_at.sorted a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-created_at.sortable a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-created_at.sorted a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table thead th.column-call_duration .sorting-indicators,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table tfoot th.column-call_duration .sorting-indicators,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table thead th.column-call_duration .sorting-indicators,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table tfoot th.column-call_duration .sorting-indicators {
    display: inline-flex;
    flex-direction: column;
    position: static;
    top: auto;
    margin: 0;
    vertical-align: middle;
}


/* Status badge polish — rounder pills */
.sitestaffr-calls-list-page .sitestaffr-status-badge {
    border-radius: 20px;
    font-size: 10px;
    letter-spacing: 0.4px;
    padding: 3px 9px;
}

/* Filter bar — styled selects */
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .actions select,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .actions select {
    border-radius: 4px;
    border-color: #c3c4c7;
    font-size: 13px;
    padding: 4px 32px 4px 10px;
    height: auto;
    transition: border-color 0.2s ease;
    background-position: right 10px center;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .actions select,
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .bulkactions select,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .actions select,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .bulkactions select {
    height: 30px;
    min-height: 30px;
    line-height: 28px;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .actions select:focus,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .actions select:focus {
    border-color: #1FB6CC;
    box-shadow: 0 0 0 1px #1FB6CC;
    outline: none;
}

/* Filter button — match brand */
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .actions .button,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .actions .button {
    border-radius: 4px;
    border-color: #c3c4c7;
    font-size: 13px;
    transition: all 0.15s ease;
    vertical-align: middle;
    height: 30px;
    min-height: 30px;
    line-height: 28px;
    padding-top: 0;
    padding-bottom: 0;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .actions .button:hover,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .actions .button:hover {
    border-color: #1FB6CC;
    color: #00838F;
}

/* Search box input */
.sitestaffr-calls-list-page #tab-content-all-calls .search-box input[type="search"],
.sitestaffr-calls-list-page #tab-content-trash .search-box input[type="search"] {
    border-radius: 4px;
    border-color: #c3c4c7;
    transition: border-color 0.2s ease;
}

.sitestaffr-calls-list-page #tab-content-all-calls .search-box input[type="search"]:focus,
.sitestaffr-calls-list-page #tab-content-trash .search-box input[type="search"]:focus {
    border-color: #1FB6CC;
    box-shadow: 0 0 0 1px #1FB6CC;
    outline: none;
}

/* Search submit button */
.sitestaffr-calls-list-page #tab-content-all-calls .search-box .button,
.sitestaffr-calls-list-page #tab-content-trash .search-box .button {
    border-radius: 4px;
    background: linear-gradient(135deg, #1FB6CC, #1AA5BA);
    border-color: #1AA5BA;
    color: #fff;
    font-weight: 600;
    transition: all 0.15s ease;
}

.sitestaffr-calls-list-page #tab-content-all-calls .search-box .button:hover,
.sitestaffr-calls-list-page #tab-content-trash .search-box .button:hover {
    background: linear-gradient(135deg, #1AA5BA, #1895A8);
    border-color: #1895A8;
    color: #fff;
}

/* Pagination — teal accent links */
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav-pages a,
.sitestaffr-calls-list-page #tab-content-trash .tablenav-pages a {
    color: #1FB6CC;
    border-radius: 3px;
    transition: all 0.15s ease;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav-pages a:hover,
.sitestaffr-calls-list-page #tab-content-trash .tablenav-pages a:hover {
    color: #00838F;
    background: rgba(31, 182, 204, 0.08);
}

/* Bulk action select */
.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .bulkactions select,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .bulkactions select {
    border-radius: 4px;
    border-color: #c3c4c7;
    font-size: 13px;
    min-width: 160px;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .bulkactions .button,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .bulkactions .button {
    height: 30px;
    min-height: 30px;
    line-height: 28px;
    padding: 0 10px;
    min-width: 0;
    width: auto;
    vertical-align: middle;
}

.sitestaffr-calls-list-page #doaction,
.sitestaffr-calls-list-page #doaction2,
.sitestaffr-calls-list-page #post-query-submit {
    margin-right: 0 !important;
}

/* Keep bottom tablenav controls aligned and prevent overlap with pagination */
.sitestaffr-calls-list-page .tablenav.bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
}

.sitestaffr-calls-list-page .tablenav.bottom .bulkactions {
    float: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-right: 0;
}

.sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages {
    float: none !important;
    margin-left: auto;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
}

/* Mobile-only helper checkbox in bulk actions */
.sitestaffr-calls-list-page .tablenav .bulkactions .sitestaffr-mobile-select-all-wrap {
    display: none;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .tablenav-pages .current-page,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .tablenav-pages .current-page {
    height: 30px;
    min-height: 30px;
    line-height: 28px;
    box-sizing: border-box;
    padding-left: 4px;
    padding-right: 4px;
    padding-top: 0;
    padding-bottom: 0;
    vertical-align: middle;
    text-align: center;
    margin: 0;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .tablenav-pages .paging-input,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .tablenav-pages .paging-input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 30px;
    gap: 4px;
    vertical-align: middle;
}

.sitestaffr-calls-list-page #tab-content-all-calls .tablenav .tablenav-pages .pagination-links,
.sitestaffr-calls-list-page #tab-content-trash .tablenav .tablenav-pages .pagination-links {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Action links (View, Mark Read, Delete) — darker for readability */
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .row-actions a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions a {
    color: #00838F;
    font-weight: 500;
    transition: color 0.15s ease;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .row-actions .delete a,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .row-actions span.delete a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions .delete a,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions span.delete a {
    color: #dc2626;
}

.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .row-actions .delete a:hover,
.sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table .row-actions span.delete a:hover,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions .delete a:hover,
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions span.delete a:hover {
    color: #b91c1c;
}

/* Trash-specific: "Delete Permanently" link red styling */
.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions .submitdelete {
    color: #b32d2e;
}

.sitestaffr-calls-list-page #tab-content-trash .wp-list-table .row-actions .submitdelete:hover {
    color: #a00;
}

/* Mobile Responsive — Conversations card layout
   Uses double-class selectors to beat WP core list-tables.css specificity */
@media screen and (max-width: 782px) {
    .sitestaffr-calls-list-page #tab-content-all-calls,
    .sitestaffr-calls-list-page #tab-content-trash {
        border-radius: 0;
    }

    .sitestaffr-calls-list-page #tab-content-all-calls .wp-list-table,
    .sitestaffr-calls-list-page #tab-content-trash .wp-list-table {
        padding: 0.25rem 0 0.5rem;
    }

    /* Search bar: stack vertically (WP renders this as <p>, reset its margins) */
    .sitestaffr-calls-list-page .search-box {
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        padding: 10px 12px 4px !important;
        margin: 0 !important;
    }

    .sitestaffr-calls-list-page .search-box input[type="search"] {
        width: 100% !important;
        max-width: none !important;
    }

    .sitestaffr-calls-list-page .search-box .button {
        width: 100%;
    }

    .sitestaffr-calls-list-page #tab-content-all-calls .tablenav,
    .sitestaffr-calls-list-page #tab-content-trash .tablenav {
        padding: 4px 12px 10px;
    }

    /* Remove WP core top tablenav margin on mobile */
    .sitestaffr-calls-list-page .tablenav.top {
        margin-top: 0;
    }

    /* Tablenav: flex column to reorder sections */
    .sitestaffr-calls-list-page .tablenav {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* Filters (Status + Time) first */
    .sitestaffr-calls-list-page .tablenav .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 0;
        order: 1;
        width: 100%;
    }

    /* Status + Time selects side-by-side */
    .sitestaffr-calls-list-page .tablenav .actions select {
        flex: 1;
        min-width: 0;
        margin-right: 0 !important;
    }

    /* Filter button should stay auto-sized and centered */
    .sitestaffr-calls-list-page .tablenav .actions .button {
        width: auto;
        display: inline-flex;
        justify-content: center;
        margin-bottom: 0 !important;
    }

    /* Pagination before bulk actions on mobile */
    .sitestaffr-calls-list-page .tablenav .tablenav-pages {
        float: none !important;
        text-align: right;
        padding-top: 6px;
        padding-bottom: 0;
        margin-bottom: 0 !important;
        order: 2;
    }

    /* Bulk actions last */
    .sitestaffr-calls-list-page .tablenav .bulkactions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        width: 100%;
        order: 3;
        clear: both;
    }

    .sitestaffr-calls-list-page .tablenav .bulkactions select {
        flex: 1 1 180px;
        min-width: 0;
        margin-bottom: 0 !important;
    }

    .sitestaffr-calls-list-page .tablenav .bulkactions .button {
        flex: 0 0 auto;
        width: auto !important;
        min-width: 56px;
        padding: 0 10px !important;
        margin-bottom: 0 !important;
        white-space: nowrap;
    }

    .sitestaffr-calls-list-page .tablenav .bulkactions .sitestaffr-mobile-select-all-wrap {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        color: #50575e;
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
        margin-right: 2px;
    }

    .sitestaffr-calls-list-page .tablenav .bulkactions .sitestaffr-mobile-select-all {
        margin: 0;
    }

    .sitestaffr-calls-list-page .tablenav.bottom {
        padding: 4px 12px 10px !important;
        margin-top: 0;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .bulkactions,
    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages {
        align-items: center;
        margin-bottom: 0 !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages {
        order: 1;
        width: 100% !important;
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
        column-gap: 6px;
        row-gap: 4px;
        text-align: right;
        padding: 0 0 6px 0 !important;
        margin: 0 !important;
        min-height: 30px;
        float: none !important;
        clear: both !important;
        position: static !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages .displaying-num {
        margin: 0 0 0 6px;
        white-space: nowrap;
        float: none !important;
        position: static !important;
        display: inline-flex;
        align-items: center;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages .paging-input {
        margin: 0;
        white-space: nowrap;
        float: none !important;
        position: static !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages .pagination-links {
        margin: 0;
        white-space: nowrap;
        float: none !important;
        position: static !important;
        display: inline-flex;
        align-items: center;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages .tablenav-pages-navspan,
    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages a {
        float: none !important;
        position: static !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .bulkactions {
        order: 2;
        width: 100% !important;
        justify-content: flex-start;
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
        margin: 0 !important;
        padding: 0 !important;
        float: none !important;
        clear: both !important;
        position: static !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .tablenav-pages .pagination-links {
        position: static !important;
    }

    .sitestaffr-calls-list-page .tablenav.bottom br.clear {
        display: none;
    }

    .sitestaffr-calls-list-page .tablenav.bottom .actions select {
        margin-bottom: 0 !important;
    }

    .sitestaffr-calls-list-page #doaction,
    .sitestaffr-calls-list-page #doaction2,
    .sitestaffr-calls-list-page #post-query-submit {
        margin-right: 0 !important;
    }

    .wp-core-ui .sitestaffr-calls-list-page .button,
    .wp-core-ui .sitestaffr-calls-list-page .button.button-large,
    .wp-core-ui .sitestaffr-calls-list-page .button.button-small,
    .wp-core-ui .sitestaffr-calls-list-page input#publish,
    .wp-core-ui .sitestaffr-calls-list-page input#save-post,
    .wp-core-ui .sitestaffr-calls-list-page a.preview {
        margin-bottom: 0 !important;
    }

    /* Last card: reduce bottom margin to tighten gap before bottom tablenav */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody tr:last-child {
        margin-bottom: 4px;
    }

    /* Table: full width, block layout, no min-width */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: auto !important;
        display: block !important;
        margin-bottom: 0 !important;
    }

    /* Disable form-level horizontal scroll */
    .sitestaffr-calls-list-page #sitestaffr-calls-list-form,
    .sitestaffr-calls-list-page #sitestaffr-trash-list-form {
        overflow-x: visible !important;
    }

    /* Hide table header and footer */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table thead {
        display: none !important;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tfoot {
        display: none !important;
    }

    /* tbody must be block */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody {
        display: block !important;
    }

    /* Each row becomes a card */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody tr {
        display: block !important;
        position: relative;
        background: #fff;
        border: 1px solid #e8e2d8;
        border-radius: 8px;
        padding: 42px 16px 14px !important;
        margin: 8px 12px;
        width: auto !important;
        box-sizing: border-box;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    /* === First row: checkbox | status | duration — absolute positioned === */

    /* Checkbox — top-left */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table th.check-column,
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table td.check-column {
        display: block !important;
        position: absolute !important;
        top: 10px;
        left: 16px;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        width: auto !important;
        background: transparent !important;
        float: none !important;
        z-index: 3;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table th.check-column::before,
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table td.check-column::before {
        display: none !important;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table th.check-column input[type="checkbox"],
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table td.check-column input[type="checkbox"] {
        margin: 0 !important;
        float: none !important;
    }

    /* Date/Time side-by-side on mobile */
    .sitestaffr-date-value,
    .sitestaffr-time-value {
        display: inline !important;
    }

    .sitestaffr-date-value::after {
        content: ", ";
    }

    /* Alternate row striping off — cards have their own bg */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody tr.alternate {
        background: #fff !important;
    }

    /* Override WP core hiding non-primary columns */
    .sitestaffr-calls-list-page .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column) {
        display: block !important;
        position: static !important;
        padding: 0 !important;
        margin-bottom: 10px !important;
        border: none !important;
        width: auto !important;
        box-sizing: border-box;
        text-align: left !important;
        float: none !important;
        clear: none !important;
        background: transparent !important;
    }

    /* Last cell: no bottom margin */
    .sitestaffr-calls-list-page .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column):last-child {
        margin-bottom: 0 !important;
    }

    /* Column label — override WP core absolute-positioned ::before */
    .sitestaffr-calls-list-page .wp-list-table tr:not(.inline-edit-row):not(.no-items) td:not(.check-column)::before {
        content: attr(data-colname) !important;
        display: block !important;
        position: static !important;
        left: auto !important;
        float: none !important;
        width: auto !important;
        max-width: none !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        color: #8c8f94 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em;
        margin-bottom: 2px;
        padding: 0 !important;
        text-align: left !important;
        overflow: visible !important;
        white-space: normal !important;
        text-overflow: clip !important;
    }

    /* Hide label for checkbox cells */
    .sitestaffr-calls-list-page .wp-list-table tr th.check-column::before,
    .sitestaffr-calls-list-page .wp-list-table tr td.check-column::before {
        display: none !important;
        content: none !important;
    }

    /* Status — absolute positioned after checkbox (specificity must beat generic 0,5,2) */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-status {
        position: absolute !important;
        top: 10px;
        left: 50px;
        display: inline-flex !important;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        border: none !important;
        width: auto !important;
        background: transparent !important;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-status::before {
        content: "Status" !important;
        display: inline-block !important;
        position: static !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 10px !important;
        font-weight: 600 !important;
        line-height: 1 !important;
        color: #8c8f94 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.05em !important;
    }

    /* Summary column — prominent, slightly larger text */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody td.column-summary,
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody td.column-from_number {
        font-size: 13px;
        line-height: 1.5;
        color: #1d2327;
    }

    /* Row actions: teal links, spaced evenly */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table .row-actions {
        position: static !important;
        padding: 8px 0 0 !important;
        left: auto !important;
        border-top: 1px solid #f0ebe0;
        margin-top: 10px;
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    /* Hide pipe separators between actions */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table .row-actions span {
        font-size: 0;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table .row-actions span a {
        color: #00838f;
        font-size: 13px;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table .row-actions span a:hover {
        color: #004d40;
    }

    /* Hide WP toggle-row button */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table .toggle-row {
        display: none !important;
    }

    /* Primary column: remove WP's 50px right padding for toggle button */
    .sitestaffr-calls-list-page .wp-list-table td.column-primary {
        padding-right: 0 !important;
    }

    /* Unread/new cards — yellow highlight background on mobile */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tbody tr.sitestaffr-row-new {
        background: #FFF8EE !important;
    }

    /* Duration — top-right in first row (specificity must beat generic 0,5,2) */
    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-call_duration {
        position: absolute !important;
        top: 10px;
        right: 16px;
        display: block !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        border: none !important;
        text-align: right !important;
        width: auto !important;
        background: transparent !important;
    }

    .sitestaffr-calls-list-page .wp-list-table.wp-list-table tr:not(.inline-edit-row):not(.no-items) td.column-call_duration::before {
        display: none !important;
        content: none !important;
    }
}

/* ==========================================================================
   Calls List Page — previously inline styles
   ========================================================================== */

/* Tab content styling */
.sitestaffr-tab-content {
    display: none;
}

.sitestaffr-tab-content.active {
    display: block;
}

/* Column widths */
.sitestaffr-calls-list-page .wp-list-table .column-cb {
    width: 30px;
}
.sitestaffr-calls-list-page .wp-list-table .column-status {
    width: 100px;
}
.sitestaffr-calls-list-page .wp-list-table .column-created_at {
    width: 150px;
}
.sitestaffr-calls-list-page .wp-list-table .column-call_duration {
    width: 80px;
}

/* Status badges - ensure no bullet points and proper inline display */
.sitestaffr-calls-list-page .sitestaffr-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 4px 0 0;
}

.sitestaffr-calls-list-page .sitestaffr-status-badge::before {
    list-style: none !important;
    list-style-type: none !important;
}

.sitestaffr-calls-list-page .sitestaffr-status-badge:last-child {
    margin-right: 0;
}

/* Force remove list bullets from status column */
.sitestaffr-calls-list-page .column-status,
.sitestaffr-calls-list-page .column-status * {
    list-style: none !important;
    list-style-type: none !important;
}

.sitestaffr-calls-list-page .sitestaffr-status-new {
    background: #dc3545;
    color: #fff;
}
.sitestaffr-calls-list-page .sitestaffr-status-read {
    background: #e5e7eb;
    color: #374151;
}
.sitestaffr-calls-list-page .sitestaffr-status-test {
    background: #9c27b0;
    color: #fff;
}
.sitestaffr-calls-list-page .tablenav .actions select,
.sitestaffr-calls-list-page .tablenav .bulkactions select {
    margin-right: 0;
    min-width: 110px;
    padding-right: 34px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23646970'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
}

.sitestaffr-calls-list-page .tablenav .actions select[name="filter_read"] {
    min-width: 115px;
}

.sitestaffr-calls-list-page .tablenav .actions select[name="filter_date"] {
    min-width: 130px;
}

.sitestaffr-calls-list-page .tablenav.top .actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sitestaffr-calls-list-page #sitestaffr-custom-date-range {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sitestaffr-calls-list-page #sitestaffr-custom-date-range input[type="date"] {
    width: 126px;
    min-width: 126px;
}

.sitestaffr-calls-list-page .tablenav .bulkactions,
.sitestaffr-calls-list-page .tablenav .actions {
    display: inline-flex;
    align-items: center;
}

.sitestaffr-calls-list-page .tablenav .bulkactions .button,
.sitestaffr-calls-list-page .tablenav .actions .button {
    vertical-align: middle;
}

.sitestaffr-calls-list-page .tablenav .actions select,
.sitestaffr-calls-list-page .tablenav .bulkactions select,
.sitestaffr-calls-list-page .tablenav .actions .button,
.sitestaffr-calls-list-page .tablenav .bulkactions .button,
.sitestaffr-calls-list-page .tablenav .tablenav-pages .current-page {
    height: 30px;
    min-height: 30px;
    line-height: 28px;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
}

.sitestaffr-calls-list-page .tablenav .tablenav-pages .paging-input {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    line-height: 30px;
    gap: 4px;
}

.sitestaffr-calls-list-page .tablenav .tablenav-pages .pagination-links {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Trash tab count badge */
.sitestaffr-calls-list-page .nav-tab .count {
    color: #787c82;
    font-weight: 400;
}

/* Chunk source attribution — per-AI-message "Sources" disclosure. */
.sitestaffr-tv-sources { margin-top: 8px; font-size: 13px; }
.sitestaffr-tv-sources-summary { cursor: pointer; color: #5b6472; user-select: none; }
.sitestaffr-tv-sources-body { margin-top: 6px; padding: 8px 10px; background: #f6f7f9; border-radius: 6px; }
.sitestaffr-tv-source { padding: 6px 0; border-top: 1px solid #e3e6ea; }
.sitestaffr-tv-source:first-child { border-top: 0; }
.sitestaffr-tv-source-meta { color: #5b6472; margin-bottom: 4px; }
.sitestaffr-tv-source-content { white-space: normal; color: #2b2f36; }
.sitestaffr-tv-source-link { display: inline-block; margin-top: 4px; }

/* ==========================================================================
   CONVERSATIONS LIST — Lead + Channel columns, muted rows, filters
   ========================================================================== */

.sitestaffr-lead-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: var(--sitestaffr-radius-pill, 999px);
	background: #e7f7ef;
	color: #0b7a4b;
	font-size: 11px;
	font-weight: 600;
	vertical-align: middle;
	margin-left: 4px;
}

.sitestaffr-channel-label {
	font-size: 12px;
	color: var(--sitestaffr-text-muted, #646970);
	white-space: nowrap;
}

/* Zero-info rows (abandoned / no-summary) recede so real conversations pop */
.sitestaffr-calls-list-page tr.sitestaffr-row-muted td {
	opacity: 0.55;
}

.sitestaffr-calls-list-page tr.sitestaffr-row-muted:hover td {
	opacity: 1;
}

.sitestaffr-filter-has-lead {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 8px 0 4px;
	vertical-align: middle;
	font-size: 13px;
}

.sitestaffr-mark-all-read {
	margin-right: 8px;
}

/* ==========================================================================
   DETAIL PAGE — prev/next nav, Captured Lead card, transcript actions
   ========================================================================== */

.sitestaffr-detail-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.sitestaffr-detail-nav-back {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	color: var(--sitestaffr-teal-dark, #00838F);
	font-weight: 600;
}

.sitestaffr-detail-nav-arrows {
	display: flex;
	gap: 6px;
}

.sitestaffr-detail-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.sitestaffr-detail-nav-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 1.6;
}

span.sitestaffr-detail-nav-btn[aria-disabled="true"] {
	opacity: 0.4;
	pointer-events: none;
}

/* Captured Lead card */
.sitestaffr-lead-card.has-lead {
	border-left: 4px solid var(--sitestaffr-green, #10B981);
}

.sitestaffr-lead-copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 6px;
	margin: -2px -6px;
	border: 0;
	background: transparent;
	font-size: inherit;
	color: inherit;
	cursor: pointer;
	border-radius: var(--sitestaffr-radius-sm, 4px);
	text-align: left;
	overflow-wrap: anywhere;
}

.sitestaffr-lead-copy .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	color: var(--sitestaffr-text-muted, #646970);
}

.sitestaffr-lead-copy:hover {
	background: var(--sitestaffr-teal-light, #E0F7FA);
}

.sitestaffr-lead-copy.is-copied .dashicons {
	color: var(--sitestaffr-green, #10B981);
}

.sitestaffr-lead-card-link {
	margin: 8px 0 0;
	font-size: 12px;
}

/* Banned badge — its own semantics (was reusing the "New" badge styles) */
.sitestaffr-status-badge.sitestaffr-status-banned {
	background: #fdeeee;
	color: #b42318;
}

/* Recap + transcript header actions */
.sitestaffr-copy-recap-btn,
.sitestaffr-jump-latest-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-right: 8px;
}

.sitestaffr-copy-recap-btn .dashicons,
.sitestaffr-jump-latest-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
	line-height: 1.7;
}

@media screen and (max-width: 782px) {
	.sitestaffr-detail-nav {
		flex-wrap: wrap;
	}
}

/* ==========================================================================
   PRINT — Conversation Detail prints itself (Print / Download button), so drop
   the navigation and action controls and let the recap + transcript run full
   width. Lead and session details stay: they are the record.
   ========================================================================== */
