/* Portland Mission Floating Actions */
.pfa-widget,
.pfa-widget * {
    box-sizing: border-box;
}

.pfa-widget {
    --pfa-dark: #063945;
    --pfa-teal: #087d78;
    --pfa-teal-deep: #066a66;
    --pfa-gold: #f2c052;
    --pfa-gold-light: #ffe8ad;
    --pfa-white: #ffffff;
    --pfa-border: rgba(6, 57, 69, 0.16);
    --pfa-shadow: 0 16px 34px rgba(6, 57, 69, 0.26);

    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: Arial, Helvetica, sans-serif;
}

body.admin-bar .pfa-widget {
    bottom: 22px;
}


/* Strong reset so theme button styles do not create red frames */
.pfa-widget .pfa-action,
.pfa-widget a.pfa-action,
.pfa-widget button.pfa-action {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 60px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    line-height: normal !important;
    text-align: right !important;
}

.pfa-widget .pfa-action::before,
.pfa-widget .pfa-action::after {
    box-sizing: border-box;
}

.pfa-widget button.pfa-action::-moz-focus-inner {
    border: 0;
    padding: 0;
}

.pfa-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 60px;
    padding: 0;
    cursor: pointer;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-family: inherit;
    text-decoration: none;
    animation: pfa-entrance 0.58s ease both;
    align-self: flex-end;
}


.pfa-action:nth-child(1) { animation-delay: 0.05s; }
.pfa-action:nth-child(2) { animation-delay: 0.13s; }
.pfa-action:nth-child(3) { animation-delay: 0.21s; }

@keyframes pfa-entrance {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: translateX(0); }
}

.pfa-action:focus-visible,
.pfa-share-panel a:focus-visible,
.pfa-share-panel button:focus-visible {
    outline: 3px solid rgba(242, 192, 82, 0.95);
    outline-offset: 4px;
}

.pfa-label {
    max-width: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    opacity: 0;
    color: #18363e;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 24px rgba(6, 57, 69, 0.12);
    font-size: 12px;
    font-weight: 900;
    line-height: 42px;
    white-space: nowrap;
    transition: max-width 0.25s ease, opacity 0.2s ease, padding 0.25s ease, border-color 0.25s ease;
}

.pfa-action:hover .pfa-label,
.pfa-action:focus-visible .pfa-label {
    max-width: 190px;
    padding: 0 15px;
    border-color: var(--pfa-border);
    opacity: 1;
}

.pfa-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 60px;
    height: 60px;
    border: 2px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    box-shadow: var(--pfa-shadow), 0 0 0 5px rgba(255, 255, 255, 0.78);
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: pfa-float 4.3s ease-in-out infinite;
}

.pfa-action:nth-child(2) .pfa-icon { animation-delay: 0.45s; }
.pfa-action:nth-child(3) .pfa-icon { animation-delay: 0.9s; }

.pfa-icon::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 11px;
    width: 46%;
    height: 30%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.34), rgba(255,255,255,0));
    pointer-events: none;
}

.pfa-icon svg {
    position: relative;
    z-index: 2;
    width: 27px;
    height: 27px;
}

@keyframes pfa-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.pfa-action:hover .pfa-icon,
.pfa-action:focus-visible .pfa-icon {
    transform: translateY(-3px) scale(1.07);
    box-shadow: 0 19px 41px rgba(6, 57, 69, 0.32), 0 0 0 5px rgba(255, 255, 255, 0.88);
}

.pfa-action--qa .pfa-icon {
    background: radial-gradient(circle at 30% 24%, rgba(255,255,255,0.20), transparent 29%), linear-gradient(135deg, var(--pfa-dark), var(--pfa-teal));
}

.pfa-action--qa .pfa-icon::after {
    content: "";
    position: absolute;
    inset: -7px;
    border: 1px solid rgba(8, 125, 120, 0.34);
    border-radius: 50%;
    animation: pfa-qa-pulse 2.8s ease-out infinite;
}

@keyframes pfa-qa-pulse {
    0% { opacity: 0.92; transform: scale(0.88); }
    75% { opacity: 0; transform: scale(1.3); }
    100% { opacity: 0; transform: scale(1.3); }
}

.pfa-action--share .pfa-icon {
    color: var(--pfa-dark);
    background: radial-gradient(circle at 30% 24%, rgba(255,255,255,0.50), transparent 28%), linear-gradient(135deg, var(--pfa-gold-light), var(--pfa-gold));
}

.pfa-action--facebook .pfa-icon {
    background: radial-gradient(circle at 30% 24%, rgba(255,255,255,0.20), transparent 29%), linear-gradient(135deg, #2a7df4, #0b5ec6);
}

.pfa-facebook-icon {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin-top: 4px;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 35px;
    font-weight: 950;
    line-height: 1;
}

.pfa-share-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: min(330px, calc(100vw - 28px));
    padding: 16px;
    border: 1px solid rgba(6, 57, 69, 0.14);
    border-radius: 19px;
    color: #18363e;
    background: #ffffff;
    box-shadow: 0 22px 60px rgba(6, 57, 69, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.97);
    transform-origin: bottom right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.pfa-share-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.pfa-share-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pfa-share-panel__head strong {
    color: var(--pfa-dark);
    font-size: 15px;
    font-weight: 950;
}

.pfa-share-panel__head button {
    width: 30px;
    height: 30px;
    padding: 0;
    cursor: pointer;
    border: 1px solid #d8e5e6;
    border-radius: 9px;
    color: var(--pfa-dark);
    background: #f8fbfb;
    font-size: 21px;
    line-height: 1;
}

.pfa-share-panel p {
    margin: 8px 0 13px;
    color: #687b81;
    font-size: 12px;
    line-height: 1.55;
}

.pfa-share-panel__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pfa-share-panel__grid a,
.pfa-share-panel__grid button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 10px;
    cursor: pointer;
    border: 1px solid #d8e5e6;
    border-radius: 10px;
    color: var(--pfa-dark);
    background: #f8fbfb;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.pfa-share-panel__grid a:hover,
.pfa-share-panel__grid button:hover {
    border-color: var(--pfa-teal);
    color: #ffffff;
    background: var(--pfa-teal);
    transform: translateY(-1px);
}

.pfa-toast {
    position: fixed;
    right: 22px;
    bottom: 238px;
    z-index: 1000000;
    max-width: min(320px, calc(100vw - 28px));
    padding: 12px 14px;
    border: 1px solid rgba(8, 125, 120, 0.18);
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--pfa-dark), var(--pfa-teal));
    box-shadow: 0 18px 42px rgba(6, 57, 69, 0.22);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

@media (max-width: 600px) {
    .pfa-widget {
        right: 14px;
        bottom: 14px;
        gap: 9px;
    }

    .pfa-icon {
        width: 56px;
        height: 56px;
        box-shadow: 0 14px 30px rgba(6, 57, 69, 0.24), 0 0 0 4px rgba(255,255,255,0.82);
    }

    .pfa-icon svg {
        width: 25px;
        height: 25px;
    }

    .pfa-facebook-icon {
        font-size: 33px;
    }

    .pfa-label {
        display: none;
    }

    .pfa-share-panel {
        bottom: 68px;
        width: min(320px, calc(100vw - 28px));
    }

    .pfa-toast {
        right: 14px;
        bottom: 214px;
    }
}
