/**
 * SiteStaffr Global Styles
 *
 * Shared styles loaded on ALL admin pages
 * Includes: buttons, forms, icons, notifications, utilities
 *
 * @package    SiteStaffr
 * @subpackage SiteStaffr/assets/css
 * @since      0.5.0
 */

/* ==========================================================================
   DESIGN TOKENS — single source of truth for admin styling.
   Defined on :root (wp-admin loads all plugin CSS on one document), prefixed
   --sitestaffr- to avoid cross-plugin collisions. New/edited rules MUST use
   these instead of literals.
   ========================================================================== */
:root {
    /* Brand teals */
    --sitestaffr-teal: #1FB6CC;          /* primary actions */
    --sitestaffr-teal-hover: #1AA5BA;
    --sitestaffr-teal-dark: #00838F;     /* headings */
    --sitestaffr-teal-ink: #004D40;      /* critical text */
    --sitestaffr-teal-light: #E0F7FA;    /* tinted backgrounds */
    --sitestaffr-teal-soft: #B2DFDB;     /* tinted borders */
    /* Status */
    --sitestaffr-green: #10B981;         /* success */
    --sitestaffr-red: #D63638;           /* errors (WP red) */
    /* Cream surfaces (page identity) */
    --sitestaffr-bg: #FDFBF7;            /* page background */
    --sitestaffr-bg-alt: #FAF8F4;        /* card/section fill */
    --sitestaffr-border: #E8E2D8;        /* card borders */
    --sitestaffr-border-soft: #F0EBE0;   /* dividers */
    /* Text + neutral grays (WP admin palette) */
    --sitestaffr-text: #1D2327;
    --sitestaffr-text-muted: #646970;
    --sitestaffr-text-soft: #50575E;
    --sitestaffr-gray-border: #C3C4C7;
    --sitestaffr-gray-line: #DCDCDE;
    /* Spacing scale */
    --sitestaffr-space-xs: 4px;
    --sitestaffr-space-sm: 8px;
    --sitestaffr-space-md: 12px;
    --sitestaffr-space-lg: 16px;
    --sitestaffr-space-xl: 24px;
    --sitestaffr-space-2xl: 32px;
    /* Radii */
    --sitestaffr-radius-sm: 4px;
    --sitestaffr-radius-md: 6px;
    --sitestaffr-radius: 8px;
    --sitestaffr-radius-lg: 12px;
    --sitestaffr-radius-pill: 999px;
    /* Elevation */
    --sitestaffr-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06);
    --sitestaffr-shadow-pop: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* Type */
    --sitestaffr-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ==========================================================================
   UNIFIED BUTTON STYLES - Consistent across all SiteStaffr admin pages

   WP 7.0 styles admin buttons via var(--wp-admin-theme-color) (default
   #3858e9) and leaves plain .button with a transparent background, so any
   button we don't skin renders off-palette and shifts with the user's
   admin color scheme.

   Strategy:
   - Every rule is scoped to SiteStaffr screens by matching the page-hook
     body class inside :where(), which adds zero specificity: each rule
     keeps the exact specificity of the core rule it mirrors, beats core by
     load order (core prints first), and page-specific stylesheets (which
     load after this file) can still override. Other admin screens are
     untouched.
   - The three admin theme-color variables are pinned to our brand teal so
     every var-driven core rule (primary background, hover/active shades,
     focus rings) resolves to our palette even when core changes its
     defaults again.
   - Disabled states are left to core (it enforces them with !important).
   ========================================================================== */

body.wp-core-ui:where([class*="page_sitestaffr"]) {
    --wp-admin-theme-color: var(--sitestaffr-teal);
    --wp-admin-theme-color-darker-10: var(--sitestaffr-teal-dark);
    --wp-admin-theme-color-darker-20: var(--sitestaffr-teal-ink);
}

/* Base button structure — flex (core uses inline-block) for reliable
   dashicon alignment inside buttons. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-primary,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wp-core-ui:where([class*="page_sitestaffr"]) .button .dashicons,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-primary .dashicons,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-secondary .dashicons {
    line-height: 1;
    flex-shrink: 0;
}

/* Hero buttons — core sets dashicon line-height at specificity 0,4,0;
   match that specificity to keep flex alignment. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-hero .dashicons {
    line-height: 1;
    flex-shrink: 0;
}

/* Default & secondary buttons - white background, SiteStaffr teal border,
   darker-teal text (readable on white). Core 7.0 sets these at the same
   specificity (transparent background, theme-color text); we win by
   printing later. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-secondary {
    background: #fff;
    color: var(--sitestaffr-teal-dark);
    border-color: var(--sitestaffr-teal);
}

/* Hover/active fill — mirrors core's 0,3,0 state shapes. Focus keeps the
   white background so core's (now teal) focus ring reads clearly. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button:hover,
.wp-core-ui:where([class*="page_sitestaffr"]) .button:active,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-secondary:hover,
.wp-core-ui:where([class*="page_sitestaffr"]) .button-secondary:active {
    background: var(--sitestaffr-teal);
    color: #fff;
    border-color: var(--sitestaffr-teal);
}

/* Destructive buttons keep the red affordance, not the teal skin. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-link-delete {
    color: #b32d2e;
    border-color: #b32d2e;
    background: #fff;
}

.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-link-delete:hover {
    background: #b32d2e;
    border-color: #b32d2e;
    color: #fff;
}

/* Primary action buttons - solid SiteStaffr teal (the established brand
   pattern: knowledge controls, conversations search, ban submit). Also
   defends against admin color schemes that hard-code .button-primary
   colors at lower specificity. */
.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-primary {
    background: var(--sitestaffr-teal);
    color: #fff;
    border-color: var(--sitestaffr-teal);
}

.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-primary:hover {
    background: var(--sitestaffr-teal-dark);
    border-color: var(--sitestaffr-teal-dark);
    color: #fff;
}

.wp-core-ui:where([class*="page_sitestaffr"]) .button.button-primary:active {
    background: var(--sitestaffr-teal-ink);
    border-color: var(--sitestaffr-teal-ink);
    color: #fff;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

.form-table th {
    font-weight: 600;
}

.form-table input[type="text"],
.form-table input[type="password"],
.form-table input[type="tel"] {
    width: 100%;
    max-width: 500px;
}

/* ==========================================================================
   STATUS BADGES & NOTIFICATIONS
   ========================================================================== */

/* Status badges - clean label style with bullet icons */
.sitestaffr-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: transparent;
    border: none;
}

/* Color-coded bullet icons using ::before - Logical Color System */

/* Active/Connected - GREEN (positive working state, matches mascot checkmark) */
.sitestaffr-status-active::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sitestaffr-green); /* Green */
    flex-shrink: 0;
}

.sitestaffr-status-active {
    color: var(--sitestaffr-green);
}

/* Inactive/Disconnected - RED (error/problem state) */
.sitestaffr-status-inactive::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ef4444; /* Red */
    flex-shrink: 0;
}

.sitestaffr-status-inactive {
    color: #ef4444;
}

/* Shared inline save status — states driven by SiteStaffrSaveUX.status()
   (admin/js/sitestaffr-save-ux.js). Colors only; layout stays page-owned. */
.sitestaffr-inline-status.is-saving {
    color: var(--sitestaffr-text-muted);
}

.sitestaffr-inline-status.is-saved {
    color: var(--sitestaffr-green);
}

.sitestaffr-inline-status.is-error {
    color: var(--sitestaffr-red);
}

/* Shared tabs — behavior from SiteStaffrTabs (admin/js/sitestaffr-tabs.js).
   One underline-tab look for every tablist; pages with different spacing set
   the two --sitestaffr-tabs-* variables on a wrapper instead of re-declaring
   these properties at higher specificity. */
.sitestaffr-agent-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--sitestaffr-gray-border);
    margin: var(--sitestaffr-tabs-margin, 20px 0 0);
}

.sitestaffr-agent-tab {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--sitestaffr-text-soft);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.sitestaffr-agent-tab:hover {
    color: var(--sitestaffr-teal-dark);
}

.sitestaffr-agent-tab.is-active {
    color: var(--sitestaffr-teal-dark);
    border-bottom-color: var(--sitestaffr-teal-dark);
}

.sitestaffr-agent-tabpanel {
    padding: var(--sitestaffr-tabpanel-padding, 20px 0 0);
}

.sitestaffr-agent-tabpanel[hidden] {
    display: none;
}

/* New - warm green pill badge (branded unread indicator) */
.sitestaffr-status-new,
.sitestaffr-badge-new {
    display: inline-block;
    padding: 2px 10px;
    background: #ecfdf5;
    color: #059669;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 999px;
}

/* Onboarding lead - teal pill badge */
.sitestaffr-persona-badge--onboarding {
    display: inline-flex;
    width: fit-content;
    padding: 2px 10px;
    background: var(--sitestaffr-teal-light);
    color: var(--sitestaffr-teal-dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 999px;
    margin-bottom: 4px;
}

/* Read - GRAY (neutral read state) */
/* Removed ::before bullet point for cleaner appearance in Status column */
.sitestaffr-status-read {
    color: var(--sitestaffr-text-muted);
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Test - PURPLE (distinct test indicator) */
/* Removed ::before bullet point for cleaner appearance in Status column */
.sitestaffr-status-test,
.sitestaffr-badge-test {
    color: #9c27b0;
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Filtered/Spam - GRAY (neutral filtered state) */
/* Removed ::before bullet point for cleaner appearance in Status column */
.sitestaffr-status-filtered {
    color: var(--sitestaffr-text-muted);
    background: transparent;
    border: none;
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Larger version for call details page */
.sitestaffr-status-filtered[style*="font-size: 14px"] {
    padding: 4px 8px;
    font-size: 14px !important;
}

/* Status messages */
.sitestaffr-action-status {
    padding: 0 16px 16px;
    text-align: center;
}

.sitestaffr-status-info,
.sitestaffr-status-success,
.sitestaffr-status-error {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
}

.sitestaffr-status-info {
    background: #e3f2fd;
    color: #1565c0;
}

.sitestaffr-status-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.sitestaffr-status-error {
    background: #ffebee;
    color: #c62828;
}

/* Notification badge in menu */
.awaiting-mod {
    background-color: var(--sitestaffr-red);
    color: #fff;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 9px;
    line-height: 17px;
    font-weight: 600;
    margin-left: 5px;
}

/* ==========================================================================
   ADMIN SIDEBAR MENU ICON — active/hover state
   The icon is a base64 SVG data-URI (add_menu_page), so WP renders it as a
   background-image on the `.wp-menu-image` div — there is NO <img>. Target the
   div itself and whiten with a filter (the embedded raster can't be `fill`ed).
   ========================================================================== */

#adminmenu #toplevel_page_sitestaffr:hover .wp-menu-image,
#adminmenu #toplevel_page_sitestaffr.wp-has-current-submenu .wp-menu-image,
#adminmenu #toplevel_page_sitestaffr.current .wp-menu-image {
    filter: brightness(0) invert(1);
    opacity: 1;
}

/* ==========================================================================
   ICON UTILITIES
   ========================================================================== */

.dashicons {
    vertical-align: middle;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   EMPTY STATES
   ========================================================================== */

.sitestaffr-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--sitestaffr-text-muted);
}

.sitestaffr-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--sitestaffr-gray-line);
    margin-bottom: 12px;
}

.sitestaffr-empty-state p {
    margin: 0 0 8px;
    font-size: 14px;
}

/* ==========================================================================
   SESSION ID LINK — teal monospace chip (used on Usage + Dashboard)
   ========================================================================== */

.sitestaffr-call-sid-link {
    font-family: "SF Mono", Monaco, Consolas, monospace;
    font-size: 10px;
    color: var(--sitestaffr-teal-dark);
    background: #e0f2f1;
    border: 1px solid var(--sitestaffr-teal-soft);
    padding: 2px 8px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.2s ease;
}

.sitestaffr-call-sid-link:hover {
    background: var(--sitestaffr-teal-soft);
    color: var(--sitestaffr-teal-ink);
    border-color: #80cbc4;
}

/* ==========================================================================
   COMMON UTILITIES
   ========================================================================== */

/* View all link */
.sitestaffr-view-all {
    font-size: 13px;
    text-decoration: none;
    color: #2271b1;
}

.sitestaffr-view-all:hover {
    color: #135e96;
}

/* Widget base */
.sitestaffr-widget {
    background: #fff;
    border: 1px solid var(--sitestaffr-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sitestaffr-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 18px;
    border-bottom: 1px solid var(--sitestaffr-border-soft);
    background: var(--sitestaffr-bg-alt);
}

.sitestaffr-widget-header h2,
.sitestaffr-widget-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--sitestaffr-text);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.sitestaffr-widget-header h2 .dashicons,
.sitestaffr-widget-header h3 .dashicons {
    color: var(--sitestaffr-teal-dark);
}

.sitestaffr-widget-header .sitestaffr-view-all,
.sitestaffr-widget-header .sitestaffr-view-all-link {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==========================================================================
   TOOLTIP SYSTEM - Used across all admin pages
   ========================================================================== */

/* Tooltip trigger icon */
.sitestaffr-tooltip-trigger {
    display: inline-block;
    margin-left: 6px;
    color: #999;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    line-height: 1;
}

.sitestaffr-tooltip-trigger:hover,
.sitestaffr-tooltip-trigger:focus {
    color: #555;
    outline: none;
}

.sitestaffr-tooltip-trigger .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

/* Tooltip bubble */
.sitestaffr-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 250px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sitestaffr-tooltip.show {
    opacity: 1;
}

/* Tooltip arrow */
.sitestaffr-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Arrow pointing down (tooltip above) */
.sitestaffr-tooltip.position-top::before {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Arrow pointing up (tooltip below) */
.sitestaffr-tooltip.position-bottom::before {
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(0, 0, 0, 0.9) transparent;
}

/* Mobile responsiveness for tooltips */
@media screen and (max-width: 782px) {
    .sitestaffr-tooltip {
        max-width: 200px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .sitestaffr-tooltip-trigger .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   GLOBAL HEADER PARTIAL - Shared across all admin pages
   ========================================================================== */

/* Normalize all SiteStaffr .wrap containers — override WP default
   asymmetric margins (10px 20px 0 2px) so every page starts identically.
   Every admin view carries the shared sitestaffr-wrap class alongside its
   page-specific one. */
.wrap.sitestaffr-wrap {
    max-width: 1200px;
    margin: 10px auto 0 auto;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--sitestaffr-font);
}

/* Warm cream page background — scoped to SiteStaffr pages only.
   Uses attribute selector to match any body class containing "sitestaffr",
   covering toplevel_page_sitestaffr and all sitestaffr_page_* subpages. */
body[class*="sitestaffr"] #wpcontent,
body[class*="sitestaffr"] #wpbody,
body[class*="sitestaffr"] #wpbody-content,
body[class*="sitestaffr"] #wpfooter {
    background: var(--sitestaffr-bg) !important;
    box-sizing: border-box;
}

/* Match WP's padding-left: 20px on #wpcontent with equal right padding */
body[class*="sitestaffr"] #wpcontent {
    padding-right: 20px;
}

body[class*="sitestaffr"] #wpbody-content {
    min-height: 100vh;
}

@media screen and (max-width: 1240px) {
    /* The wizard's 680px card centers itself; it keeps the wrap at padding 0
       so its gutters don't stack with #wpcontent's. */
    .wrap.sitestaffr-wrap:not(.sitestaffr-setup-wizard) {
        max-width: none;
        padding: 0 20px;
    }
}

/* Outer header bar — true 3-column layout */
.sitestaffr-page-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 12px 0 8px 0;
}

/* Left: logo */
.sitestaffr-header-logo {
    grid-column: 1;
    justify-self: start;
}

/* Logo link — remove browser focus outline */
.sitestaffr-header-logo a {
    outline: none;
    box-shadow: none;
}

/* Logo image */
.sitestaffr-logo-image {
    height: 80px;
    width: auto;
    display: block;
    padding-left: 1rem;
}

/* Two-tone brand text (fallback when image unavailable) */
.sitestaffr-logo-placeholder {
    font-size: 24px;
    font-weight: 600;
    color: var(--sitestaffr-teal);
}

.sitestaffr-brand-phone {
    color: var(--sitestaffr-teal-dark);
}

.sitestaffr-brand-ease {
    color: var(--sitestaffr-green);
}

/* Center: page title — solid brand text for cleaner scanning UX */
.sitestaffr-header-page-title {
    grid-column: 2;
    justify-self: center;
    max-width: 100%;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--sitestaffr-teal-dark);
}

@media screen and (max-width: 1100px) {
    .sitestaffr-page-header {
        min-height: 54px;
    }

    .sitestaffr-logo-image {
        height: 64px;
    }

    .sitestaffr-header-page-title {
        font-size: 24px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 0 12px;
    }
}

/* Right: status badge */
.sitestaffr-header-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 1rem;
}

/* Header status badge - base shared style */
.sitestaffr-header-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border: none;
}

.sitestaffr-header-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Active (paid subscription) */
.sitestaffr-header-status.status-active {
    color: var(--sitestaffr-green);
}

.sitestaffr-header-status.status-active::before {
    background-color: var(--sitestaffr-green);
}

/* Trial active */
.sitestaffr-header-status.status-trial {
    color: #2271b1;
}

.sitestaffr-header-status.status-trial::before {
    background-color: #2271b1;
}

/* Past due / unpaid - warning amber */
.sitestaffr-header-status.status-warning {
    color: #b45309;
}

.sitestaffr-header-status.status-warning::before {
    background-color: #f59e0b;
}

/* Canceled / expired - gray */
.sitestaffr-header-status.status-canceled {
    color: var(--sitestaffr-text-muted);
}

.sitestaffr-header-status.status-canceled::before {
    background-color: #9ca3af;
}

/* Mobile responsive */
@media screen and (max-width: 782px) {
    /* #wpcontent provides the 16px gutters below; the wrap contributes NO
       horizontal spacing of its own. The selector mirrors the 1240px gutter
       rule above — its :not() lifts that rule to (0,3,0), so a plain
       .wrap.sitestaffr-wrap here would LOSE and the 20px tablet padding
       would survive on phones. Margins are pinned with !important because
       WP core's small-screen .wrap rule (10px/12px) otherwise pads the
       gutters. */
    .wrap.sitestaffr-wrap:not(.sitestaffr-setup-wizard) {
        padding: 0;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body[class*="sitestaffr"] #wpcontent {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .sitestaffr-page-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 0 6px 0;
        min-height: auto;
    }

    .sitestaffr-header-logo {
        justify-self: center;
    }

    .sitestaffr-logo-image {
        height: 46px;
        padding-left: 0;
    }

    .sitestaffr-header-page-title {
        font-size: 16px;
        padding: 0;
        white-space: nowrap;
        text-align: center;
    }

    .sitestaffr-header-actions {
        padding-right: 0;
    }

    .sitestaffr-widget-header {
        height: auto;
        min-height: 50px;
        padding: 10px 18px;
        flex-wrap: wrap;
    }

    /* Global mobile checkbox size — 23x23 on all SiteStaffr pages */
    body[class*="sitestaffr"] input[type="checkbox"] {
        width: 23px !important;
        height: 23px !important;
        min-width: 23px;
    }
}

body[class*="sitestaffr"] .wrap .widefat,
body[class*="sitestaffr"] .wrap .wp-list-table {
    width: 100%;
}

@media screen and (max-width: 1024px) {
    body[class*="sitestaffr"] .wrap table.widefat:not(.wp-list-table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================================================
   MINUTE BALANCE WIDGET - OLD (Deprecated - moved to sitestaffr-settings.css)
   Note: Old standalone widget styles removed. Widget now combined with phone
   number banner using light teal branding (Option B). See sitestaffr-settings.css
   for .sitestaffr-combined-phone-minutes styles.
   ========================================================================== */

/* ==========================================================================
   Global Low Balance Alert Banner (v0.14.159)
   Rendered via header partial on ALL SiteStaffr admin pages.
   ========================================================================== */

/* Base Alert Styling */
.sitestaffr-alert {
    padding: 16px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.sitestaffr-alert-content {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.sitestaffr-alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.sitestaffr-alert-text {
    flex: 1;
    min-width: 0;
}

.sitestaffr-alert-title {
    display: block;
    font-size: 15px;
    margin-bottom: 4px;
}

.sitestaffr-alert-message {
    margin: 0;
    font-size: 13px;
}

/* Global alert — sits between header and page content */
.sitestaffr-alert-global {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Warning Level — Yellow */
.sitestaffr-alert-warning {
    background: rgba(255, 249, 230, 0.6);
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.sitestaffr-alert-warning .sitestaffr-alert-icon {
    color: #ffc107;
}

.sitestaffr-alert-warning .sitestaffr-alert-button {
    background: transparent;
    border: 2px solid var(--sitestaffr-teal);
    color: var(--sitestaffr-teal);
    box-shadow: none;
}

.sitestaffr-alert-warning .sitestaffr-alert-button:hover {
    background: var(--sitestaffr-teal);
    color: #fff;
}

/* Low Level — Orange */
.sitestaffr-alert-low {
    background: rgba(255, 243, 224, 0.6);
    border: 1px solid rgba(255, 152, 0, 0.5);
}

.sitestaffr-alert-low .sitestaffr-alert-icon {
    color: #ff9800;
}

.sitestaffr-alert-low .sitestaffr-alert-button {
    background: #ff9800;
    border: none;
    color: #fff;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.sitestaffr-alert-low .sitestaffr-alert-button:hover {
    background: #f57c00;
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.4);
}

/* Critical Level — Red */
.sitestaffr-alert-critical {
    background: rgba(255, 235, 238, 0.5);
    border: 1px solid rgba(244, 67, 54, 0.5);
}

.sitestaffr-alert-critical .sitestaffr-alert-icon {
    color: #f44336;
}

.sitestaffr-alert-critical .sitestaffr-alert-title {
    text-transform: uppercase;
    font-weight: 700;
}

.sitestaffr-alert-critical .sitestaffr-alert-button {
    background: #f44336;
    border: none;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.sitestaffr-alert-critical .sitestaffr-alert-button:hover {
    background: #d32f2f;
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.4);
}

/* Alert Button Base */
.sitestaffr-alert-button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
}

.sitestaffr-alert-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sitestaffr-alert .sitestaffr-alert-button.sitestaffr-alert-button-secondary {
    background: transparent;
    border: 1px solid #0f766e;
    color: #0f766e;
    box-shadow: none;
    font-weight: 600;
    text-transform: none;
}

.sitestaffr-alert .sitestaffr-alert-button.sitestaffr-alert-button-secondary:hover {
    background: rgba(15, 118, 110, 0.08);
    border-color: #0f766e;
    color: #0f766e;
    box-shadow: none;
}

/* Dismiss button */
.sitestaffr-alert-dismiss {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.sitestaffr-alert-dismiss:hover {
    opacity: 1;
}

.sitestaffr-alert-dismiss .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

@media screen and (max-width: 1024px) {
    .sitestaffr-alert-content {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .sitestaffr-alert-actions {
        width: 100%;
    }
}

/* Alert checkout form — inline, no extra spacing */
.sitestaffr-alert-checkout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

/* Mobile Responsive - Alert */
@media screen and (max-width: 782px) {
    .sitestaffr-alert-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .sitestaffr-alert-button {
        width: 100%;
        margin-top: 8px;
        text-align: center;
    }

    .sitestaffr-alert-actions {
        width: 100%;
    }

    .sitestaffr-alert-dismiss {
        position: absolute;
        top: 8px;
        right: 8px;
    }

    .sitestaffr-alert-global {
        position: relative;
    }
}

/* ==========================================================================
   Dashboard — previously inline styles
   ========================================================================== */

/* Button reset for .sitestaffr-sidebar-button used on <button> elements */
button.sitestaffr-sidebar-button {
	width: 100%;
	cursor: pointer;
	font-family: inherit;
	font-size: inherit;
	color: var(--sitestaffr-text);
	background: #fff;
	text-align: left;
}

/* =========================================================
   Plan Alert Banner (canceled / trial_expired / unpaid / past_due)
   ========================================================= */
.sitestaffr-plan-alert-banner {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 16px;
	font-size: 14px;
	line-height: 1.5;
	position: relative;
}
.sitestaffr-plan-alert-banner.sitestaffr-plan-alert-warning {
	background: #fffbeb;
	border: 1px solid #fcd34d;
	color: #92400e;
}
.sitestaffr-plan-alert-banner.sitestaffr-plan-alert-danger {
	background: #fef2f2;
	border: 1px solid #fca5a5;
	color: #7f1d1d;
}
.sitestaffr-plan-alert-icon {
	flex-shrink: 0;
	font-size: 20px;
	line-height: 1;
}
.sitestaffr-plan-alert-warning .sitestaffr-plan-alert-icon {
	color: #f59e0b;
}
.sitestaffr-plan-alert-danger .sitestaffr-plan-alert-icon {
	color: #ef4444;
}
.sitestaffr-plan-alert-body {
	flex: 1;
}
.sitestaffr-plan-alert-body strong {
	display: block;
	margin-bottom: 2px;
	font-weight: 600;
}
.sitestaffr-plan-alert-cta {
	display: inline-block;
	margin-top: 6px;
	padding: 5px 14px;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	transition: opacity 0.15s ease;
}
.sitestaffr-plan-alert-warning .sitestaffr-plan-alert-cta {
	background: #f59e0b;
	color: #fff;
}
.sitestaffr-plan-alert-danger .sitestaffr-plan-alert-cta {
	background: #ef4444;
	color: #fff;
}
.sitestaffr-plan-alert-cta:hover {
	opacity: 0.85;
	color: #fff;
}
.sitestaffr-plan-alert-dismiss {
	flex-shrink: 0;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	opacity: 0.5;
	transition: opacity 0.15s ease;
	background: none;
	border: none;
	padding: 0;
	color: inherit;
}
.sitestaffr-plan-alert-dismiss:hover {
	opacity: 1;
}
