/* ============================================================
   Floating Sync Widget — chat-bubble style
   Appears on all plugin admin pages (bottom-right corner)
   ============================================================ */

#pssg-float-sync-widget {
    position: fixed;
    bottom: 100px;
    right: 28px;
    z-index: 99999;
    /* font-family: Arial, sans-serif; */
}

/* ---- Toggle bubble ---- */
.pssg-float-toggle-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1a73e8;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.45);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    padding: 0;
}

.pssg-float-toggle-btn:hover {
    background: #1558b0;
    transform: scale(1.07);
    box-shadow: 0 6px 18px rgba(26, 115, 232, 0.55);
}

.pssg-float-toggle-btn:focus {
    outline: 3px solid rgba(26, 115, 232, 0.4);
    outline-offset: 2px;
}

.pssg-float-toggle-btn i {
    transition: transform 0.3s;
}

.pssg-float-toggle-btn.is-syncing i {
    animation: pssg-float-spin 1s linear infinite;
}

/* ---- Panel (chat box) ---- */
.pssg-float-panel {
    position: absolute;
    bottom: 66px;
    right: 0;
    width: 290px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform-origin: bottom right;
}

/* ---- Panel header ---- */
.pssg-float-panel-header {
    background: #1a73e8;
    color: #fff;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.pssg-float-panel-header span {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pssg-float-panel-header span::before {
    content: '\e800'; /* pssg_icon-spin3 unicode placeholder */
    font-family: 'pssg-icon';
    font-size: 15px;
    opacity: 0.85;
}

.pssg-float-panel-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 2px 4px;
    opacity: 0.8;
    transition: opacity 0.15s;
    border-radius: 3px;
}

.pssg-float-panel-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.15);
}

/* ---- Panel body ---- */
.pssg-float-panel-body {
    padding: 16px;
}


/* ---- Message area ---- */
.pssg-float-message-area {
    font-size: 12px;
    color: #555;
    min-height: 18px;
    margin-top: 10px;
    padding: 6px 8px;
    background: #f8f9fa;
    border-radius: 4px;
    line-height: 1.4;
    word-break: break-word;
}

.pssg-float-message-area:empty {
    display: none;
}

/* ---- Error area ---- */
.pssg-float-errors-area {
    margin-top: 8px;
    font-size: 11px;
    color: #d93025;
}

.pssg-float-errors-area .error-code {
    font-weight: 600;
    margin: 0 0 3px;
}

.pssg-float-errors-area .errors-lists p {
    margin: 2px 0;
}

/* ---- Spin animation ---- */
@keyframes pssg-float-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
