/* ==========================================================================
   WireBoard Analytics - Admin Styles
   ========================================================================== */

/* Placeholder text */
#wb-settings-form textarea::placeholder,
#wb-settings-form textarea::-webkit-input-placeholder { color: #a7aaad !important; opacity: 1 !important; }
#wb-settings-form textarea::-moz-placeholder { color: #a7aaad !important; opacity: 1 !important; }

/* Dashboard badge */
.wb-dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
    margin-right: 10px;
}
.wb-dashboard-badge .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #646970;
}
.wb-dashboard-badge-clickable {
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    margin-right: 0;
}
.wb-dashboard-badge-clickable:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}
.wb-dashboard-badge-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #a7aaad;
    margin-left: 2px;
}

/* Template picker */
.wb-template-picker { margin-top: 12px; }
.wb-template-picker-label { font-weight: 600; color: #1d2327; margin: 0 0 8px; font-size: 13px; }
.wb-template-options { display: flex; gap: 8px; }
@media (max-width: 500px) {
    .wb-template-options { flex-direction: column; }
}
.wb-template-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 2px solid #c3c4c7;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.wb-template-option:hover { border-color: #00a32a; background: #f0f9f0; }
.wb-template-option.selected { border-color: #00a32a; background: #f0f9f0; }
.wb-template-option .dashicons { font-size: 20px; width: 20px; height: 20px; color: #646970; margin-top: 4px; flex-shrink: 0; }
.wb-template-option.selected .dashicons { color: #00a32a; }
.wb-template-name { font-weight: 600; font-size: 13px; color: #1d2327; line-height: 1.3; }
.wb-template-desc { font-size: 12px; color: #646970; margin-top: 2px; line-height: 1.4; }

/* Layout */

.wireboard-wrap {
    max-width: 1200px;
    margin: 20px 20px 0 0;
}

.wireboard-wrap > h1 {
    margin-bottom: 16px;
}

.wireboard-wrap-full {
    max-width: none;
}

.wireboard-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.wireboard-dashboard-header h1 {
    margin: 0;
    padding: 9px 0;
}

.wireboard-dashboard-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wireboard-edit-dashboard-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3d8fd4, #2271b1);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
    transition: all 0.2s ease;
}

.wireboard-edit-dashboard-btn:hover,
.wireboard-edit-dashboard-btn:focus {
    background: linear-gradient(135deg, #2271b1, #135e96);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.35);
    color: #fff;
    transform: translateY(-1px);
}

.wireboard-edit-dashboard-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(34, 113, 177, 0.3);
}

.wireboard-edit-dashboard-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Cards */

.wireboard-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.wireboard-card h2 {
    margin-top: 0;
    padding-top: 0;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wireboard-card h2 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #646970;
}

.wireboard-card h2 .dashicons-shortcode {
    position: relative;
    top: 1px;
}

.wireboard-card h2 .dashicons-shield-alt {
    position: relative;
    top: 2px;
}

.wireboard-card h2 .dashicons-flag,
.wireboard-card h2 .dashicons-editor-code,
.wireboard-card h2 .dashicons-cart,
.wireboard-card h2 .dashicons-layout,
.wireboard-card h2 .dashicons-visibility,
.wireboard-card h2 .dashicons-admin-users {
    position: relative;
    top: 1px;
}

.wireboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 12px;
    margin-bottom: 0;
    margin-top: -4px;
}

.wireboard-card-header h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
    line-height: 1.4;
}

.wireboard-card-header + .form-table {
    margin-top: 0;
}

.wireboard-card-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wireboard-card-header-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    min-height: 28px;
}

.wireboard-card-header-actions .button .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

#wb-refresh-account-btn.is-refreshing .dashicons {
    animation: wb-spin 1s linear infinite;
}

@keyframes wb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wb-loading {
    opacity: 0.5;
    pointer-events: none;
    animation: wb-pulse 1.5s ease-in-out infinite;
}

@keyframes wb-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.wb-skeleton {
    display: inline-block;
    min-width: 80px;
    height: 14px;
    background: #dcdcde;
    border-radius: 3px;
    vertical-align: middle;
}

.wb-skeleton-sm {
    height: 12px;
}

.wb-skeleton-lg {
    height: 20px;
    min-width: 100px;
}

.wb-skeleton-wide {
    min-width: 140px;
}

/* Plan & Usage Box */

.wb-plan-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px 28px;
    max-width: 420px;
}

.wb-plan-header {
    margin-bottom: 20px;
}

.wb-plan-name {
    font-size: 22px;
    font-weight: 700;
    color: #1d2327;
}

.wb-plan-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e8e8e8;
    text-align: center;
}

.wb-plan-cta-text {
    margin: 0 0 16px;
    font-size: 13px;
    color: #646970;
}

.wb-plan-cta-btn {
    display: inline-block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.wb-plan-cta-btn:hover {
    opacity: 0.9;
}

.wb-plan-cta-btn:active {
    opacity: 0.8;
}

.wb-plan-pricing-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 12.5px;
    color: #646970;
    text-decoration: none;
}

.wb-plan-pricing-link:hover {
    color: #2271b1;
    text-decoration: underline;
}

.wb-advanced-toggle {
    margin-top: 4px;
    padding-left: 1px;
}

.wb-advanced-toggle a {
    font-size: 12.5px;
    color: #646970;
    text-decoration: none;
    cursor: pointer;
}

.wb-advanced-toggle a::before {
    content: "+ ";
}

.wb-advanced-toggle a.wb-toggle-open::before {
    content: "− ";
}

.wb-advanced-toggle a:hover {
    color: #2271b1;
}

.wb-advanced-details {
    margin-top: 0;
}

.wb-usage-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wb-usage-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wb-usage-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    line-height: 1.4;
    color: #646970;
    white-space: nowrap;
}

.wb-usage-bar {
    height: 8px;
    min-height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.wb-usage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1 0%, #135e96 100%);
    transition: width 0.3s ease;
}

.wb-usage-bar-fill.wb-usage-warning {
    background: linear-gradient(90deg, #dba617 0%, #c59000 100%);
}

.wb-usage-bar-fill.wb-usage-danger {
    background: linear-gradient(90deg, #d63638 0%, #b32d2e 100%);
}

.wb-usage-resets {
    font-size: 12px;
    color: #757575;
    margin-top: 0;
    text-align: right;
}

.wireboard-card h3 {
    margin-top: 0;
}

/* Notices */

.wireboard-notice {
    background: #fff;
    border-left: 4px solid #72aee6;
    padding: 12px 16px;
    margin: 15px 0;
}

.wireboard-notice-warning {
    border-left-color: #dba617;
}

/* Messages (inline) */

.wireboard-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    line-height: 1.5;
    font-size: 13px;
}

.wireboard-message-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-top: 1px;
}

.wireboard-message-icon svg {
    width: 18px;
    height: 18px;
}

.wireboard-message-text {
    flex: 1;
    min-width: 0;
}

.wireboard-message code {
    background: rgba(0, 0, 0, 0.07);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    word-break: break-all;
}

.wireboard-message-success {
    background: #f0faf2;
    border: 1px solid #b7e4c7;
    color: #1e4620;
}

.wireboard-message-error {
    background: #fef5f5;
    border: 1px solid #f0b8b8;
    color: #8a1114;
}

.wireboard-message-info {
    background: #f0f6fc;
    border: 1px solid #b8d4f0;
    color: #1a4a7a;
}

.wireboard-message-warning {
    background: #fefcf0;
    border: 1px solid #e8d48b;
    color: #6e4e00;
}

/* --- Floating Toast Notifications --- */

.wb-toast-container {
    position: fixed;
    top: 32px; /* below WP admin bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.wb-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 480px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wb-toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.wb-toast-exit {
    animation: wb-toast-out 0.3s ease forwards;
}

@keyframes wb-toast-out {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.wb-toast-success {
    background: #f0faf2;
    border: 1px solid #b7e4c7;
    color: #1e4620;
}

.wb-toast-error {
    background: #fef5f5;
    border: 1px solid #f0b8b8;
    color: #8a1114;
}

.wb-toast-info {
    background: #f0f6fc;
    border: 1px solid #b8d4f0;
    color: #1a4a7a;
}

.wb-toast-warning {
    background: #fefcf0;
    border: 1px solid #e8d48b;
    color: #6e4e00;
}

.wb-toast .wireboard-message-icon svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Setup Page
   ========================================================================== */

.wireboard-setup {
    max-width: 560px;
    margin: 40px auto;
}

.wireboard-setup-header {
    text-align: center;
    margin-bottom: 30px;
}

.wireboard-setup-logo {
    display: block;
    margin: 0 auto 12px;
    max-width: 220px;
    height: auto;
}

.wireboard-setup-header p {
    font-size: 14px;
    color: #646970;
    margin: 0;
}

.wireboard-setup-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 30px;
}

.wireboard-setup-card h2 {
    margin-top: 0;
    font-size: 20px;
}

.wireboard-setup-success {
    text-align: center;
    padding: 60px 40px 50px;
    position: relative;
    overflow: hidden;
}

/* Animated checkmark */
.wireboard-success-icon {
    margin-bottom: 24px;
}

.wb-checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: wb-circle-draw 0.6s 0.1s ease-out forwards;
}

.wb-checkmark-check {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: wb-check-draw 0.4s 0.5s ease-out forwards;
}

@keyframes wb-circle-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes wb-check-draw {
    to { stroke-dashoffset: 0; }
}

/* Text */
.wireboard-setup-success h2 {
    color: #1d2327;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0;
    animation: wb-fade-up 0.4s 0.7s ease-out forwards;
}

.wireboard-setup-success .wireboard-success-subtitle {
    font-size: 16px;
    color: #50575e;
    margin: 0 0 6px;
    opacity: 0;
    animation: wb-fade-up 0.4s 0.8s ease-out forwards;
}

.wireboard-setup-success .wireboard-success-detail {
    font-size: 13px;
    color: #858d95;
    margin-bottom: 0;
    opacity: 0;
    animation: wb-fade-up 0.4s 0.9s ease-out forwards;
}

@keyframes wb-fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Free plan info */
.wb-free-plan-info {
    margin: 24px auto 0;
    max-width: 400px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 6px;
    padding: 16px 20px;
    text-align: left;
    opacity: 0;
    animation: wb-fade-up 0.4s 1s ease-out forwards;
}

.wb-free-plan-info-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #2271b1;
    margin-bottom: 12px;
}

.wb-free-plan-info-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.wb-free-plan-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
}

.wb-free-plan-list li {
    font-size: 12.5px;
    color: #50575e;
    line-height: 1.4;
    padding-left: 16px;
    position: relative;
}

.wb-free-plan-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #2271b1;
    font-weight: 600;
    font-size: 11px;
}

.wb-free-plan-cta {
    font-size: 12.5px;
    color: #50575e;
    margin: 0;
    line-height: 1.5;
}

.wb-free-plan-info a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.wb-free-plan-info a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Newsletter opt-in (setup success) */
.wb-newsletter-opt-in {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    max-width: 380px;
    text-align: left;
    opacity: 0;
    animation: wb-fade-up 0.4s 1.1s ease-out forwards;
}

.wb-newsletter-opt-in .wb-switch {
    flex-shrink: 0;
}

.wb-newsletter-label {
    font-size: 13px;
    color: #50575e;
    line-height: 1.4;
    margin-left: 10px;
    vertical-align: middle;
}

.wb-no-transition .wb-switch-slider,
.wb-no-transition .wb-switch-slider::before {
    transition: none !important;
}

.wb-newsletter-status {
    font-size: 12px;
    margin-left: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    vertical-align: middle;
}

.wb-newsletter-status.is-visible {
    opacity: 1;
}

.wb-newsletter-status.is-success {
    color: #00a32a;
}

.wb-newsletter-status.is-error {
    color: #d63638;
}

/* Buttons */
.wireboard-setup-success .wireboard-setup-buttons {
    margin-top: 24px;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    animation: wb-fade-up 0.4s 1.2s ease-out forwards;
}

.wb-btn-success-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: #00a32a;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wb-btn-success-primary:hover,
.wb-btn-success-primary:focus {
    background: #008a20;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 163, 42, 0.3);
}

.wb-btn-success-primary .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.wb-btn-success-secondary {
    display: inline-block;
    padding: 8px 24px;
    color: #50575e;
    font-size: 13px;
    text-decoration: none;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.wb-btn-success-secondary:hover,
.wb-btn-success-secondary:focus {
    color: #1d2327;
    background: #f0f0f1;
}

/* Or divider + activation code link */

.wb-or-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wb-or-divider::before,
.wb-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dcdcde;
}

.wb-or-divider span {
    padding: 0 12px;
}

.wb-alt-action {
    text-align: center;
    margin: 0;
}

.wb-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: 1px solid #2271b1;
    border-radius: 4px;
    color: #2271b1;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.wb-outline-btn svg {
    flex-shrink: 0;
}

.wb-outline-btn:hover {
    background: #2271b1;
    color: #fff;
}

.wb-alt-action-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.wb-alt-action-hint a {
    color: #2271b1;
}

.wb-alt-action-hint a:hover {
    color: #135e96;
}

/* Password help */

.wireboard-password-help {
    margin-top: 16px;
    font-size: 13px;
    color: #646970;
    line-height: 1.5;
}

.wireboard-password-help p {
    margin: 0 0 6px;
}

.wireboard-password-help a {
    color: #2271b1;
}

.wireboard-password-help a:hover {
    color: #135e96;
}

.wireboard-password-help-sep {
    margin: 0 6px;
    color: #c3c4c7;
}

/* Form */

.wireboard-form {
    margin-top: 16px;
}

.wireboard-field {
    margin-bottom: 16px;
}

.wireboard-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.wireboard-field input[type="text"],
.wireboard-field input[type="email"],
.wireboard-field input[type="password"],
.wireboard-field input[type="datetime-local"] {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
}

.wireboard-field .description {
    color: #646970;
    font-size: 12px;
    margin-top: 4px;
}

/* Field-level error state */
.wireboard-field-error input[type="text"],
.wireboard-field-error input[type="email"],
.wireboard-field-error input[type="password"] {
    border-color: #d63638;
    box-shadow: 0 0 0 1px #d63638;
}

.wireboard-field-error-text {
    color: #d63638;
    font-size: 12px;
    margin-top: 4px;
}

.wireboard-field-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Activation code input */

.wireboard-field input.wb-code-input {
    font-size: 18px !important;
    letter-spacing: 6px;
    font-family: monospace;
}

@media (max-width: 782px) {
    #wb-connect-activation-code .wireboard-setup-buttons,
    #wb-connect-password .wireboard-setup-buttons {
        flex-direction: column;
    }
    #wb-connect-activation-code .wireboard-setup-buttons .button,
    #wb-connect-password .wireboard-setup-buttons .button {
        width: 100%;
        text-align: center;
    }
    .wireboard-field input.wb-code-input {
        font-size: 16px !important;
        letter-spacing: 4px;
    }
}

.wireboard-help-text {
    font-size: 13px;
    color: #646970;
    margin: 4px 0 16px;
}

.wireboard-help-text a {
    color: #2271b1;
}

.wireboard-help-text a:hover {
    color: #135e96;
}

/* Consent */

.wireboard-consent {
    margin: 20px 0 16px;
    padding: 14px 16px;
    background: #f0f0f1;
    border-radius: 4px;
}

.wireboard-consent label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400 !important;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    margin: 0;
}

.wireboard-consent input[type="checkbox"] {
    flex-shrink: 0;
    margin: 3px 0 0;
}

.wireboard-consent a {
    color: #2271b1;
}

.wireboard-consent a:hover {
    color: #135e96;
}

.wireboard-consent-note {
    margin: 6px 0 0 26px;
    font-size: 12px;
    color: #646970;
    line-height: 1.5;
}

.wireboard-setup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
}

.wireboard-setup-disconnect {
    margin-top: 20px;
    font-size: 13px;
    color: #646970;
}

.wireboard-setup-disconnect a {
    color: #d63638;
}

.wireboard-setup-disconnect a:hover {
    color: #a02224;
}

/* ==========================================================================
   Dashboard Picker (Setup)
   ========================================================================== */

.wireboard-dashboard-list {
    margin: 20px 0 16px;
    max-height: 400px;
    overflow-y: auto;
}

/* Selected state for inline (setup wizard) card selection. */
.wb-switch-item.wb-switch-selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wb-switch-item.wb-switch-selected .dashicons {
    color: #2271b1;
}

/* "Create new dashboard" card variant — same as others when idle. */
.wb-switch-item.wb-switch-item-create {
    border-style: dashed;
}

/* Green when selected or hovered. */
.wb-switch-item-create:hover {
    background: #f0f9f0;
    border-color: #00a32a;
}

.wb-switch-item-create:hover .dashicons,
.wb-switch-item-create:hover .wb-switch-item-name {
    color: #00a32a;
}

.wb-switch-item-create.wb-switch-selected {
    background: #f0f9f0;
    border-color: #00a32a;
    border-style: solid;
}

.wb-switch-item-create.wb-switch-selected .dashicons,
.wb-switch-item-create.wb-switch-selected .wb-switch-item-name {
    color: #00a32a;
}

/* Dim the "Current" card when creating a new dashboard. */
.wb-switch-creating .wb-switch-item.active {
    border-color: #dcdcde;
    background: transparent;
}

.wb-switch-creating .wb-switch-item.active .dashicons {
    color: #646970;
}

.wb-switch-creating .wb-switch-item-badge {
    background: #a7aaad;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.wireboard-empty-state,
.wireboard-embed-error {
    text-align: center;
    padding: 60px 30px;
    margin-top: 20px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
}

.wireboard-empty-state-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #c3c4c7;
    margin-bottom: 16px;
}

.wireboard-embed-error .dashicons-warning {
    color: #dba617;
}

/* Limits Exceeded */
.wb-limits {
    text-align: center;
    padding: 64px 40px 52px;
    margin-top: 20px;
    background: linear-gradient(160deg, #fefefe 0%, #f8fafd 40%, #f0f6fc 100%);
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wb-limits-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff4e0 0%, #ffe8b8 100%);
    margin-bottom: 24px;
    color: #c59000;
}

.wb-limits h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: #1d2327;
}

.wb-limits-subtitle {
    font-size: 15px;
    color: #50575e;
    margin: 0 auto 32px;
    max-width: 460px;
    line-height: 1.6;
}

.wb-limits-benefits {
    display: inline-flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 36px;
    padding: 20px 28px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}

.wb-limits-benefit {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1d2327;
    line-height: 1.4;
}

.wb-limits-benefit svg {
    flex-shrink: 0;
    color: #00a32a;
}

.wb-limits-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.wb-limits-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(34, 113, 177, 0.35);
}

.wb-limits-upgrade-btn:hover,
.wb-limits-upgrade-btn:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 113, 177, 0.4);
}

.wb-limits-upgrade-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

.wb-limits-pricing-link {
    font-size: 13px;
    color: #646970;
    text-decoration: none;
    transition: color 0.15s;
}

.wb-limits-pricing-link:hover {
    color: #2271b1;
    text-decoration: underline;
}


.wireboard-empty-state h2,
.wireboard-embed-error h2 {
    font-size: 20px;
    margin: 0 0 8px;
    color: #1d2327;
}

.wireboard-empty-state p,
.wireboard-embed-error p {
    font-size: 14px;
    color: #646970;
    margin: 0 0 24px;
}

.wireboard-embed-error ul {
    font-size: 13px;
    color: #50575e;
    line-height: 1.8;
    list-style: disc;
    padding-left: 18px;
}

.wireboard-embed-error li {
    margin-bottom: 4px;
}

.wireboard-embed-error code {
    background: #f0f0f1;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.wireboard-embed-error a {
    color: #2271b1;
    text-decoration: none;
}

.wireboard-embed-error a:hover {
    text-decoration: underline;
}

.wb-embed-error-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Dashboard Embed
   ========================================================================== */

.wireboard-dashboard-container {
    margin-top: 16px;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.wireboard-dashboard-container iframe {
    display: block;
    width: 100%;
    border: 0;
}

/* ==========================================================================
   Embed Token (Settings)
   ========================================================================== */

.wireboard-shortcode-code {
    display: inline-block;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 13px;
    user-select: all;
}

.wireboard-shortcode-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #6e4e00;
}

/* Badges */

.wb-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.wb-badge-green {
    background: #edfaef;
    color: #1e4620;
}

.wb-badge-red {
    background: #fcf0f1;
    color: #8a1114;
}

/* Email Verification — inline status */

.wb-email-unverified {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #d63638;
}

.wb-unverified-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d63638;
    flex-shrink: 0;
}

.wb-unverified-sep {
    color: #c3c4c7;
    margin: 0 1px;
}

.wb-unverified-action {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.wb-unverified-action:hover {
    color: #135e96;
    text-decoration: underline;
}

.wb-unverified-icon {
    font-size: 12px;
    width: 12px;
    height: 12px;
    line-height: 12px;
    color: #2271b1;
    margin-left: 2px;
}

/* Email Verification — dashboard notice */

.wireboard-verify-notice {
    text-align: center;
    padding: 64px 40px 48px;
    background: #fff;
    border: 1px solid #dba617;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.wireboard-verify-notice-icon {
    margin-bottom: 20px;
}

.wireboard-verify-notice-icon svg {
    opacity: 0.85;
}

.wireboard-verify-notice h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #1d2327;
}

.wireboard-verify-notice > p {
    font-size: 14px;
    color: #646970;
    margin: 0 auto 28px;
    max-width: 420px;
    line-height: 1.6;
}

.wireboard-verify-notice-buttons {
    display: flex;
    justify-content: center;
}

.wb-btn-verify-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #2271b1;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wb-btn-verify-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.25);
}

.wb-btn-verify-primary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.wireboard-verify-hint {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f1;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.wireboard-verify-hint p {
    font-size: 13px;
    color: #858d95;
    margin: 0 0 10px;
    line-height: 1.5;
}

.wb-btn-verify-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #2271b1;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.wb-btn-verify-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.wb-btn-verify-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

/* ==========================================================================
   Settings
   ========================================================================== */

/* Tracking Status Card */

.wireboard-status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 8px;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease;
}

.wireboard-status-card strong {
    font-size: 14px;
    display: block;
    line-height: 1.4;
}

.wireboard-status-card p {
    margin: 3px 0 0;
    font-size: 13px;
    color: #646970;
}

.wireboard-status-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wireboard-status-icon svg {
    width: 22px;
    height: 22px;
}

/* Active state */
.wireboard-status-active {
    background: linear-gradient(135deg, #f0faf2 0%, #fafffe 100%);
    border-left: 4px solid #00a32a;
}

.wireboard-status-active .wireboard-status-icon {
    background: rgba(0, 163, 42, 0.1);
    color: #00a32a;
    animation: wb-icon-pulse-green 2.5s ease-in-out infinite;
}

.wireboard-status-active strong {
    color: #0a6e1f;
}

@keyframes wb-icon-pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 163, 42, 0); }
    50% { box-shadow: 0 0 0 6px rgba(0, 163, 42, 0.08); }
}

/* Paused state */
.wireboard-status-paused {
    background: linear-gradient(135deg, #fefcf0 0%, #fffef8 100%);
    border-left: 4px solid #dba617;
}

.wireboard-status-paused .wireboard-status-icon {
    background: rgba(219, 166, 23, 0.1);
    color: #9e8200;
}

.wireboard-status-paused strong {
    color: #6e4e00;
}

/* Inactive state */
.wireboard-status-inactive {
    background: linear-gradient(135deg, #fef5f5 0%, #fffafa 100%);
    border-left: 4px solid #d63638;
}

.wireboard-status-inactive .wireboard-status-icon {
    background: rgba(214, 54, 56, 0.08);
    color: #d63638;
}

.wireboard-status-inactive strong {
    color: #8a1114;
}

/* Tracking Code Editor */

#wb-custom-script {
    width: 100%;
    font-family: Menlo, Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 12px 14px;
    background: #1e1e1e;
    color: #d4d4d4;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    resize: vertical;
    tab-size: 4;
    margin-top: 8px;
}

#wb-custom-script:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

/* CodeMirror wrapper when active */
#wb-script-editor .CodeMirror {
    margin-top: 8px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

#wb-script-editor .wireboard-message {
    margin-top: 10px;
}

.wb-script-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.wireboard-checkbox {
    display: inline-block;
    margin-right: 12px;
}

#wb-excluded-roles-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    transition: opacity 0.2s;
}

#wb-excluded-roles-fieldset:disabled {
    opacity: 0.5;
}

/* Danger zone */

#wb-embed-token-row {
    scroll-margin-top: 46px;
}

.wireboard-danger-zone {
    border-color: #d63638;
}

.wireboard-danger-zone h2 {
    color: #d63638;
    border-bottom-color: #facfd2;
}

.wireboard-danger-zone h2 .dashicons {
    color: #d63638;
}

.wireboard-btn-danger {
    color: #d63638 !important;
    border-color: #d63638 !important;
}

.wireboard-btn-danger .dashicons {
    font-size: 13px;
    width: 13px;
    height: 13px;
    vertical-align: middle;
    margin-left: 2px;
    position: relative;
    top: -1px;
}

.wireboard-btn-danger:hover {
    background: #fcf0f1 !important;
}

.wireboard-btn-danger:focus {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 1px #d63638 !important;
    outline: none;
}

/* Confirmation Modal */

.wb-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100001;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.wb-modal-overlay.wb-modal-visible {
    display: flex;
    opacity: 1;
}

.wb-modal {
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.15s ease;
}

.wb-modal-visible .wb-modal {
    transform: scale(1);
}

.wb-modal-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
}

.wb-modal-message {
    margin: 0 0 24px;
    font-size: 13px;
    color: #646970;
    line-height: 1.6;
}

.wb-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.wb-modal-btn {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    line-height: 1.4;
}

.wb-modal-btn-cancel {
    background: #fff;
    color: #50575e;
}

.wb-modal-btn-cancel:hover {
    background: #f0f0f1;
    border-color: #a7aaad;
}

.wb-modal-btn-confirm {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.wb-modal-btn-confirm:hover {
    background: #135e96;
    border-color: #135e96;
}

.wb-modal-btn-danger {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.wb-modal-btn-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

.wb-modal-switch {
    max-width: 440px;
    width: 100%;
}

.wb-switch-list {
    margin-bottom: 20px;
    max-height: 320px;
    overflow-y: auto;
}

.wb-switch-loading {
    padding: 32px 16px;
    text-align: center;
    color: #646970;
    font-size: 13px;
}

.wb-switch-loading::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    margin: 0 auto 10px;
    border: 3px solid #e0e0e0;
    border-top-color: #3c434a;
    border-radius: 50%;
    animation: wb-spin 0.7s linear infinite;
}

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

.wb-switch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.wb-switch-item:last-child {
    margin-bottom: 0;
}

.wb-switch-item:not(.wb-switch-item-create):hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.wb-switch-item.active {
    border-color: #2271b1;
    background: #f0f6fc;
    cursor: default;
}

.wb-switch-item .dashicons {
    color: #646970;
    flex-shrink: 0;
}

.wb-switch-item.active .dashicons {
    color: #2271b1;
}

.wb-switch-item-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1d2327;
}

.wb-switch-item-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: #2271b1;
    color: #fff;
    border-radius: 10px;
    flex-shrink: 0;
}

.wb-switch-switching {
    opacity: 0.6;
    pointer-events: none;
}

.wb-switch-template-picker {
    margin-bottom: 16px;
}

.wb-switch-create-btn.wb-modal-btn {
    background: #00a32a;
    border-color: #00a32a;
    color: #fff;
}

.wb-switch-create-btn.wb-modal-btn:hover {
    background: #008a20;
    border-color: #008a20;
}

.wb-switch-error {
    padding: 10px 14px;
    margin-bottom: 16px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.5;
}

.wb-switch-error a {
    color: #2271b1;
    text-decoration: underline;
}

/* ==========================================================================
   Custom Events Page
   ========================================================================== */

/* Toggle Switch */

.wb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    vertical-align: middle;
}

.wb-switch input,
.wb-switch input:disabled {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    -webkit-appearance: none;
    appearance: none;
}

.wb-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #c3c4c7;
    border-radius: 24px;
    transition: background 0.2s ease;
}

.wb-switch-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.wb-switch input:checked + .wb-switch-slider {
    background: #00a32a;
}

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

.wb-switch input:focus-visible + .wb-switch-slider {
    box-shadow: 0 0 0 2px #2271b1;
}
.wb-switch input:disabled + .wb-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.wb-switch-label {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    vertical-align: middle;
}

/* Radio Group */

.wb-radio-group {
    margin: 0;
    padding: 0;
    border: 0;
}

.wb-radio-group:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.wb-radio-group label {
    display: block;
    margin-bottom: 2px;
    cursor: pointer;
}

.wb-radio-group input[type="radio"] {
    -webkit-appearance: radio !important;
    appearance: radio !important;
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    min-width: 0 !important;
    margin: 0 4px 0 0 !important;
    vertical-align: middle;
    position: relative;
    top: -1px;
    accent-color: #2271b1;
}

.wb-radio-group input[type="radio"]::before {
    content: none !important;
}

.wb-radio-group .description {
    margin: 2px 0 12px 24px;
}

.wb-radio-group label:last-of-type + .description {
    margin-bottom: 0;
}

.wb-textarea-save-btn {
    margin-top: 8px;
}

/* Code Preview */

.wb-ce-dashboard-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-left-width: 4px;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.wb-ce-dashboard-notice .dashicons {
    color: #2271b1;
    flex-shrink: 0;
    margin-top: 2px;
}

.wb-gutenberg-tip {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #f0f6fc;
    border: 1px solid #c5d9ed;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 12px;
}
.wb-gutenberg-tip .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #2271b1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Quota exceeded notice */
.wb-quota-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fcf0f0;
    border: 1px solid #d63638;
    border-left-width: 4px;
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.wireboard-wrap-full .wb-quota-notice {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.5;
}
.wb-quota-notice .dashicons {
    color: #d63638;
    flex-shrink: 0;
    font-size: 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.wb-ce-scripts-preview {
    margin-top: 12px;
}

.wb-code-preview {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 10px 14px;
    font-family: Menlo, Consolas, Monaco, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 6px 0 0;
}

.wb-code-preview code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* Helper Tool Sections */

.wb-ce-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}

.wb-ce-section h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: #1d2327;
}

/* Event Type Cards */

.wb-ce-type-cards {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.wb-ce-type-card {
    flex: 1;
    display: block;
    cursor: pointer;
}

.wb-ce-type-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wb-ce-type-card-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.wb-ce-type-card:hover .wb-ce-type-card-content {
    border-color: #a7c5e2;
    background: #f7fafd;
}

.wb-ce-type-card.selected .wb-ce-type-card-content {
    border-color: #8bb8db;
    background: #f0f7fc;
    box-shadow: 0 0 0 1px #8bb8db;
}

.wb-ce-type-card-content svg {
    flex-shrink: 0;
    color: #646970;
    margin-top: 1px;
}

.wb-ce-type-card.selected .wb-ce-type-card-content svg {
    color: #4d96c8;
}

.wb-ce-type-card-content strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}

.wb-ce-type-card-content > div > span {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Detail Forms */

.wb-ce-detail-group {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.wb-ce-detail-group h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2271b1;
}

.wb-ce-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.wb-ce-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 4px;
}

.wb-ce-field input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
}

.wb-ce-required {
    color: #d63638;
    font-weight: 400;
}

.wb-ce-optional {
    color: #646970;
    font-weight: 400;
    font-size: 11px;
}

/* Validation Message */

.wb-ce-validation {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 12px;
    background: #fcf9e8;
    border: 1px solid #dba617;
    border-radius: 4px;
    color: #1d2327;
    font-size: 13px;
}

.wb-ce-validation .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #dba617;
}

/* Output Area */

.wb-ce-output-wrapper {
    position: relative;
    margin-top: 12px;
}

.wb-ce-output {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px 20px;
    border-radius: 6px;
    font-family: Menlo, Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.wb-ce-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 4px 10px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #d4d4d4 !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.wb-ce-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.wb-ce-copy-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Publisher Info */

.wb-ce-publisher-info {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
}

.wb-ce-publisher-info code {
    background: #f6f7f7;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

/* WooCommerce event list */
.wb-woo-events-list {
    margin-top: 8px;
}

.wb-woo-event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
}

.wb-woo-event-row + .wb-woo-event-row {
    border-top: 1px solid #f0f0f1;
}

.wb-woo-event-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wb-woo-event-main .wb-switch {
    flex-shrink: 0;
}

.wb-woo-event-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.wb-woo-event-name {
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.4;
}

.wb-woo-event-desc {
    font-size: 12px;
    color: #646970;
    line-height: 1.4;
}

/* Small switch variant */
.wb-switch-sm {
    width: 34px;
    height: 18px;
    vertical-align: middle;
}
.wb-switch-sm .wb-switch-slider {
    border-radius: 18px;
}
.wb-switch-sm .wb-switch-slider::before {
    width: 12px;
    height: 12px;
}
.wb-switch-sm input:checked + .wb-switch-slider::before {
    transform: translateX(16px);
}
.wb-switch-sm input:checked + .wb-switch-slider {
    background: #dba617;
}

.wb-woo-value-group {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 6px;
}

.wb-woo-value-label {
    font-size: 12px;
    color: #50575e;
}

@media (max-width: 600px) {
    .wb-woo-event-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .wb-woo-value-group {
        margin-left: 54px;
    }
}

/* Actions dropdown menu (small screens) */

.wb-actions-menu-wrap {
    display: none;
    position: relative;
    margin-left: auto;
}

.wb-actions-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f0f0f1;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.wb-actions-toggle:hover {
    background: #e0e0e0;
    border-color: #8c8f94;
}

.wb-actions-toggle[aria-expanded="true"] {
    background: #dcdcde;
    border-color: #8c8f94;
}

.wb-actions-toggle .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #50575e;
}

.wb-actions-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 200px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
    padding: 4px 0;
}

.wb-actions-dropdown.wb-dropdown-open {
    display: block;
}

.wb-actions-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    background: none;
    border: none;
    color: #1d2327;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.1s;
}

.wb-actions-dropdown-item:hover,
.wb-actions-dropdown-item:focus {
    background: #f0f0f1;
    color: #1d2327;
}

.wb-actions-dropdown-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
    color: #646970;
}

/* Responsive */

@media (max-width: 782px) {
    .wb-ce-type-cards {
        flex-direction: column;
    }

    .wb-ce-fields {
        grid-template-columns: 1fr;
    }

    .wireboard-card-header-actions .button {
        padding: 2px 10px !important;
        min-height: 28px !important;
        font-size: 13px !important;
        height: auto !important;
    }
}

@media (max-width: 870px) {
    .wireboard-dashboard-header .wb-actions-menu-wrap {
        display: block;
    }

    .wireboard-dashboard-header-actions {
        display: none;
    }
}

@media (max-width: 600px) {
    .wireboard-card-header .wb-actions-menu-wrap {
        display: block;
    }

    .wireboard-card-header-actions {
        display: none;
    }

    .wireboard-card {
        padding: 14px 16px;
    }

    .wireboard-card .form-table th,
    .wireboard-card .form-table td {
        display: block;
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .wireboard-card .form-table th {
        padding-bottom: 4px;
    }

    #wb-script-editor {
        max-width: 100%;
        overflow: hidden;
    }

    #wb-custom-script {
        max-width: 100%;
        box-sizing: border-box;
    }

    #wb-script-editor .CodeMirror {
        max-width: 100%;
        box-sizing: border-box;
    }

    #wb-script-editor .CodeMirror-scroll {
        overflow-x: auto !important;
    }

    #wb-script-editor .CodeMirror pre.CodeMirror-line,
    #wb-script-editor .CodeMirror pre.CodeMirror-line-like {
        word-break: break-all;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    #wb-custom-script {
        font-size: 11px;
        padding: 10px;
    }

    .wb-script-actions {
        flex-wrap: wrap;
    }

}
