/* Keep action colors consistent across the public site and both admin themes.
   A named layer gives these rules precedence over legacy unlayered overrides. */
@layer actions {
    :is(button, .btn, .landing-btn, .bn-download-secondary, input[type="submit"]):not([data-feature]):not(.btn-danger):not(.admin-logout):not(.account-action-danger):not(.ticket-close-btn):not(.header-guest-login):not(.header-guest-download):not(.header-guest-icon-button):not(.header-public-control):not(.header-public-icon-button):not(.plan-themed-action):not(.gallery-image-button) {
        background: #1765c1 !important;
        border-color: #1765c1 !important;
        color: #fff !important;
        text-shadow: none !important;
    }
    :is(button, .btn, .landing-btn, .bn-download-secondary, input[type="submit"]):not([data-feature]):not(.btn-danger):not(.admin-logout):not(.account-action-danger):not(.ticket-close-btn):not(.header-guest-login):not(.header-guest-download):not(.header-guest-icon-button):not(.header-public-control):not(.header-public-icon-button):not(.plan-themed-action):not(.gallery-image-button):hover {
        background: #11529f !important;
        border-color: #11529f !important;
        color: #fff !important;
    }
    :is(button, .btn, .landing-btn, .bn-download-secondary, input[type="submit"]):not([data-feature]):not(.btn-danger):not(.admin-logout):not(.account-action-danger):not(.ticket-close-btn):not(.header-guest-login):not(.header-guest-download):not(.header-guest-icon-button):not(.header-public-control):not(.header-public-icon-button):not(.plan-themed-action):not(.gallery-image-button):focus-visible {
        outline: 3px solid #79b7ff !important;
        outline-offset: 3px !important;
    }
    :is(button, .btn, .landing-btn, .bn-download-secondary, input[type="submit"]):not([data-feature]):not(.btn-danger):not(.admin-logout):not(.account-action-danger):not(.ticket-close-btn):not(.header-guest-login):not(.header-guest-download):not(.header-guest-icon-button):not(.header-public-control):not(.header-public-icon-button):not(.plan-themed-action):not(.gallery-image-button):is(:disabled, .disabled, [aria-disabled="true"]) {
        opacity: .55 !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
    }
}
.diagnostic-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.diagnostic-search-form label { grid-column: 1 / -1; margin: 0; }
.diagnostic-search-form input { margin: 0; min-width: 0; }
.diagnostic-search-form .btn { margin: 0; min-height: 44px; }
.diagnostic-review-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-block: 16px; }
.diagnostic-review-form label { margin: 0; }
.inline-sensitive-action { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0; }
.inline-sensitive-action > input, .inline-sensitive-action > .password-control { flex: 1 1 200px; width: auto; min-width: 0; margin: 0; }
.inline-sensitive-action > .btn { flex: 0 0 auto; margin: 0; }
.bn-download-hero { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px; }
.bn-download-actions { grid-column: 1 / -1; width: 100%; margin-top: 0; flex-wrap: wrap; gap: 14px; }
.bn-download-actions > .landing-btn { white-space: nowrap; flex-shrink: 0; min-height: 48px; }
.bn-download-links { display: flex; flex-wrap: wrap; gap: 10px; margin-inline-start: auto; }
.bn-download-secondary { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid; border-radius: 12px; text-decoration: none; white-space: nowrap; font-size: .88rem; }
.support-live-badge[hidden] { display: none !important; }
@media (max-width: 900px) {
    .bn-download-hero { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
    .bn-download-actions { flex-direction: column; }
    .bn-download-actions > .landing-btn { width: 100%; justify-content: center; }
    .bn-download-links { margin-inline: 0; width: 100%; justify-content: center; }
    .bn-download-secondary { flex: 1 1 auto; }
}
@media (max-width: 480px) {
    .diagnostic-search-form { grid-template-columns: 1fr; }
    .inline-sensitive-action { width: 100%; }
    .inline-sensitive-action > .btn { width: 100%; }
}

/* Homepage pricing light-mode refinements loaded after site.css. */
html[data-theme="light"] .landing-pricing-v3 .plan-theme-365{
    border-width:1px!important;
    border-color:#e3aa12!important;
}

/* Homepage pricing light-mode icon reset.
   Keep the plan color, but remove the 3D/inner shadow look in light theme. */
html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon,
html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon:hover{
    background:color-mix(in srgb, var(--plan-color) 10%, #fff)!important;
    box-shadow:none!important;
    filter:none!important;
    text-shadow:none!important;
    overflow:visible!important;
}

html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon::before,
html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon::after{
    content:none!important;
    display:none!important;
    opacity:0!important;
    background:none!important;
    box-shadow:none!important;
    filter:none!important;
}

html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon svg,
html[data-theme="light"] .landing-pricing-v3 .landing-term-grid-v3 .landing-plan-icon svg *{
    filter:none!important;
    text-shadow:none!important;
    box-shadow:none!important;
}

/* Homepage pricing buttons should behave like clickable controls. */
.landing-pricing-v3 .landing-plan-buy,
.landing-pricing-v3 .landing-plan-cart-form .landing-plan-buy,
.landing-pricing-v3 a.landing-plan-buy,
.landing-pricing-v3 button.landing-plan-buy,
.landing-pricing-v3 .plan-themed-action.landing-plan-buy{
    cursor:pointer!important;
}

.landing-pricing-v3 .landing-plan-buy:disabled,
.landing-pricing-v3 .landing-plan-buy[disabled],
.landing-pricing-v3 .landing-plan-buy[aria-disabled="true"]{
    cursor:not-allowed!important;
}

/* Pricing admin: Ready Plan edit form layout. */
.ready-plan-edit-form{
    display:grid!important;
    grid-template-columns:repeat(12,minmax(0,1fr))!important;
    grid-template-areas:
        "code code code title title title . . . . . ."
        "desc desc desc desc desc desc desc desc desc desc desc desc"
        "generation generation generation devices devices devices sort sort sort badge badge badge"
        "flags flags flags flags flags flags flags flags flags flags flags flags"
        "components components components components components components components components components components components components"
        "actions actions actions actions actions actions actions actions actions actions actions actions"!important;
    gap:14px 16px!important;
    align-items:end!important;
    direction:rtl!important;
}
.ready-plan-edit-form > *{direction:rtl!important;min-width:0!important;}
.ready-plan-edit-code{grid-area:code!important;}
.ready-plan-edit-title{grid-area:title!important;}
.ready-plan-edit-description{grid-area:desc!important;}
.ready-plan-edit-generation{grid-area:generation!important;}
.ready-plan-edit-devices{grid-area:devices!important;}
.ready-plan-edit-sort{grid-area:sort!important;}
.ready-plan-edit-badge{grid-area:badge!important;}
.ready-plan-edit-components{grid-area:components!important;}
.ready-plan-edit-actions{grid-area:actions!important;}
.ready-plan-edit-form > .ready-plan-flags{
    grid-area:flags!important;
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:18px 24px!important;
    min-height:48px!important;
    padding-top:2px!important;
    padding-bottom:6px!important;
}
.ready-plan-edit-form input{width:100%!important;min-width:0!important;}
.ready-plan-edit-generation input,
.ready-plan-edit-devices input,
.ready-plan-edit-sort input{text-align:center!important;}
.ready-plan-edit-code input.ltr{direction:ltr!important;text-align:left!important;}
@media (max-width:1100px){
    .ready-plan-edit-form{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
        grid-template-areas:
            "code title"
            "desc desc"
            "generation devices"
            "sort badge"
            "flags flags"
            "components components"
            "actions actions"!important;
    }
}
@media (max-width:760px){
    .ready-plan-edit-form{
        grid-template-columns:1fr!important;
        grid-template-areas:
            "code"
            "title"
            "desc"
            "generation"
            "devices"
            "sort"
            "badge"
            "flags"
            "components"
            "actions"!important;
    }
}
