@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/manrope-300.ttf') format('truetype');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/manrope-400.ttf') format('truetype');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/manrope-500.ttf') format('truetype');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 600;
    src: url('../fonts/manrope-600.ttf') format('truetype');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/manrope-700.ttf') format('truetype');
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 800;
    src: url('../fonts/manrope-800.ttf') format('truetype');
}

/* Action Buttons */
.whleabt-action-sync-btn {
    margin-right: 5px;
}

#whleabt-generate-samples-btn {
    margin-left: 10px;
}

/* Spinner Styles */
.whleabt-spinner {
    float: none;
    margin: 0 5px;
    vertical-align: middle;
}

.whleabt-spinner.whleabt-is-active {
    display: inline-block;
}

/* Status Icons */
.whleabt-dashicons-yes {
    color: #46b450;
    vertical-align: middle;
}

.whleabt-dashicons-warning {
    color: #ffb900;
    vertical-align: middle;
}

/* --- ColorWhistle AI ChatBot Settings Redesign --- */

/* Reset & Variables */
.whleabt-settings-wrap {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1400px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.whleabt-settings-wrap * {
    box-sizing: border-box;
}

/* Banner */
.whleabt-banner {
    background: #0a1b32;
    /* Deep dark blue from reference */
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.whleabt-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.whleabt-logo-box {
    width: 44px;
    height: 44px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffca28;
    /* Yellow accent like the lightbulb in reference */
}

.whleabt-logo-box .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.whleabt-brand-text {
    display: flex;
    flex-direction: column;
}

.whleabt-brand .pluginHeading {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.whleabt-brand span {
    display: block;
    font-size: 9px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-top: 2px;
    opacity: 0.8;
}

/* Navigation inside dark banner */
.whleabt-nav {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.whleabt-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.whleabt-nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.whleabt-nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.whleabt-nav-item.whleabt-nav-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.whleabt-nav-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Main Content */
.whleabt-main {
    flex: 1;
    background: #f8fafc;
    /* Slightly cleaner off-white */
    padding: 40px;
    overflow-y: auto;
}

.whleabt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.whleabt-header .pageHeading,
.whleabt-main .wp-heading-inline {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #111;
    letter-spacing: -0.02em;
    line-height: 1.5;
}

.whleabt-header p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

/* Custom Success Notice */
.whleabt-save-notice {
    margin-top: 20px;
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: whleabt-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.whleabt-save-notice .dashicons {
    color: #10b981;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.whleabt-save-notice div {
    display: flex;
    flex-direction: column;
}

.whleabt-save-notice strong {
    color: #065f46;
    font-size: 14px;
    line-height: 1.2;
}

.whleabt-save-notice span {
    color: #047857;
    font-size: 12px;
}

@keyframes whleabt-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.whleabt-actions {
    display: flex;
    gap: 12px;
}

.whleabt-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: none;
}

.whleabt-btn-secondary {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #374151;
}

.whleabt-btn-secondary:hover {
    background: #f9fafb;
}

.whleabt-btn-primary,
.whleabt-btn-primary:visited,
.whleabt-btn-primary:focus,
.whleabt-btn-primary:active {
    background: #2271b1;
    color: #fff;
    box-shadow: none;
    border: 1px solid #2271b1;
}

.whleabt-btn-primary:hover,
.whleabt-btn-primary:visited:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.whleabt-btn-danger,
.whleabt-btn-danger:visited,
.whleabt-btn-danger:focus,
.whleabt-btn-danger:active {
    background: #dc2626;
    color: #fff;
    box-shadow: none;
    border: 1px solid #b91c1c;
}

.whleabt-btn-danger:hover,
.whleabt-btn-danger:visited:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #fff;
}

/* Button Loading State */
.whleabt-btn.whleabt-is-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.whleabt-btn.whleabt-is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: whleabt-spin 0.8s linear infinite;
}

@keyframes whleabt-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Section Cards */
.whleabt-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(230, 45, 45, 0.05);
    margin-bottom: 32px;
    overflow: visible;
    /* Changed from hidden to prevent tooltip clipping */
}

.whleabt-card-header {
    padding: 24px;
    border-bottom: 1px solid rgba(230, 45, 45, 0.05);
    background: rgba(249, 250, 251, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    border-top-left-radius: 16px;
    /* Retain border radius style when overflow is visible */
    border-top-right-radius: 16px;
}

.whleabt-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whleabt-card-body {
    padding: 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.whleabt-card-body.single-col {
    grid-template-columns: 1fr;
}

/* Form Fields */
.whleabt-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whleabt-field.full-width {
    grid-column: 1 / -1;
}

.whleabt-label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    display: block;
}

.whleabt-input-wrapper {
    position: relative;
    width: 100%;
}

.whleabt-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(244, 240, 240, 0.5);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #111;
    outline: none;
    transition: all 0.2s;
}

.whleabt-input:focus {
    background: #fff;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.whleabt-description {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}

textarea.whleabt-input {
    min-height: 120px;
    resize: vertical;
}

.whleabt-lead-thank-you-field {
    margin-top: 24px;
}

.whleabt-lead-thank-you-editor .wp-editor-wrap {
    margin-top: 8px;
}

/* Stats Grid */
.whleabt-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.whleabt-stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(230, 45, 45, 0.05);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.whleabt-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.whleabt-stat-value {
    font-size: 24px;
    font-weight: 900;
    color: #111;
}

.whleabt-stat-value span {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
}

.whleabt-icon-box {
    margin-bottom: 8px;
    color: #e62d2d;
    font-size: 24px;
    /* dashicon size support */
}

/* Footer */
.whleabt-footer {
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 30px;
}

.whleabt-footer p {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
}

.whleabt-settings-wrap .form-table {
    display: none;
}

.whleabt-settings-wrap .submit {
    display: none;
}

/* Restore native visibility for list table elements */
.whleabt-main .pluginHeading {
    display: block !important;
}

.whleabt-main p {
    display: block !important;
}

/* Standard WordPress pagination will use core styles */

/* Material Symbol placeholder using dashicons for simplicity or import font */
.whleabt-settings-wrap .dashicons {
    vertical-align: middle;
}

.whleabt-settings-wrap .whleabt-sync-actions {
    display: flex;
    align-items: center;
}

.whleabt-header .pageHeading {
    margin: 0;
}

/* Chat History admin layout */
.whleabt-chat-history-wrap {
    max-width: 100%;
    box-sizing: border-box;
}

.whleabt-chat-history-wrap .whleabt-header {
    margin-bottom: 24px;
}

.whleabt-chat-history-settings-card {
    margin-bottom: 24px;
}

.whleabt-chat-history-settings-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    text-align: right;
}

.whleabt-chat-history-settings-header {
    align-items: flex-start;
}

.whleabt-chat-history-settings-header .whleabt-card-header-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.whleabt-chat-history-settings-header .whleabt-card-header-content h3 {
    margin: 0;
}

.whleabt-chat-history-retention-summary {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    font-weight: 400;
}

.whleabt-chat-history-retention-summary[hidden] {
    display: none !important;
}

.whleabt-cleanup-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-direction: column;
    margin-bottom: 20px;
}

.whleabt-cleanup-toggle-label {
    margin: 0;
}

.whleabt-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.whleabt-switch-wrap {
    display: inline-flex;
    align-items: center;
}

.whleabt-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.whleabt-switch-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.whleabt-switch-slider {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    background: #d1d5db;
    border-radius: 999px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.whleabt-switch-slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.whleabt-switch-input:focus-visible+.whleabt-switch-slider {
    outline: 2px solid #e62d2d;
    outline-offset: 2px;
}

.whleabt-switch-input:checked+.whleabt-switch-slider {
    background: #e62d2d;
}

.whleabt-switch-input:checked+.whleabt-switch-slider::before {
    transform: translateX(24px);
}

.whleabt-switch-state {
    min-width: 32px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.02em;
}

.whleabt-delete-all-form {
    margin: 0;
}

.whleabt-delete-all-btn {
    white-space: nowrap;
}

.whleabt-chat-history-wrap .column-cb {
    width: 2.2em;
}

.whleabt-chat-history-table-card {
    overflow: hidden;
}

.whleabt-chat-history-table-body {
    padding: 20px !important;
}

.whleabt-chat-history-table-scroll {
    overflow-x: auto;
    max-width: 100%;
}

.whleabt-chat-history-wrap .wp-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

.whleabt-chat-history-wrap .column-id {
    width: 60px;
}

.whleabt-chat-history-wrap .column-created_at,
.whleabt-chat-history-wrap .column-updated_at {
    width: 170px;
}

.whleabt-chat-history-wrap .column-actions {
    width: 120px;
}

.whleabt-chat-history-wrap .column-conversation {
    width: auto;
    min-width: 280px;
}

.whleabt-chat-history-meta {
    margin-top: 10px;
    color: #666;
}

/* Chat History conversation formatting */
.whleabt-conversation-cell {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.whleabt-conversation-preview-cell {
    color: #374151;
}

.whleabt-conversation-preview-cell .whleabt-conversation-line {
    margin: 0 0 8px;
}

.whleabt-conversation-preview-cell .whleabt-conversation-line:last-child {
    margin-bottom: 0;
}

.whleabt-conversation-preview-cell .whleabt-conversation-line strong {
    font-weight: 700;
    color: #111827;
}

.whleabt-chat-history-back-wrap {
    margin: 0 0 20px;
}

.whleabt-chat-history-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.whleabt-conversation-line {
    margin: 0 0 12px;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.whleabt-conversation-line:last-child {
    margin-bottom: 0;
}

.whleabt-conversation-line strong {
    font-weight: 700;
}

.whleabt-chat-history-view-card {
    overflow: hidden;
}

.whleabt-chat-history-view-header {
    padding: 24px 32px 0;
    border-bottom: 1px solid rgba(230, 45, 45, 0.05);
    background: rgba(249, 250, 251, 0.5);
}

.whleabt-chat-history-view-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #111;
}

.whleabt-chat-history-view-meta {
    margin: 0 0 20px;
    font-size: 13px;
    color: #6b7280;
}

.whleabt-chat-history-view-body {
    padding: 24px 32px 32px !important;
    background: #f3f4f6;
}

.whleabt-chat-history-view-scroll {
    max-height: min(520px, 60vh);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-right: 12px;
    box-sizing: border-box;
}

.whleabt-chat-history-view-scroll::-webkit-scrollbar {
    width: 8px;
}

.whleabt-chat-history-view-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.whleabt-chat-history-view-scroll::-webkit-scrollbar-thumb {
    background: #c1c7d0;
    border-radius: 999px;
}

.whleabt-chat-history-view-scroll::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.whleabt-chat-thread {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    box-sizing: border-box;
    padding-right: 4px;
}

.whleabt-chat-message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    gap: 4px;
}

.whleabt-chat-message-user {
    align-self: flex-end;
    align-items: flex-end;
    max-width: calc(75% - 12px);
}

.whleabt-chat-message-ai {
    align-self: flex-start;
    align-items: flex-start;
}

.whleabt-chat-message-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.whleabt-chat-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.whleabt-chat-bubble-user {
    background: #e62d2d;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.whleabt-chat-bubble-ai {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

@media (max-width: 782px) {
    .whleabt-chat-message {
        max-width: 90%;
    }

    .whleabt-chat-history-view-header,
    .whleabt-chat-history-view-body {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .whleabt-chat-history-view-scroll {
        max-height: min(420px, 55vh);
        padding-right: 10px;
    }

    .whleabt-chat-message-user {
        max-width: calc(90% - 10px);
    }
}

/* --- Tooltips Styling --- */
.whleabt-label-with-tooltip,
.whleabt-header-with-tooltip {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    gap: 6px !important;
}

.whleabt-tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 0;
    vertical-align: middle;
}

.dashicons-editor-help.whleabt-tooltip-icon,
.whleabt-settings-wrap .dashicons-editor-help {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #9ca3af;
    transition: color 0.2s ease;
    display: inline-block;
    line-height: 1;
    left: 0;
    top: 0;
    cursor: pointer !important;
}

.whleabt-tooltip-container:hover .whleabt-tooltip-icon {
    color: #374151;
}

.whleabt-tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #1f2937;
    color: #ffffff;
    text-align: left;
    border-radius: 6px;
    padding: 12px 14px;
    position: absolute;
    z-index: 99999;
    /* Float above other fields */
    bottom: 130%;
    left: -10px;
    /* Align to the left of the icon */
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    white-space: normal;
    word-wrap: break-word;
    transform: translateY(4px);
}

.whleabt-tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 18px;
    /* Align arrow with the icon at the left */
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.whleabt-tooltip-container:hover .whleabt-tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.whleabt-tooltip-text strong {
    color: #f9fafb;
    font-weight: 700;
}

.whleabt-tooltip-text em {
    color: #d1d5db;
    font-style: italic;
}

@media (max-width: 480px) {
    .whleabt-tooltip-text {
        width: 220px;
        left: -15px;
    }

    .whleabt-tooltip-text::after {
        left: 23px;
    }
}

/* --- Disabled State Styling --- */
.whleabt-card-body.whleabt-lead-disabled {
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

/* --- Disabled Notification Fields --- */
.whleabt-field.whleabt-field-disabled {
    opacity: 0.5;
}

.whleabt-field.whleabt-field-disabled,
.whleabt-field.whleabt-field-disabled * {
    cursor: not-allowed !important;
}

/* --- Repeater UI Improvements --- */
#whleabt-lead-questions-wrapper {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
}

#whleabt-lead-questions-wrapper th {
    text-align: left;
    padding: 0 12px 12px 0;
    font-weight: 700;
    font-size: 13px;
    color: #4b5563;
    border-bottom: 2px solid #f3f4f6;
}

.whleabt-lead-question-row td {
    padding: 12px 12px 12px 0;
    vertical-align: middle;
}

.whleabt-lead-question-row td:first-child {
    width: 180px;
}

.whleabt-lead-row-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

/* Add Question Button */
.whleabt-add-question-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px dashed #d1d5db;
    color: #4b5563;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 15px;
}

.whleabt-add-question-btn:hover {
    border-color: #e62d2d;
    color: #e62d2d;
    background: #fff8f8;
}

.whleabt-add-question-btn:focus-visible {
    outline: 2px solid #e62d2d;
    outline-offset: 2px;
}

.whleabt-add-question-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Delete Question Button */
.whleabt-remove-question-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border: 1px solid #fecaca;
    color: #ef4444;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.whleabt-remove-question-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.whleabt-remove-question-btn:focus-visible {
    outline: 2px solid #ef4444;
    outline-offset: 2px;
}

.whleabt-remove-question-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}



/* Key Status Label */
.whleabt-key-status {
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.whleabt-key-status.green {
    color: #10b981;
}

.whleabt-key-status.green .dashicons {
    color: #10b981;
}

/* Form Builder Styling */
.whleabt-form-builder {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.whleabt-step-card {
    background: #fdfdfd;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.whleabt-step-header {
    background: #e62d2dc7;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.whleabt-drag-handle {
    cursor: grab;
    color: rgba(255, 255, 255, 0.8);
    margin-right: 8px;
}

.whleabt-drag-handle:active {
    cursor: grabbing;
}

.whleabt-step-number {
    font-weight: 600;
    color: #ffffff;
    flex: 1;
}

.whleabt-remove-step-btn {
    opacity: 0.8;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.whleabt-remove-step-btn:hover {
    opacity: 1;
}

.whleabt-step-body {
    padding: 16px;
}

.whleabt-step-settings {
    margin-bottom: 16px;
}

.whleabt-fields-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

.whleabt-field-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    gap: 12px;
}

.whleabt-field-drag-handle {
    cursor: grab;
    color: #d1d5db;
}

.whleabt-field-drag-handle:hover {
    color: #9ca3af;
}

.whleabt-field-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    flex-wrap: wrap;
}

.whleabt-field-inputs input[type="text"],
.whleabt-field-inputs select {
    flex: 1;
    min-width: 150px;
}

.whleabt-field-inputs .whleabt-field-options {
    flex: 0 0 100% !important;
    width: 100% !important;
    margin-top: 8px !important;
}

.whleabt-required-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.whleabt-remove-field-btn {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.whleabt-remove-field-btn:hover {
    opacity: 1;
}

/* Custom Extracted CSS from template inline styles */
.whleabt-card-header .dashicons {
    color: #e62d2d;
}

.whleabt-required {
    color: red;
}

.whleabt-label a {
    font-size: 12px;
    font-weight: normal;
    margin-left: 5px;
}

.whleabt-field-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.whleabt-key-status .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.whleabt-label-note {
    font-size: 11px;
    font-weight: normal;
    color: #666;
}

.whleabt-connection-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

#whleabt-test-connection {
    background: #f0f0f1;
    border-color: #8c8f94;
    color: #2c3338;
}

#whleabt-test-connection .dashicons {
    margin-top: 4px;
}

#whleabt-test-status {
    font-weight: 500;
}

.whleabt-field p.description {
    margin-top: 5px;
    font-size: 12px;
}

.whleabt-color-pickers-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    margin-top: 5px;
}

.whleabt-color-picker-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.whleabt-color-picker-label {
    font-size: 11px;
    color: #666;
    font-weight: 600;
}

.whleabt-color-input {
    height: 36px;
    width: 60px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.whleabt-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
}

.whleabt-checkbox-label span {
    font-size: 12px;
}

.whleabt-input-number {
    width: 100px;
}

.whleabt-range-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.whleabt-range-input {
    width: 200px;
    padding: 0;
}

.whleabt-range-value {
    font-weight: bold;
    width: 30px;
}

.whleabt-post-types-list {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.whleabt-post-types-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.whleabt-post-types-list label span {
    font-size: 13px;
}

.whleabt-description.block {
    margin-top: 10px;
    display: block;
}

.whleabt-actions-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.whleabt-btn-submit {
    padding: 12px 24px;
    font-size: 16px;
}

.whleabt-settings-wrap .nav-tab-wrapper {
    margin-bottom: 20px;
}

.whleabt-lead-disabled-notice-container {
    padding: 24px 32px 0;
    display: none;
}

#whleabt-lead-disabled-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    color: #b45309;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

#whleabt-lead-disabled-notice .dashicons {
    color: #f59e0b;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Sync Table status colors */
.whleabt-text-synced {
    color: #46b450;
}

.whleabt-text-needs-sync {
    color: #d63638;
}

.whleabt-dashicons-needs-sync {
    color: #d63638;
    vertical-align: middle;
}

.whleabt-action-delete-btn {
    color: #a00 !important;
    border-color: #a00 !important;
}

.whleabt-action-delete-btn:hover {
    background: #f1f1f1 !important;
}

.whleabt-spinner-compact {
    float: none !important;
    margin: 0 !important;
}

#whleabt-sync-filter,
#whleabt-per-page,
#whleabt-chat-history-per-page {
    float: none !important;
}

#whleabt-per-page {
    margin-left: 5px;
}

/* Knowledge Base Page Custom Classes */
#whleabt-bulk-status {
    margin-left: 10px;
    font-weight: bold;
    color: #e62d2d;
}

.wrap>p.whleabt-intro {
    margin-bottom: 20px;
    color: #666;
}

.whleabt-config-warning {
    background: #fff;
    border-left: 4px solid #f8d7da;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.whleabt-config-warning h3 {
    color: #721c24;
    margin-top: 0;
}

#whleabt-sync-progress-wrap {
    display: none;
    background: #fff;
    padding: 15px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    margin: 20px 0;
}

.whleabt-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
}

#whleabt-stop-sync-btn {
    margin-left: 10px;
    color: #d63638;
    border-color: #d63638;
}

#whleabt-stop-sync-btn:hover {
    background: #fdf2f2;
    border-color: #d63638;
    color: #d63638;
}

.whleabt-progress-bar-wrap {
    width: 100%;
    height: 10px;
    background: #f0f0f1;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

#whleabt-progress-bar {
    height: 100%;
    background: #2271b1;
    transition: width 0.3s ease;
}

.whleabt-progress-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #646970;
}

.whleabt-section-divider {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

/* Lead Page Styles */
.whleabt-lead-info-card {
    margin-top: 30px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    font-family: 'Manrope', sans-serif;
}

.whleabt-lead-info-header {
    background: #ffffff;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.whleabt-lead-info-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whleabt-lead-info-icon {
    color: #6366f1;
    font-size: 20px;
    width: auto;
    height: auto;
    margin: 0;
}

.whleabt-lead-info-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.whleabt-lead-info-badge {
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whleabt-lead-info-badge-icon {
    font-size: 12px;
    width: auto;
    height: auto;
    margin: 0;
}

.whleabt-lead-info-body {
    padding: 24px;
    background: #f8fafc;
}

.whleabt-lead-submission-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.whleabt-lead-qa-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.whleabt-lead-qa-row.no-border {
    border-bottom: none;
    padding-bottom: 0;
}

.whleabt-lead-question {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
    width: 35%;
    min-width: 180px;
    flex-shrink: 0;
    line-height: 1.5;
}

.whleabt-lead-answer-wrapper {
    flex: 1;
}

.whleabt-lead-answer {
    color: #0f172a;
    font-size: 14px;
    font-weight: 500;
    background: #f8fafc;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: inline-block;
    word-break: break-all;
}

.whleabt-lead-email-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1.5px solid rgba(79, 70, 229, 0.2);
    transition: all 0.2s ease;
}

.whleabt-lead-email-link:hover {
    border-bottom-color: #4f46e5;
}

.whleabt-lead-btn-primary {
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
}

.whleabt-lead-not-found {
    color: #94a3b8;
    font-size: 13px;
    font-style: italic;
}

/* Extra Form Builder extracted styles */
.whleabt-step-header {
    cursor: pointer;
}

.whleabt-remove-step-btn {
    margin-left: auto;
}

.whleabt-remove-step-btn .dashicons {
    color: #ffffff;
    margin-top: 2px;
}

/* --- API Access Page Styling --- */
.whleabt-api-notice-container {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.whleabt-api-notice-icon {
    color: #16a34a;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.whleabt-api-notice-content h4 {
    margin: 0 0 4px 0;
    color: #166534;
    font-size: 16px;
    font-weight: 700;
}

.whleabt-api-notice-content p {
    margin: 0 0 12px 0;
    color: #1f2937;
    font-size: 14px;
}

.whleabt-api-key-display-box {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 14px;
    color: #111827;
    gap: 12px;
    word-break: break-all;
}

.whleabt-api-key-display-box button {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background-color 0.2s;
}

.whleabt-api-key-display-box button:hover {
    background: #374151;
}

.whleabt-api-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.whleabt-api-info-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.whleabt-api-info-label {
    font-size: 12px;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 6px;
}

.whleabt-api-info-value {
    font-size: 15px;
    color: #0f172a;
    font-weight: 600;
    word-break: break-all;
}

.whleabt-api-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.whleabt-api-table th {
    text-align: left;
    padding: 12px 16px;
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid #e2e8f0;
}

.whleabt-api-table td {
    padding: 14px 16px;
    color: #334155;
    font-size: 13px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.whleabt-api-table tr:hover td {
    background: #f8fafc;
}

.whleabt-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.whleabt-status-badge.active {
    background: #dcfce7;
    color: #15803d;
}

.whleabt-status-badge.disabled {
    background: #f1f5f9;
    color: #64748b;
}

.whleabt-action-links {
    display: flex;
    gap: 12px;
}

.whleabt-action-link {
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: color 0.2s;
}

.whleabt-action-link.toggle {
    color: #4f46e5;
}

.whleabt-action-link.toggle:hover {
    color: #3730a3;
}

.whleabt-action-link.regenerate {
    color: #d97706;
}

.whleabt-action-link.regenerate:hover {
    color: #b45309;
}

.whleabt-action-link.delete {
    color: #ef4444;
}

.whleabt-action-link.delete:hover {
    color: #dc2626;
}

/* --- Copy Endpoint Button --- */
.whleabt-copy-endpoint-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    margin-left: 8px;
    padding: 2px;
    vertical-align: middle;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.whleabt-copy-endpoint-btn:hover {
    color: #4f46e5;
}

.whleabt-copy-endpoint-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* --- Redesigned 2-row Connection Details Card --- */
.card-api-connection-details {
    margin-bottom: 24px;
}

.whleabt-api-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whleabt-api-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
}

.whleabt-api-value {
    font-size: 15px;
    color: #0f172a;
    font-weight: 600;
    word-break: break-all;
}

.whleabt-api-value code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    font-family: monospace;
    font-weight: 500;
}

/* Responsive Table Scrollbar Fix scoped to API Access page */
.whleabt-api-access-page .whleabt-main {
    overflow-x: hidden !important;
}

/* Pulsing Status Dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.pulse-dot::after {
    content: '';
    width: 100%;
    height: 100%;
    background-color: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    animation: stat-pulse 2s infinite ease-in-out;
}

@keyframes stat-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Developer Security Notice */
.whleabt-api-security-notice {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
}

.whleabt-api-security-notice .security-icon {
    color: #d97706;
    font-size: 24px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.whleabt-api-security-notice .security-content {
    color: #78350f;
    font-size: 13px;
    line-height: 1.5;
}

.whleabt-api-security-notice .security-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.whleabt-api-security-notice .security-content p {
    margin: 0;
}

/* API Access Action Button Links in Table */
.whleabt-action-link-btn {
    display: inline-flex;
    align-items: unset;
    gap: 4px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.whleabt-action-link-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Toggle Disable Button style */
.whleabt-action-link-btn.btn-toggle.disable {
    color: #d97706;
    background: #fffbeb;
    border-color: #fde68a;
}

.whleabt-action-link-btn.btn-toggle.disable:hover {
    color: #ffffff;
    background: #d97706;
    border-color: #d97706;
}

/* Toggle Enable Button style */
.whleabt-action-link-btn.btn-toggle.enable {
    color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.whleabt-action-link-btn.btn-toggle.enable:hover {
    color: #ffffff;
    background: #16a34a;
    border-color: #16a34a;
}

/* Regenerate Button style */
.whleabt-action-link-btn.btn-regenerate {
    color: #2563eb;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.whleabt-action-link-btn.btn-regenerate:hover {
    color: #ffffff;
    background: #2563eb;
    border-color: #2563eb;
}

/* Delete Button style */
.whleabt-action-link-btn.btn-delete {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.whleabt-action-link-btn.btn-delete:hover {
    color: #ffffff;
    background: #dc2626;
    border-color: #dc2626;
}

/* Badge Dot Indicator in Table */
.whleabt-status-badge .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}

.whleabt-status-badge.active .status-dot {
    background: #10b981;
}

.whleabt-status-badge.disabled .status-dot {
    background: #94a3b8;
}

.whleabt-status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.whleabt-status-badge.disabled {
    background: #f1f5f9;
    color: #475569;
}

/* --- Sample Code Integration Card --- */
.whleabt-copy-sample-code-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.whleabt-copy-sample-code-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.whleabt-code-sample-box {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

.whleabt-code-sample-box pre,
.whleabt-code-sample-box code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

/* --- Code Tabs Styling --- */
.whleabt-code-tabs {
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.whleabt-tab-btn {
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-bottom: -2px;
}

.whleabt-tab-btn:hover {
    color: #4f46e5;
}

.whleabt-tab-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
    font-weight: 700;
}

/* Reduce the Sync list table Type column width by 50% */
.wp-list-table th.column-type,
.wp-list-table td.column-type {
    width: 6% !important;
}

.whleabt-chat-message-event {
    align-self: center !important;
    align-items: center !important;
    max-width: 100% !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin: 0 !important;
    text-align: center !important;
}

.whleabt-chat-event-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.4 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 16px !important;
    border-radius: 30px !important;
    background: #f8fafc !important;
    display: inline-block !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) !important;
}

.whleabt-chat-event-text-default {
    color: #64748b !important;
}

.whleabt-chat-event-text-partial {
    color: #d97706 !important;
}

.whleabt-chat-event-text-completed {
    color: #16a34a !important;
}

.whleabt-chat-event-text-closed {
    color: #ef4444 !important;
}

.whleabt-chat-event-text-limit {
    color: #b91c1c !important;
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

.whleabt-chat-event-text-geo {
    color: #64748b !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

.whleabt-geo-label {
    color: #2563eb !important;
    font-weight: 700 !important;
}

.whleabt-geo-sep {
    color: #cbd5e1 !important;
    margin: 0 8px !important;
    font-weight: 400 !important;
}

.whleabt-chat-bubble-ai-error {
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
    background-color: #fef2f2 !important;
}

.whleabt-retention-highlight {
    color: #d63638 !important;
}

.whleabt-retention-block {
    display: block !important;
    text-align: left !important;
    margin-top: 5px !important;
}

.whleabt-retention-meta {
    display: block !important;
    margin-bottom: 12px !important;
    font-size: 13px !important;
    color: #50575e !important;
}

.whleabt-retention-value {
    font-weight: 600 !important;
    color: #1d2327 !important;
}

.whleabt-field-input-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 150px;
}

.whleabt-field-inputs .whleabt-options-group {
    flex: 1 1 75% !important;
    min-width: 250px;
    margin-top: 8px !important;
}

.whleabt-field-input-group-label {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Redesigned Content CSS Selectors table styling --- */
#whleabt-content-css-selectors-container {
    margin-top: 20px;
    max-width: 50%;
}

#whleabt-content-css-selectors-container .whleabt-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

#whleabt-content-css-selectors-container .whleabt-label .dashicons-editor-help {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    color: #8c8f94;
}

.whleabt-selectors-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    margin-bottom: 12px;
}

.whleabt-selectors-table thead tr {
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.whleabt-selectors-table th {
    font-size: 13px;
    padding: 10px 14px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: #475569;
}

.whleabt-selectors-table th.col-type {
    width: 30%;
}

.whleabt-selectors-table th.col-selector {
    width: 70%;
}

.whleabt-selector-row {
    border-bottom: 1px solid #f1f5f9;
}

.whleabt-selector-row td {
    padding: 12px 14px;
    vertical-align: middle;
}

.whleabt-selector-row td.col-label {
    color: #1e293b;
    font-weight: 500;
}

.whleabt-selector-input {
    width: 100%;
}

.whleabt-selector-error {
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    display: none;
    margin-top: 4px;
}

.whleabt-description-block {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
    display: block;
}

/* API Access View Styles to replace inline styles */
.whleabt-logo-box {
    background: #4f46e5;
}

.whleabt-logo-box .dashicons-admin-network {
    color: #ffffff;
}

/* Field Errors and Form Labels */
.whleabt-field-error {
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    display: block;
    margin-top: 4px;
}

.whleabt-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whleabt-label .dashicons-editor-help {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    color: #8c8f94;
}

.whleabt-card-body.single-col {
    display: block;
    width: 100%;
}

.whleabt-card-body.single-col.padded {
    padding: 24px;
}

.whleabt-card-body.single-col.no-padding {
    padding: 0;
}

.whleabt-create-key-fields {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    max-width: 800px;
}

.whleabt-create-key-fields .field-input-box {
    flex: 1;
}

.card-create-key {
    margin-top: 24px;
}

.whleabt-api-row {
    margin-top: 16px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
}

.whleabt-api-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.whleabt-api-value.primary {
    font-weight: 600;
    color: #4f46e5;
}

.whleabt-label.block {
    margin-bottom: 8px;
    display: block;
}

.whleabt-input.full-width {
    width: 100%;
}

.btn-api-submit {
    padding: 11px 24px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-keys-table {
    margin-top: 24px;
}

.card-keys-table .whleabt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.card-keys-table .whleabt-card-header .header-title-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-keys-table .whleabt-card-header h3 {
    margin: 0;
    display: inline-block;
}

.whleabt-header-badge {
    background: #e0f2fe;
    color: #0369a1;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.whleabt-no-keys-placeholder {
    padding: 48px;
    text-align: center;
    color: #64748b;
}

.whleabt-no-keys-placeholder .dashicons-lock {
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    color: #cbd5e1;
}

.whleabt-no-keys-placeholder p {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
}

.whleabt-api-table th.actions-col,
.whleabt-api-table td.actions-col {
    text-align: right;
}

.whleabt-api-table td.key-name-col {
    font-weight: 600;
    color: #0f172a;
}

.whleabt-api-table td code {
    font-size: 13px;
    letter-spacing: 1px;
}

.whleabt-action-links {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.card-sample-code {
    margin-top: 24px;
}

.whleabt-tab-content p.sample-desc {
    margin-top: 0;
    color: #475569;
    font-size: 13px;
}

.whleabt-code-sample-box {
    position: relative;
    background: #0f172a;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.whleabt-code-sample-box pre {
    margin: 0;
    font-family: monospace;
    font-size: 13px;
    color: #38bdf8;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.whleabt-copy-sample-code-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 4px;
    padding: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

/* Knowledge base page custom alert/button styles */
.page-title-action.btn-danger {
    color: #a00 !important;
    border-color: #a00 !important;
}

.page-title-action.btn-danger:hover {
    background: #fdf2f2 !important;
}

.page-title-action.btn-info {
    color: #0369a1 !important;
    border-color: #0369a1 !important;
}

.page-title-action.btn-info:hover {
    background: #f0f9ff !important;
}

.notice.whleabt-sync-notice-error {
    position: relative;
    margin-left: 0;
    margin-top: 15px;
    border-left-color: #dc2626;
    padding: 12px 15px;
}

.whleabt-notice-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: none;
    color: #9ca3af;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

.whleabt-notice-dismiss:hover {
    color: #dc2626;
}

.notice.whleabt-sync-notice-error h3 {
    margin-top: 0;
    color: #dc2626;
}

.notice.whleabt-sync-notice-error p {
    font-size: 14px;
    line-height: 1.5;
}

.notice.whleabt-sync-notice-error code {
    display: block;
    padding: 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    margin: 8px 0;
    border-radius: 4px;
    overflow-x: auto;
}

.notice.whleabt-sync-notice-error .troubleshoot-title-box {
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

.notice.whleabt-sync-notice-error ul.disc-list {
    list-style-type: disc;
    margin-left: 20px;
    margin-top: 5px;
}

.notice.whleabt-sync-notice-error ul.circle-list {
    list-style-type: circle;
    margin-left: 20px;
    margin-top: 5px;
}

.whleabt-color-input {
    height: 36px;
    width: 80px;
    padding: 0;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}

.whleabt-text-error {
    color: #dc2626;
    font-weight: 500;
}

.whleabt-text-excluded {
    color: #d97706;
    font-weight: 500;
}

/* Lead Management Form Builder & Notification Styles */
.whleabt-settings-wrap .whleabt-header {
    margin-top: 12px;
}

textarea.whleabt-input.monospace {
    width: 100%;
    font-family: monospace;
}

.whleabt-field-input-group.whleabt-required-group {
    flex: 0;
    min-width: auto;
    align-self: flex-end;
    margin-bottom: 8px;
}

.whleabt-remove-field-btn {
    padding: 6px 10px;
}

.whleabt-remove-field-btn .dashicons-trash {
    color: #dc3232;
    margin-top: 2px;
}

.whleabt-remove-step-btn {
    margin-left: auto;
}

.whleabt-remove-step-btn .dashicons-trash {
    color: #ffffff;
    margin-top: 2px;
}

.whleabt-btn .dashicons-plus,
.whleabt-add-field-btn .dashicons-plus {
    margin-top: 3px;
}

#whleabt-add-step-btn {
    margin-top: 16px;
}

.whleabt-step-header {
    cursor: pointer;
}

.whleabt-actions-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.whleabt-actions-footer button[type="submit"] {
    padding: 12px 24px;
    font-size: 16px;
}

.whleabt-card-header .dashicons-email {
    color: #e62d2d;
}

.whleabt-field .toggle-switch-wrapper {
    margin-top: 5px;
}

.whleabt-cron-next-run {
    margin-top: 8px;
    font-size: 13px;
    color: #3b82f6;
    font-weight: 500;
}

.whleabt-select-mode-group,
.whleabt-options-group {
    display: none;
}

#whleabt-sync-errors-console {
    margin-top: 15px;
    padding: 12px;
    background: #fff1f2;
    border: 1px solid #fda4af;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    color: #9f1239;
    text-align: left;
}

#whleabt-sync-errors-console ul {
    margin: 8px 0 0 15px;
    list-style-type: disc;
}

.whleabt-action-delete-btn {
    color: #a00 !important;
    border-color: #a00 !important;
    margin-left: 4px !important;
}

.whleabt-action-delete-btn:hover {
    background: #fdf2f2 !important;
}

.notice.notice-error.inline.whleabt-step-error {
    margin: 10px 0 15px 0;
    border-left-color: #dc3232;
}

.whleabt-action-delete-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Field validation error spans — hidden by default, shown by JS */
.whleabt-field-error {
    display: none;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.whleabt-selector-error {
    display: none;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

/* API Access tab panels — inactive panels hidden by default */
.whleabt-tab-content {
    display: none;
}

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

/* Sync / KB status label colours */
.whleabt-text-error {
    color: #dc2626;
    font-weight: 500;
}

.whleabt-text-excluded {
    color: #d97706;
    font-weight: 500;
}

.whleabt-text-warning {
    color: #d63638;
    font-weight: bold;
}

.whleabt-text-error.whleabt-text-error-small,
.whleabt-text-error {
    display: inline;
}

.whleabt-status-warning-icon {
    color: #d63638;
}

/* Email history list table — failed reason sub-text */
.whleabt-email-failed-reason {
    color: #dc3545;
    font-size: 11px;
    margin-top: 5px;
    max-width: 200px;
    word-break: break-word;
}

/* Chat history — automatic cleanup failed notice */
.whleabt-cleanup-error-notice {
    margin: 0 0 20px 0 !important;
    border-left-color: #ef4444 !important;
    border-left-width: 4px !important;
    background: #fffdfd !important;
    padding: 12px 15px !important;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05) !important;
    border-radius: 4px !important;
    border: 1px solid #fca5a5 !important;
}

.whleabt-cleanup-error-text {
    margin: 0 !important;
    color: #b91c1c !important;
    font-weight: 500 !important;
}