/* Scope: gwsp_wrap */
.gwsp_wrap {
    display: flex;
    gap: 12px;
    align-items: center;
    position: relative;
    z-index: 20; /* Ensure above standard content */
    margin-bottom: 20px;
}

/* Dropdown Wrapper */
.gwsp_dropdown_wrap {
    position: relative;
    display: inline-block;
}

/* Buttons */
.gwsp_btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
box-shadow: 0 4px 13px 0 rgb(254 25 84 / 12%);
    -webkit-tap-highlight-color: transparent;
}

.gwsp_btn:hover, 
.gwsp_btn:focus-visible {
box-shadow: 8px 8px 32px rgba(64, 68, 77, .2);
background-color:#ffffff;
}

.gwsp_btn_ai svg { color: #ffffff; }

/* Menus */
.gwsp_menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    padding: 6px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transform-origin: top left;
    animation: gwsp_fade_in 0.15s ease-out;
}

/* RTL Support logic if needed, else default LTR */
[dir="rtl"] .gwsp_menu {
    left: auto;
    right: 0;
    transform-origin: top right;
}

.gwsp_menu[hidden] {
    display: none;
    animation: none;
}

/* Menu Items */
.gwsp_item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color 0.15s;
    box-shadow: none;
}

.gwsp_item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.gwsp_item:focus-visible {
    background-color: #f3f4f6;
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.gwsp_icon_img {
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
}

/* Toast */
.gwsp_toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background-color: #1f2937;
    color: #fff;
    padding: 10px 20px;
    border-radius: 99px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99999;
    pointer-events: none;
    text-align: center;
    max-width: 90vw;
}

.gwsp_toast.gwsp_active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

@keyframes gwsp_fade_in {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .gwsp_menu {
        position: fixed; /* Better for small screens to avoid overflow clipping */
        left: 10px;
        right: auto;
        bottom: 10px;
        top: auto;
        width: calc(100% - 20px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        transform-origin: bottom center;
    }
    /* If button is clicked, we override logic in JS or CSS specific queries if strictly needed. 
       However, 'absolute' usually suffices if overflow-x is handled. 
       Reverting to absolute for simplicity unless site breaks it. */
    .gwsp_menu {
        position: absolute;
        width: auto;
        left: 0;
        top: calc(100% + 8px);
        bottom: auto;
    }
    
    /* Prevent right overflow */
    .gwsp_wrap:last-child .gwsp_menu,
    .gwsp_menu_share { 
        left: auto; 
        right: 0; 
        transform-origin: top right;
    }
}


.gwsp_dropdown_wrap .gwsp_btn.gwsp_btn_share {
    background: #ff0000;
}