/* ============================================
   Pro Sticky Widgets — psw.css  v2.0
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* ── Quote: fixed bottom-LEFT ────────────── */
#psw-quote-outer {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 99999;
    font-family: 'Outfit', sans-serif;
}

/* ── Globe: fixed bottom-RIGHT ───────────── */
#psw-wrapper {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
}

/* ============================================
   QUOTE BUTTON
   ============================================ */
.psw-quote-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 14px;
    height: 52px;
    background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
    border-radius: 100px;
    text-decoration: none;
    color: #ffffff;
    box-shadow:
        0 8px 28px rgba(26, 86, 219, 0.45),
        0 2px 8px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.18);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect */
.psw-quote-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.psw-quote-btn:hover::before {
    left: 150%;
}

.psw-quote-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 16px 40px rgba(26, 86, 219, 0.55),
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.psw-quote-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Quote icon */
.psw-quote-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    padding: 4px;
    box-sizing: border-box;
}

.psw-quote-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Quote label */
.psw-quote-label {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    line-height: 1;
}

/* ============================================
   GLOBE BUTTON
   ============================================ */
.psw-lang-wrap {
    position: relative;
}

.psw-globe-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #0f3460 100%);
    border: 2px solid rgba(255,255,255,0.14);
    box-shadow:
        0 8px 28px rgba(15,52,96,0.5),
        0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.psw-globe-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow:
        0 16px 40px rgba(15,52,96,0.6),
        0 4px 12px rgba(0,0,0,0.35);
    border-color: rgba(255,255,255,0.28);
}

.psw-globe-btn:active { transform: scale(0.97); }

.psw-globe-btn.psw-open {
    background: linear-gradient(135deg, #e94560 0%, #b91c3a 100%);
    border-color: rgba(255,255,255,0.22);
}

.psw-globe-svg {
    width: 24px;
    height: 24px;
    color: #fff;
    transition: transform 0.45s ease;
}

.psw-globe-btn.psw-open .psw-globe-svg {
    transform: rotate(20deg);
}

/* Pulse ring */
.psw-globe-btn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(233,69,96,0.45);
    animation: psw-pulse 2.8s ease-out infinite;
    pointer-events: none;
}

@keyframes psw-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* Lang badge */
.psw-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    background: #e94560;
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 2px 5px;
    border-radius: 20px;
    border: 2px solid #fff;
    line-height: 1.3;
    pointer-events: none;
    transition: background 0.3s ease;
}

.psw-globe-btn.psw-open .psw-badge {
    background: #1a1a2e;
}

/* ============================================
   DROPDOWN
   ============================================ */
.psw-dropdown {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 232px;
    background: rgba(12, 18, 38, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 18px;
    box-shadow:
        0 24px 64px rgba(0,0,0,0.55),
        0 8px 24px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transform-origin: bottom right;
    pointer-events: none;
    transition:
        opacity 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.psw-dropdown.psw-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Dropdown header */
.psw-dropdown-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.psw-dropdown-header svg {
    width: 14px;
    height: 14px;
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}

.psw-dropdown-header span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.32);
}

/* Lang list */
.psw-lang-list {
    padding: 8px;
}

/* Lang item */
.psw-lang-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    border-radius: 11px;
    text-decoration: none;
    color: rgba(255,255,255,0.72);
    transition: all 0.18s ease;
    cursor: pointer;
    margin-bottom: 4px;
    border: 1px solid transparent;
}

.psw-lang-item:last-child { margin-bottom: 0; }

.psw-lang-item:hover {
    background: rgba(255,255,255,0.07);
    color: #fff;
    transform: translateX(2px);
}

.psw-lang-item.psw-active {
    background: linear-gradient(135deg, rgba(26,86,219,0.22), rgba(15,52,96,0.18));
    border-color: rgba(26,86,219,0.3);
    color: #fff;
}

/* Flag */
.psw-flag {
    width: 40px;
    height: 27px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.5),
        0 0 0 1px rgba(255,255,255,0.1);
    flex-shrink: 0;
    line-height: 0;
    display: block;
}

.psw-flag svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Lang info */
.psw-lang-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.psw-lang-name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    color: inherit;
}

.psw-lang-native {
    font-size: 10.5px;
    font-weight: 400;
    color: rgba(255,255,255,0.38);
    line-height: 1.2;
}

.psw-lang-item.psw-active .psw-lang-native {
    color: rgba(100,160,255,0.65);
}

/* Check icon */
.psw-check {
    width: 17px;
    height: 17px;
    color: #4a9eff;
    opacity: 0;
    flex-shrink: 0;
    transition: opacity 0.18s ease;
}

.psw-check svg {
    width: 100%;
    height: 100%;
}

.psw-lang-item.psw-active .psw-check {
    opacity: 1;
}

/* Stagger animations */
.psw-dropdown.psw-visible .psw-lang-item:nth-child(1) {
    animation: psw-item-in 0.22s ease 0.05s both;
}
.psw-dropdown.psw-visible .psw-lang-item:nth-child(2) {
    animation: psw-item-in 0.22s ease 0.10s both;
}

@keyframes psw-item-in {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Mobile ────────────────────────────────── */
@media (max-width: 480px) {
    #psw-wrapper {
        bottom: 16px;
        right: 16px;
    }
    .psw-quote-btn {
        height: 46px;
        padding: 0 16px 0 12px;
    }
    .psw-quote-label {
        font-size: 12.5px;
    }
    .psw-globe-btn {
        width: 46px;
        height: 46px;
    }
    .psw-dropdown {
        width: 210px;
    }
}

/* ── SVG conflict protection (theme override fix) ── */
#psw-wrapper svg,
#psw-quote-outer svg {
    fill: none !important;
    overflow: visible;
}
#psw-wrapper svg circle,
#psw-wrapper svg ellipse,
#psw-wrapper svg path,
#psw-wrapper svg rect,
#psw-wrapper svg line {
    fill: inherit;
}
.psw-globe-svg circle,
.psw-globe-svg ellipse,
.psw-globe-svg path {
    stroke: #ffffff !important;
    fill: none !important;
}
