/* PRO upsell (free version only): locked rows, popup and banner */

/* The popup is appended to <body>, outside .wcbloat-wrap */
.wcbloat-wrap,
.wcbloat-upsell {
    --wcbloat-action: #2271b1;
    --wcbloat-action-dark: #135e96;
    --wcbloat-pro: #0073b2;
    --wcbloat-pro-tint: #f0f6fc;
    --wcbloat-ink: #1d2327;
    --wcbloat-muted: #50575e;
    --wcbloat-line: #dcdcde;
}

/* Locked rows: clickable, quiet until hovered */
.wcbloat-locked {
    cursor: pointer;
}

/* Disabled controls swallow clicks in some browsers; let them land on the row instead */
.wcbloat-locked input[disabled],
.wcbloat-locked select[disabled],
.wcbloat-locked textarea[disabled],
.wcbloat-locked .button[disabled] {
    pointer-events: none;
}

.wcbloat-locked label {
    cursor: pointer;
}

.wcbloat-locked th,
.wcbloat-locked td > label {
    transition: color 0.15s ease-out;
}

.wcbloat-locked:hover th,
.wcbloat-locked:hover td > label,
.wcbloat-locked.is-open th,
.wcbloat-locked.is-open td > label {
    color: var(--wcbloat-action);
}

/* The PRO badge doubles as the keyboard trigger: add a small lock */
.wcbloat-locked .wcbloat-pro-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 5px 2px 3px;
    border-radius: 3px;
    background-color: var(--wcbloat-pro);
    cursor: pointer;
    transition: background-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

.wcbloat-locked .wcbloat-pro-label::before {
    content: "\f160";
    font: normal 11px/1 dashicons;
    -webkit-font-smoothing: antialiased;
}

.wcbloat-locked:hover .wcbloat-pro-label,
.wcbloat-locked.is-open .wcbloat-pro-label {
    background-color: var(--wcbloat-action-dark);
    box-shadow: 0 0 0 3px var(--wcbloat-pro-tint);
}

.wcbloat-locked .wcbloat-pro-label:focus {
    outline: none;
}

.wcbloat-locked .wcbloat-pro-label:focus-visible {
    outline: 2px solid var(--wcbloat-action);
    outline-offset: 2px;
}

/* Popup */
.wcbloat-upsell {
    position: absolute;
    z-index: 99990;
    box-sizing: border-box;
    width: 360px;
    max-width: calc(100vw - 24px);
    padding: 18px 20px 16px;
    border: 1px solid var(--wcbloat-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.12);
    color: var(--wcbloat-ink);
    font-size: 13px;
    line-height: 1.5;
    text-align: start;
    cursor: auto;
}

.wcbloat-upsell[hidden],
.wcbloat-upsell-backdrop[hidden] {
    display: none;
}

.wcbloat-upsell:focus {
    outline: none;
}

.wcbloat-upsell:focus-visible {
    box-shadow: 0 0 0 2px var(--wcbloat-action), 0 8px 24px rgba(0, 0, 0, 0.12);
}

.wcbloat-upsell.is-entering {
    animation: wcbloat-upsell-in 0.16s cubic-bezier(0.2, 0, 0, 1) both;
}

.wcbloat-upsell.is-above.is-entering {
    animation-name: wcbloat-upsell-in-above;
}

@keyframes wcbloat-upsell-in {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(0.98);
    }
}

@keyframes wcbloat-upsell-in-above {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.98);
    }
}

.wcbloat-upsell-eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    color: var(--wcbloat-muted);
    font-size: 12px;
}

.wcbloat-upsell-badge {
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--wcbloat-pro);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.wcbloat-upsell .wcbloat-upsell-title {
    margin: 0 0 6px;
    padding: 0;
    color: var(--wcbloat-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.wcbloat-upsell .wcbloat-upsell-benefit {
    margin: 0 0 14px;
    color: var(--wcbloat-ink);
    font-size: 13px;
}

.wcbloat-upsell .wcbloat-upsell-reasons-title {
    margin: 0 0 6px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f1;
    color: var(--wcbloat-muted);
    font-size: 12px;
    font-weight: 600;
}

.wcbloat-upsell-reasons {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.wcbloat-upsell-reasons li {
    position: relative;
    margin: 0 0 4px;
    padding-inline-start: 22px;
    color: var(--wcbloat-muted);
}

.wcbloat-upsell-reasons li::before {
    content: "\f147";
    position: absolute;
    top: 1px;
    inset-inline-start: 0;
    color: var(--wcbloat-action);
    font: normal 18px/1 dashicons;
    -webkit-font-smoothing: antialiased;
}

.wcbloat-upsell-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.wcbloat-upsell .button-link.wcbloat-upsell-close {
    color: var(--wcbloat-muted);
    text-decoration: none;
}

.wcbloat-upsell .button-link.wcbloat-upsell-close:hover {
    color: var(--wcbloat-ink);
    text-decoration: underline;
}

/* Narrow screens: centered modal with a backdrop */
.wcbloat-upsell-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100100;
    background: rgba(29, 35, 39, 0.4);
}

.wcbloat-upsell.is-modal {
    position: fixed;
    z-index: 100101;
    top: 50%;
    left: 50%;
    width: calc(100vw - 32px);
    max-width: 400px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
}

.wcbloat-upsell.is-modal.is-entering {
    animation-name: wcbloat-upsell-in-modal;
}

@keyframes wcbloat-upsell-in-modal {
    from {
        opacity: 0;
        transform: translate(-50%, -48%) scale(0.98);
    }
}

.wcbloat-upsell.is-modal .wcbloat-upsell-actions .button {
    flex: 1 1 auto;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .wcbloat-upsell.is-entering,
    .wcbloat-upsell.is-above.is-entering,
    .wcbloat-upsell.is-modal.is-entering {
        animation: none;
    }

    .wcbloat-locked th,
    .wcbloat-locked td > label,
    .wcbloat-locked .wcbloat-pro-label {
        transition: none;
    }
}

/* Banner (replaces the old "Get PRO" bar) */
.wcbloat-pro-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 14px 0 8px;
    padding: 14px 16px;
    border: 1px solid #c5d9ed;
    border-radius: 8px;
    background: var(--wcbloat-pro-tint);
}

.wcbloat-pro-banner-icon.dashicons {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fff;
    color: var(--wcbloat-pro);
    font-size: 20px;
    line-height: 36px;
    box-shadow: 0 0 0 1px #c5d9ed;
}

.wcbloat-pro-banner-body {
    flex: 1 1 auto;
    min-width: 0;
}

.wcbloat-pro-banner-title {
    display: block;
    color: var(--wcbloat-ink);
    font-size: 14px;
    line-height: 1.4;
}

.wcbloat-pro-banner-text {
    display: block;
    margin-top: 2px;
    color: var(--wcbloat-muted);
    font-size: 13px;
    line-height: 1.5;
}

.wcbloat-pro-banner .wcbloat-pro-banner-button {
    flex: none;
}

@media screen and (max-width: 600px) {
    .wcbloat-pro-banner {
        flex-wrap: wrap;
    }

    .wcbloat-pro-banner-icon.dashicons {
        display: none;
    }

    .wcbloat-pro-banner .wcbloat-pro-banner-button {
        width: 100%;
        text-align: center;
    }
}
