/* EsyConnect Smart Suggestions & Voice Search — front-end styles */

.esc-profile-status,
.esc-job-suggestions,
.esc-daily-tasks,
.esc-voice-search-wrap {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 16px 0;
    font-family: inherit;
}

.esc-progress-bar {
    background: #eee;
    border-radius: 20px;
    height: 14px;
    overflow: hidden;
    margin: 10px 0;
}

.esc-progress-fill {
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    height: 100%;
    transition: width 0.4s ease;
}

.esc-missing-fields li,
.esc-job-suggestions ul li,
.esc-daily-tasks ul li {
    list-style: none;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
}

.esc-missing-fields li:last-child,
.esc-job-suggestions ul li:last-child,
.esc-daily-tasks ul li:last-child {
    border-bottom: none;
}

.esc-match-score {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: #777;
}

.esc-task-clicked {
    opacity: 0.55;
    text-decoration: line-through;
}

/* Voice search */
.esc-voice-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.esc-voice-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 24px;
    border: 1px solid #ccc;
    font-size: 15px;
}

.esc-mic-btn,
.esc-search-submit-btn {
    border: none;
    background: #f1f1f1;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.esc-mic-btn:hover,
.esc-search-submit-btn:hover {
    background: #e0e0e0;
}

.esc-mic-btn.esc-listening {
    background: #ffcdd2;
    animation: esc-pulse 1s infinite;
}

@keyframes esc-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.esc-voice-status {
    font-size: 13px;
    color: #555;
    min-height: 18px;
    margin: 8px 0 0;
}

.esc-voice-results-list {
    margin: 10px 0 0;
    padding: 0;
}

.esc-voice-results-list li {
    list-style: none;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.esc-voice-results-list a {
    font-weight: 600;
    text-decoration: none;
}

.esc-result-excerpt {
    margin: 4px 0 0;
    font-size: 13px;
    color: #666;
}

/* Injected "Complete your profile" item inside the theme's
   "Admin tools" sidebar (pxp-dashboard-side-label) */
.esc-admin-tools-profile-item {
    margin-top: 4px;
}

.esc-admin-tools-profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.esc-status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.esc-status-dot.esc-status-incomplete {
    background: #f44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15);
}

.esc-status-dot.esc-status-complete {
    background: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* ==========================================================
   v2.3 — THE one floating button (mic + Support + EsyPoints +
   Talk-to-a-human), positioned above any bottom-fixed bar (WP
   mobile admin bar, theme mobile nav, etc.) via the
   --esc-safe-bottom custom property, recalculated at runtime in
   support-widget.js. Responsive across mobile / tablet / desktop
   below, and dismissible via #esc-support-dismiss / #esc-support-reopen.
   ========================================================== */

:root {
    --esc-safe-bottom: 20px;
    --esc-accent-1: #2962ff;
    --esc-accent-2: #7c3aed;
    --esc-btn-size: 56px;
}

#esc-support-btn {
    position: fixed;
    left: 20px;
    bottom: var(--esc-safe-bottom);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: linear-gradient(135deg, var(--esc-accent-1), var(--esc-accent-2));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 14px 20px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(41, 98, 255, 0.35);
    z-index: 99998;
    transition: transform 0.2s ease, box-shadow 0.2s ease, bottom 0.25s ease, opacity 0.25s ease;
}

#esc-support-btn .esc-support-btn-icon {
    font-size: 18px;
    line-height: 1;
}

#esc-support-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 26px rgba(41, 98, 255, 0.45);
}

/* Small points-balance pill riding on the button icon */
.esc-btn-points-badge {
    background: #fff;
    color: var(--esc-accent-2);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 2px;
}

/* Dismiss (×) control sitting on the button's top-right corner */
.esc-support-dismiss {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    color: #666;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

#esc-support-btn:hover .esc-support-dismiss,
#esc-support-btn:focus-within .esc-support-dismiss {
    opacity: 1;
    transform: scale(1);
}

.esc-support-dismiss:hover {
    background: #fdeaea;
    color: #c62828;
}

/* Whole button hidden after a visitor dismisses it */
#esc-support-btn.esc-btn-dismissed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(0.9);
}

/* Slim reopen tab left at the screen edge while dismissed */
#esc-support-reopen {
    position: fixed;
    left: 0;
    bottom: var(--esc-safe-bottom);
    background: linear-gradient(135deg, var(--esc-accent-1), var(--esc-accent-2));
    color: #fff;
    border: none;
    border-radius: 0 50px 50px 0;
    width: 30px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 99998;
    opacity: 0.85;
    transition: opacity 0.2s ease, width 0.2s ease;
}

#esc-support-reopen:hover {
    opacity: 1;
    width: 36px;
}

#esc-support-panel {
    position: fixed;
    left: 20px;
    bottom: calc(var(--esc-safe-bottom) + var(--esc-btn-size) + 12px);
    width: 320px;
    max-width: calc(100vw - 40px);
    max-height: 74vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid #eef0f4;
    z-index: 99998;
    font-family: inherit;
    transition: bottom 0.25s ease;
}

.esc-support-panel-header {
    background: linear-gradient(135deg, var(--esc-accent-1), var(--esc-accent-2));
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
}

.esc-support-panel-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.esc-support-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.esc-support-panel-body {
    padding: 14px 16px 16px;
}

.esc-support-section {
    margin-bottom: 14px;
}

.esc-support-section:last-child {
    margin-bottom: 0;
}

.esc-support-section h5 {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #888;
}

.esc-support-status {
    font-size: 13.5px;
    font-weight: 600;
    margin: 6px 0;
}

.esc-support-status.esc-support-complete {
    color: #2e7d32;
}

.esc-support-status.esc-support-incomplete {
    color: #c62828;
}

.esc-support-missing-label {
    font-size: 12.5px;
    color: #666;
    margin: 6px 0 2px;
}

.esc-support-missing-list {
    margin: 0 0 6px;
    padding-left: 18px;
    font-size: 12.5px;
    color: #444;
}

.esc-support-missing-list li {
    margin-bottom: 2px;
}

.esc-support-cta {
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.esc-support-loading {
    font-size: 13px;
    color: #777;
}

.esc-support-contact-list {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

.esc-support-contact-list li {
    padding: 4px 0;
    font-size: 13.5px;
}

.esc-support-contact-list a {
    text-decoration: none;
    font-weight: 600;
}

.esc-support-inline {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 16px 0;
}

/* EsyPoints balance section (only shown when a points plugin is active) */
.esc-support-points {
    background: linear-gradient(135deg, rgba(41, 98, 255, 0.06), rgba(124, 58, 237, 0.06));
    border-radius: 10px;
    padding: 10px 12px;
}

.esc-points-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.esc-points-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--esc-accent-2);
}

/* "Talk to a human" — live chat handoff */
.esc-support-human {
    background: #f7f8fc;
    border-radius: 10px;
    padding: 12px;
}

.esc-human-intro {
    font-size: 12.5px;
    color: #666;
    margin: 0 0 10px;
}

.esc-human-btn {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--esc-accent-1), var(--esc-accent-2));
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.esc-human-btn:hover {
    opacity: 0.9;
}

.esc-human-status {
    margin: 8px 0 0;
    font-size: 12px;
    color: #777;
    min-height: 14px;
}

/* ==========================================================
   Responsive: mobile / tablet / desktop
   ========================================================== */

/* Tablet */
@media (max-width: 1024px) {
    #esc-support-panel {
        width: 320px;
    }
}

/* Mobile phones — button shrinks slightly, panel becomes a
   near-full-width bottom sheet with a comfortable max height,
   and respects the device's safe-area inset (notches / home bar). */
@media (max-width: 600px) {
    #esc-support-btn {
        left: max(14px, env(safe-area-inset-left));
        bottom: calc(var(--esc-safe-bottom) + env(safe-area-inset-bottom, 0px));
        padding: 12px 16px;
        font-size: 13px;
    }

    #esc-support-btn .esc-support-btn-label {
        display: none; /* icon-only on very small screens to save space */
    }

    #esc-support-reopen {
        bottom: calc(var(--esc-safe-bottom) + env(safe-area-inset-bottom, 0px));
    }

    #esc-support-panel {
        left: 10px;
        right: 10px;
        width: auto;
        max-width: none;
        max-height: 78vh;
        bottom: calc(var(--esc-safe-bottom) + env(safe-area-inset-bottom, 0px) + 64px);
        border-radius: 16px;
    }
}

/* Small phones */
@media (max-width: 380px) {
    #esc-support-panel {
        left: 6px;
        right: 6px;
    }
}

/* ==========================================================
   v2.1 — Floating "Application Insights" (job probability)
   widget, single job pages, logged-in candidates only
   ========================================================== */

#esy-floating-widget {
    position: fixed;
    bottom: var(--esc-safe-bottom);
    right: 20px;
    width: 280px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    border: 1px solid #eaeaea;
    overflow: hidden;
    font-family: inherit;
    transition: bottom 0.2s ease;
}

.esy-widget-header {
    background: #0052cc;
    color: #fff;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esy-widget-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

#esy-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.esy-widget-body {
    padding: 15px;
}

.esy-metric {
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.esy-metric:last-child {
    margin-bottom: 0;
}

.esy-label {
    color: #666;
}

.esy-value {
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.esy-widget-disclaimer {
    margin: 10px 0 0;
    font-size: 11px;
    color: #999;
}

.prob-low { color: #d32f2f; background: #ffebee; }
.prob-medium { color: #f57c00; background: #fff3e0; }
.prob-high { color: #388e3c; background: #e8f5e9; }

.status-hiring { color: #2e7d32; font-weight: bold; }
.status-waiting { color: #c62828; font-weight: bold; }

#esy-widget-trigger {
    position: fixed;
    bottom: var(--esc-safe-bottom);
    right: 20px;
    background: #0052cc;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-weight: 600;
    z-index: 99999;
    font-size: 14px;
    transition: bottom 0.2s ease;
}

/* ==========================================================
   v2.0 — Voice Q&A, Voice Apply, Notifications, Dashboard
   ========================================================== */

.esc-job-voice-qa,
.esc-voice-apply,
.esc-candidate-voice-qa {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
}

.esc-job-qa-btn,
.esc-job-read-btn,
.esc-voice-apply-btn,
.esc-candidate-qa-btn,
.esc-candidate-read-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d7d7d7;
    background: #f7f7f7;
    border-radius: 24px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 8px 8px 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.esc-job-qa-btn:hover,
.esc-job-read-btn:hover,
.esc-voice-apply-btn:hover:not(:disabled),
.esc-candidate-qa-btn:hover,
.esc-candidate-read-btn:hover {
    background: #ececec;
}

.esc-voice-apply-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.esc-job-qa-btn.esc-listening,
.esc-voice-apply-btn.esc-listening,
.esc-candidate-qa-btn.esc-listening {
    background: #ffcdd2;
    animation: esc-pulse 1s infinite;
}

.esc-job-qa-status,
.esc-voice-apply-status,
.esc-candidate-qa-status,
.esc-dashboard-summary-status {
    font-size: 13px;
    color: #555;
    min-height: 18px;
    margin: 6px 0 0;
}

.esc-voice-apply-hint {
    font-size: 12px;
    color: #d32f2f;
    margin: 4px 0 0;
}

.esc-job-qa-transcript,
.esc-voice-apply-transcript,
.esc-candidate-qa-transcript {
    margin-top: 10px;
}

.esc-qa-line {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 0 0 8px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #333;
}

/* Notification bell */
.esc-notification-bell-wrap {
    position: relative;
    display: inline-block;
}

.esc-notification-bell-btn {
    position: relative;
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
}

.esc-notification-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #f44336;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    padding: 0 4px;
}

.esc-notification-panel {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    width: 320px;
    max-height: 380px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9998;
    padding: 8px;
}

.esc-notification-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 6px;
}

.esc-notification-item:last-child {
    border-bottom: none;
}

.esc-notification-unread {
    background: #f0f6ff;
}

.esc-notification-title {
    font-weight: 700;
    font-size: 13px;
}

.esc-notification-message {
    font-size: 12.5px;
    color: #555;
    margin-top: 2px;
}

.esc-notification-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.esc-notification-empty {
    padding: 16px;
    text-align: center;
    color: #888;
    font-size: 13px;
}

/* Dashboard voice summary */
.esc-voice-dashboard-summary {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 16px 0;
}

.esc-dashboard-summary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: #2962ff;
    color: #fff;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.esc-dashboard-summary-btn:hover {
    background: #1e4fd6;
}
