/**
 * Product edit screen while no AI provider is connected (see provider-gate.js).
 * Only loaded in that state, so the generate buttons can be styled outright.
 */

/* Same look as core's disabled buttons; still focusable so the popup can explain why. */
.wp-core-ui .button.wtofe-ai-action,
.wp-core-ui .button.wtofe-ai-action:hover,
.wp-core-ui .button.wtofe-ai-action:focus,
.wp-core-ui .button.wtofe-ai-action:active {
    color: #a7aaad !important;
    background: #f6f7f7 !important;
    border-color: #dcdcde !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

.wp-core-ui .button.wtofe-ai-action:focus-visible {
    box-shadow: 0 0 0 1px #2271b1 !important;
    outline: 2px solid transparent;
}

/* ── Popup ───────────────────────────────────────────────────────────────── */

.wtofe-gate-tip {
    position: fixed;
    z-index: 100100; /* above the admin bar and meta box handles */
    box-sizing: border-box;
    width: max-content;
    max-width: min(280px, calc(100vw - 16px));
    padding: 12px 14px;
    border-radius: 6px;
    background: #1d2327;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    color: #f0f0f1;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
}

.wtofe-gate-tip[hidden] {
    display: none;
}

.wtofe-gate-tip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: var(--wtofe-gate-arrow, 50%);
    width: 12px;
    height: 12px;
    margin-left: -6px;
    background: inherit;
    transform: rotate(45deg);
}

.wtofe-gate-tip.is-above::before {
    top: auto;
    bottom: -6px;
}

.wtofe-gate-tip strong {
    display: block;
    color: #fff;
    font-weight: 600;
}

.wtofe-gate-tip p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #c3c4c7;
}

.wtofe-gate-tip a {
    display: inline-block;
    margin-top: 8px;
    color: #72aee6;
    font-weight: 500;
}

.wtofe-gate-tip a:hover,
.wtofe-gate-tip a:focus {
    color: #9ec2e6;
}

.wtofe-gate-tip a::after {
    content: ' \2192';
}

.rtl .wtofe-gate-tip {
    text-align: right;
}

.rtl .wtofe-gate-tip a::after {
    content: ' \2190';
}
