/* ============================================================
   Live Screen Support - Frontend (button + popup)
   ============================================================ */

/* Floating button */
.lss-floating-button {
    position: fixed;
    bottom: 24px;
    z-index: 99998;
    padding: 14px 22px;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.2;
    transition: transform 0.15s, box-shadow 0.15s;
}

.lss-floating-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.32);
}

.lss-floating-button:active {
    transform: translateY(0);
}

/* Positions */
.lss-pos-bottom-right { right: 24px; }
.lss-pos-bottom-left  { left: 24px; }
.lss-pos-top-right    { top: 24px; bottom: auto; right: 24px; }
.lss-pos-top-left     { top: 24px; bottom: auto; left: 24px; }
.lss-pos-bottom-center,
.lss-pos-top-center   { left: 0; right: 0; margin-left: auto; margin-right: auto; width: -moz-max-content; width: max-content; max-width: 92vw; }
.lss-pos-top-center   { top: 24px; bottom: auto; }

/* Sizes */
.lss-size-small  { padding: 9px 16px;  font-size: 13px; }
.lss-size-medium { padding: 14px 22px; font-size: 15px; }
.lss-size-large  { padding: 18px 30px; font-size: 18px; }

/* Shapes */
.lss-shape-pill    { border-radius: 50px; }
.lss-shape-rounded { border-radius: 10px; }
.lss-shape-circle  {
    border-radius: 50%;
    width: 60px; height: 60px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.lss-shape-circle.lss-size-small { width: 48px; height: 48px; font-size: 22px; }
.lss-shape-circle.lss-size-large { width: 74px; height: 74px; font-size: 34px; }

/* Attention pulse (pauses on hover so the hover lift still works) */
.lss-pulse-btn { animation: lssBtnPulse 2.2s ease-in-out infinite; }
.lss-pulse-btn:hover { animation: none; }
@keyframes lssBtnPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.07); }
}

/* Inline button (shortcode) */
.lss-inline-button {
    display: inline-block;
    padding: 12px 24px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}
.lss-inline-button:hover { opacity: 0.92; }

/* Popup container */
.lss-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lss-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(3px);
}

.lss-popup-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    color: #1f2937;
    animation: lssPopIn 0.22s ease-out;
}

@keyframes lssPopIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

body.lss-popup-open {
    overflow: hidden;
}

/* Icons */
.lss-icon-big {
    font-size: 54px;
    line-height: 1;
    margin-bottom: 14px;
}

/* Code display */
.lss-code-display {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 10px;
    color: #1f2937;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    padding: 18px 12px;
    margin: 12px 0;
    direction: ltr;
    user-select: all;
}

.lss-popup-label {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lss-popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #047857;
    margin: 6px 0;
}

.lss-popup-message {
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
    margin: 8px 0 16px 0;
}

.lss-popup-instructions {
    font-size: 13px;
    color: #6b7280;
    margin: 8px 0 16px 0;
}

.lss-status-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: #4b5563;
    margin: 16px 0;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
}

.lss-pulse {
    width: 10px;
    height: 10px;
    background: #f59e0b;
    border-radius: 50%;
    animation: lssPulse 1.4s infinite;
    flex-shrink: 0;
}

@keyframes lssPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* Spinner */
.lss-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid #e5e7eb;
    border-top-color: #4a9eff;
    border-radius: 50%;
    margin: 20px auto;
    animation: lssSpin 0.9s linear infinite;
}

@keyframes lssSpin {
    to { transform: rotate(360deg); }
}

/* Buttons */
.lss-btn {
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    margin: 4px;
}

.lss-text-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    margin-top: 8px;
}

.lss-text-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.lss-btn-primary {
    background: #2563eb;
    color: #fff;
}
.lss-btn-primary:hover { background: #1d4ed8; }

.lss-btn-secondary {
    background: #e5e7eb;
    color: #1f2937;
}
.lss-btn-secondary:hover { background: #d1d5db; }

.lss-btn-danger {
    background: #dc2626;
    color: #fff;
}
.lss-btn-danger:hover { background: #b91c1c; }

/* Mobile adjustments */
@media (max-width: 480px) {
    .lss-floating-button { padding: 12px 18px; font-size: 14px; }
    .lss-size-small { padding: 9px 14px; font-size: 12px; }
    .lss-size-large { padding: 15px 24px; font-size: 16px; }
    .lss-shape-circle { width: 54px; height: 54px; padding: 0; }
    .lss-pos-bottom-right, .lss-pos-bottom-left, .lss-pos-bottom-center { bottom: 16px; }
    .lss-pos-top-right, .lss-pos-top-left, .lss-pos-top-center { top: 16px; }
    .lss-pos-bottom-right, .lss-pos-top-right { right: 16px; }
    .lss-pos-bottom-left, .lss-pos-top-left   { left: 16px; }

    .lss-code-display {
        font-size: 38px;
        letter-spacing: 8px;
        padding: 14px 8px;
    }

    .lss-popup-card {
        padding: 24px 20px;
    }
}

/* ============================================================
   Live remote pointer - drawn on the customer's page,
   following the support agent's mouse over the video.
   ============================================================ */
#lss-remote-pointer {
    position: fixed;
    z-index: 2147483640;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    margin-top: -13px;
    pointer-events: none;
    border: 3px solid #ff3b30;
    border-radius: 50%;
    background: rgba(255, 59, 48, 0.22);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 2px 10px rgba(0, 0, 0, 0.45);
    transition: left 0.05s linear, top 0.05s linear;
}

.lss-ptr-ripple {
    position: fixed;
    z-index: 2147483639;
    width: 22px;
    height: 22px;
    margin-left: -11px;
    margin-top: -11px;
    pointer-events: none;
    border: 3px solid #ff3b30;
    border-radius: 50%;
    animation: lssPtrRipple 1.1s ease-out forwards;
}

@keyframes lssPtrRipple {
    0%   { transform: scale(0.4); opacity: 0.9; }
    100% { transform: scale(3.4); opacity: 0; }
}
