/* Shared feedback, including native WHMCS alerts and dynamically inserted messages. */
body.ph-site .alert.alert {
    --ph-alert-tone:var(--ph-primary);
    --ph-alert-fill:var(--ph-info-soft);
    --ph-alert-button-ink:#fff;
    --ph-alert-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6m0-10v.1'/%3E%3C/svg%3E");
}
body.ph-site .alert.alert,
body.ph-site #phPageContent .alert.alert {
    display:block;
    position:relative;
    min-height:60px;
    margin-block:16px;
    padding:17px 20px;
    padding-inline-start:58px;
    border:1px solid color-mix(in srgb,var(--ph-alert-tone) 18%,transparent);
    border-inline-start:3px solid color-mix(in srgb,var(--ph-alert-tone) 65%,transparent);
    border-radius:13px;
    background:var(--ph-alert-fill);
    color:var(--ph-alert-tone);
    box-shadow:none;
    text-align:start;
    font-size:12px;
    font-weight:400;
    line-height:1.95;
    overflow-wrap:anywhere;
}
body.ph-site .alert.alert-success {
    --ph-alert-tone:var(--ph-success);
    --ph-alert-fill:var(--ph-success-soft);
    --ph-alert-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E");
}
body.ph-site .alert.alert-warning {
    --ph-alert-tone:var(--ph-warning);
    --ph-alert-fill:var(--ph-warning-soft);
    --ph-alert-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m10.3 4.2-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-2.8l-8-14a2 2 0 0 0-3.4 0Z M12 9v5m0 3v.1'/%3E%3C/svg%3E");
}
body.ph-site .alert:is(.alert-danger,.alert-error) {
    --ph-alert-tone:var(--ph-danger);
    --ph-alert-fill:var(--ph-danger-soft);
    --ph-alert-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m9 9 6 6m0-6-6 6'/%3E%3C/svg%3E");
}
body.ph-site .alert.alert::before {
    content:"";
    position:absolute;
    inset-inline-start:18px;
    top:19px;
    width:22px;
    height:22px;
    background:var(--ph-alert-tone);
    -webkit-mask:var(--ph-alert-icon) center / contain no-repeat;
    mask:var(--ph-alert-icon) center / contain no-repeat;
    pointer-events:none;
}
/* Respect existing message icons and keep a single visual marker. */
body.ph-site .alert.alert:has(> i)::before { content:none; }
body.ph-site .alert.alert > i {
    position:absolute;
    inset-inline-start:18px;
    top:19px;
    width:22px;
    height:22px;
    margin:0;
    color:var(--ph-alert-tone);
    font-size:21px;
    line-height:22px;
}
body.ph-site .alert.alert :is(h2,h3,h4,strong) { color:inherit; }
body.ph-site .alert.alert :is(h2,h3,h4) { margin:0 0 7px; font-size:13px; }
body.ph-site .alert.alert p { margin:0; color:inherit; font-size:inherit; line-height:inherit; }
body.ph-site .alert.alert p + p { margin-top:7px; }
body.ph-site .alert.alert ul { margin:7px 0 0; padding-inline-start:18px; }
body.ph-site .alert.alert li + li { margin-top:3px; }
body.ph-site .alert.alert a:not(.btn):not(.close) { color:inherit; text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:4px; }
body.ph-site .alert.alert > :is(.pull-left,.pull-right) { float:none !important; }
body.ph-site .alert.alert:has(> .pull-left, > .pull-right),
body.ph-site #phPageContent .alert.alert:has(> .pull-left, > .pull-right) { display:flex; flex-direction:column; align-items:flex-start; gap:0; }
body.ph-site .alert.alert > :is(.pull-left,.pull-right) { order:1; }
body.ph-site .alert.alert .row { margin-inline:0; }
body.ph-site .alert.alert .btn {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    float:none !important;
    min-height:36px;
    height:auto;
    max-width:100%;
    margin-top:10px;
    margin-inline-end:7px;
    padding:7px 12px;
    border:1px solid color-mix(in srgb,var(--ph-alert-tone) 28%,transparent) !important;
    border-radius:8px;
    background:color-mix(in srgb,var(--ph-surface) 65%,transparent) !important;
    color:var(--ph-alert-tone) !important;
    box-shadow:none;
    font-size:11px;
    font-weight:500;
    line-height:1.8;
    white-space:normal;
    text-align:center;
    text-decoration:none !important;
}
body.ph-site .alert.alert .btn:is(.btn-primary,.btn-success,.btn-danger,.btn-warning,.btn-info) {
    background:var(--ph-alert-tone) !important;
    color:var(--ph-alert-button-ink) !important;
}
body.ph-site .alert.alert .btn:hover { filter:brightness(.96); }
body.ph-site .alert.alert .btn i { color:inherit; font-size:16px; }
body.ph-site .alert.alert:has(.close),
body.ph-site #phPageContent .alert.alert:has(.close) { padding-inline-end:50px; }
body.ph-site .alert.alert .close {
    position:absolute;
    inset-inline-end:12px;
    inset-inline-start:auto;
    top:13px;
    display:grid;
    place-items:center;
    float:none;
    width:30px;
    height:30px;
    min-height:0;
    margin:0;
    padding:0;
    border:0 !important;
    border-radius:7px;
    color:inherit !important;
    background:transparent !important;
    font-size:22px;
    opacity:.7;
    text-shadow:none;
}
body.ph-site .alert.alert .close:hover { opacity:1; background:color-mix(in srgb,var(--ph-alert-tone) 10%,transparent) !important; }
body.ph-site .alert:is(.hidden,.w-hidden,[hidden]) { display:none !important; }
html[data-ph-theme="dark"] body.ph-site .alert.alert,
body.ph-site.nightMode .alert.alert { --ph-alert-button-ink:#17223b; }

/* Replace browser/Bootstrap black focus outlines while preserving keyboard feedback. */
html body.ph-site a:is(:focus,.focus) { outline:none !important; }
html body.ph-site a:is(:focus-visible,.focus) {
    outline:none !important;
    border-radius:6px;
    box-shadow:0 0 0 1px var(--ph-primary),0 0 0 4px var(--ph-primary-soft) !important;
    -webkit-box-decoration-break:clone;
    box-decoration-break:clone;
}
@media(max-width:600px) {
    body.ph-site .alert.alert,
    body.ph-site #phPageContent .alert.alert { padding:14px 15px; padding-inline-start:48px; font-size:12px; border-radius:11px; }
    body.ph-site .alert.alert::before,
    body.ph-site .alert.alert > i { inset-inline-start:14px; top:17px; width:20px; height:20px; }
    body.ph-site .alert.alert:has(.close),
    body.ph-site #phPageContent .alert.alert:has(.close) { padding-inline-end:44px; }
    body.ph-site .alert.alert .btn { min-height:40px; }
}
@media(forced-colors:active) {
    html body.ph-site a:is(:focus-visible,.focus) { outline:2px solid Highlight !important; outline-offset:3px; }
    body.ph-site .alert.alert { border-color:CanvasText; }
}
