#timesave-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ed743f 0%, #E65A1F 100%);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    z-index: 999998;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: none;
    text-decoration: none;
    user-select: none;
}

#timesave-floating-button:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, #ed743f 0%, #E65A1F 100%);
}

#timesave-floating-button svg {
    transition: transform 0.3s ease;
}

#timesave-floating-button:hover svg {
    transform: rotate(5deg);
}

#timesave-form-popup {
    position: fixed;
    bottom: calc(24px + 56px);
    max-height: calc(100vh - 40px); /* Prevent it from hitting the top */
    right: 24px;
    width: 420px;
    height: 90%;
    max-height: calc(100vh - 40px); /* Prevent it from hitting the top */
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    z-index: 999999;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


#timesave-form-popup.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

#timesave-form-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 300;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 1000000;
    backdrop-filter: blur(10px);
}

#timesave-form-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

#timesave-form-iframe-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 20px;
}

#timesave-form-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
    border-radius: 20px;
}
/* Optional: Prevent body scroll when popup is active */
body.timesave-popup-open {
    overflow: hidden;
}

/* Ensure the popup stretches edge-to-edge on mobile */
@media screen and (max-width: 767px) {
    #timesave-form-popup {
        border-radius: 0 !important;
        width: 100% !important;
        height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
    }

    #timesave-form-iframe {
        border-radius: 0 !important;
    }

    #timesave-form-close {
        top: 10px;
        right: 10px;
    }
}