/* ================================================
   JF ADDONS — Front-end
   Cookie Consent + Google Review Badge
   Intelligent Web Crew · 2026
   ================================================ */

#jfa-root { --font: var(--floens-font, system-ui, sans-serif); }
#jfa-root * { box-sizing: border-box; font-family: var(--font); }

/* ══════════════════════════════════════════════
   COOKIE CONSENT
══════════════════════════════════════════════ */
#jfa-cookie {
    position: fixed;
    left: 0; right: 0;
    z-index: 999999;
    padding: 16px 20px;
    display: flex;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .4s;
}
#jfa-cookie.jfa--bottom { bottom: 0; transform: translateY(110%); }
#jfa-cookie.jfa--top    { top: 0;    transform: translateY(-110%); }
#jfa-cookie.jfa--show   { opacity: 1; transform: translateY(0); pointer-events: auto; }

.jfa-cookie__inner {
    max-width: 860px;
    width: 100%;
    background: #faf7f2;
    border: 1px solid rgba(181,130,58,.22);
    border-radius: 18px;
    box-shadow: 0 10px 50px rgba(43,29,14,.18), 0 2px 8px rgba(43,29,14,.08);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}
/* golden shimmer top line */
.jfa-cookie__inner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent 0%, #b5823a 40%, rgba(181,130,58,.3) 60%, transparent 100%);
}
.jfa-cookie__emoji {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(181,130,58,.2));
}
.jfa-cookie__text {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.58;
    color: #6b5540;
    margin: 0;
}
.jfa-cookie__text a {
    color: #b5823a;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.jfa-cookie__btns {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}
/* close X */
.jfa-cookie__x {
    position: absolute;
    top: 10px; right: 12px;
    width: 24px; height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #b5a090;
    font-size: 18px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    padding: 0;
    transition: background .18s, color .18s;
}
.jfa-cookie__x:hover { background: rgba(181,130,58,.12); color: #2b1d0e; }

/* Buttons */
.jfa-cb {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
    border: none;
    outline: none;
    white-space: nowrap;
    line-height: 1;
    transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s, background .2s, color .2s;
    font-family: var(--font);
}
.jfa-cb--accept {
    background: #b5823a;
    color: #fff;
    box-shadow: 0 4px 16px rgba(181,130,58,.38);
}
.jfa-cb--accept:hover  { background: #8c6222; transform: translateY(-1px); box-shadow: 0 6px 22px rgba(181,130,58,.48); }
.jfa-cb--decline {
    background: transparent;
    color: #9d8872;
    border: 1.5px solid rgba(181,130,58,.28);
}
.jfa-cb--decline:hover { border-color: #b5823a; color: #b5823a; transform: translateY(-1px); }

@media (max-width: 640px) {
    #jfa-cookie { padding: 10px; }
    .jfa-cookie__inner { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 16px 14px; }
    .jfa-cookie__emoji { display: none; }
    .jfa-cookie__btns  { width: 100%; justify-content: flex-end; }
    .jfa-cookie__x     { top: 8px; right: 8px; }
}

/* ══════════════════════════════════════════════
   GOOGLE REVIEW FLOATING BADGE
══════════════════════════════════════════════ */
#jfa-badge {
    position: fixed;
    bottom: 28px;
    z-index: 999998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s cubic-bezier(.22,1,.36,1), transform .4s cubic-bezier(.22,1,.36,1);
}
#jfa-badge.jfa--left  { left: 24px;  transform: translateX(-130%); }
#jfa-badge.jfa--right { right: 24px; transform: translateX(130%); }
#jfa-badge.jfa--show  { opacity: 1; pointer-events: auto; transform: translateX(0); }

.jfa-badge__link {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 100px;
    border: 1px solid rgba(181,130,58,.18);
    box-shadow: 0 6px 28px rgba(43,29,14,.18), 0 1px 4px rgba(43,29,14,.07);
    overflow: hidden;
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    transition: box-shadow .25s cubic-bezier(.22,1,.36,1), transform .25s cubic-bezier(.22,1,.36,1);
    animation: jfaBadgeBreath 4s ease-in-out 1.5s infinite;
}
@keyframes jfaBadgeBreath {
    0%,100% { box-shadow: 0 6px 28px rgba(43,29,14,.18), 0 1px 4px rgba(43,29,14,.07); }
    50%     { box-shadow: 0 8px 34px rgba(181,130,58,.3), 0 2px 8px rgba(43,29,14,.1); }
}
.jfa-badge__link:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 14px 42px rgba(43,29,14,.2), 0 3px 10px rgba(43,29,14,.09);
    animation: none;
}

/* 4-color Google stripe on left edge */
.jfa-badge__stripe {
    width: 7px;
    align-self: stretch;
    background: linear-gradient(to bottom, #EA4335 25%, #FBBC05 25% 50%, #34A853 50% 75%, #4285F4 75%);
    flex-shrink: 0;
}

/* Google G logo */
.jfa-badge__gicon {
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 2px 0 9px;
    flex-shrink: 0;
}
.jfa-badge__gicon svg { width: 28px; height: 28px; }

/* Text content */
.jfa-badge__body {
    display: flex;
    flex-direction: column;
    padding: 9px 18px 9px 6px;
    line-height: 1.2;
}
.jfa-badge__stars {
    color: #f5b93e;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}
.jfa-badge__label {
    font-size: 13px;
    font-weight: 700;
    color: #2b1d0e;
    white-space: nowrap;
    display: block;
    font-family: var(--font);
}
.jfa-badge__sub {
    font-size: 11px;
    color: #7a6a58;
    white-space: nowrap;
    display: block;
    margin-top: 1px;
    font-family: var(--font);
}

/* Dismiss X — only visible on hover */
.jfa-badge__dismiss {
    position: absolute;
    top: -5px; right: -5px;
    width: 19px; height: 19px;
    border-radius: 50%;
    background: #2b1d0e;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .18s, transform .18s;
    pointer-events: none;
    padding: 0;
    z-index: 2;
}
#jfa-badge:hover .jfa-badge__dismiss {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.jfa-badge__dismiss:hover { background: #b5823a; }

@media (max-width: 480px) {
    #jfa-badge.jfa--left  { left: 12px;  bottom: 16px; }
    #jfa-badge.jfa--right { right: 12px; bottom: 16px; }
    .jfa-badge__label { font-size: 12px; }
    .jfa-badge__sub   { font-size: 10px; }
}
