/* Floating Button */
#fip-floating-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    cursor: pointer;
}
#fip-floating-btn img {
    width: 50px;
    height: auto;
}

/* Popup Overlay */
#fip-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

/* Popup Inner */
.fip-popup-inner {
    position: relative;
    /*background: #fff;*/
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    animation: slideFromBottomRight 0.5s ease-out forwards;
}
.fip-popup-inner img {
    max-width: 90vw;
    max-height: 80vh;
}

/* Close Button */
#fip-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: red;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

/* Animation */
@keyframes slideFromBottomRight {
    from { transform: translate(200%, 200%); opacity: 0; }
    to   { transform: translate(0,0); opacity: 1; }
}

/* Hanging Tag (Shirt Tag Style with Rope) */
#fip-floating-btn {
    position: fixed;
    top: 0;
    left: 40px; /* shift away from absolute corner for realism */
    z-index: 9999;
    cursor: pointer;
    transform-origin: top center; /* pivot point for swing */
    animation: pendulum 3s ease-in-out infinite;
}

/* Rope/Chain */
#fip-floating-btn::before {
    content: "";
    position: absolute;
    top: -140px; /* length of rope */
    left: 50%;
    transform: translateX(-50%);
    width: 3px; /* thickness of rope */
    height: 100px;  /* rope length */
    background: repeating-linear-gradient(
        to bottom,
        #666,
        #666 6px,
        #aaa 6px,
        #aaa 12px
    ); /* makes chain-like pattern */
}

/* Tag Image */
#fip-floating-btn img {
    width: 82px;
    height: auto;
    border-radius: 12px;
    /*background: #fff;*/
    padding: 6px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* Swinging Animation */
@keyframes pendulum {
    0%   { transform: rotate(-12deg); }
    50%  { transform: rotate(12deg); }
    100% { transform: rotate(-12deg); }
}
