/* Fjärrsupportguiden (app/components/remote/). Prefix: rsg- */

:root {
    --rsg-ink: #0b1324;
    --rsg-muted: #5b6475;
    --rsg-line: #dfe4ec;
    --rsg-brand: #2f8f2f;
    --rsg-attention: #ff5a1f;
}

body.rsg-open {
    overflow: hidden;
}

.rsg-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 16px 24px;
    overflow-y: auto;
    background: rgba(6, 16, 36, 0.62);
    backdrop-filter: blur(2px);
}

.rsg-dialog {
    position: relative;
    width: 100%;
    max-width: 640px;
    padding: 28px 28px 20px;
    border-radius: 18px;
    background: #fff;
    color: var(--rsg-ink);
    box-shadow: 0 24px 60px rgba(6, 16, 36, 0.35);
}

.rsg-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--rsg-line);
    border-radius: 50%;
    background: #fff;
    color: var(--rsg-ink);
    font-size: 1rem;
    line-height: 1;
}

.rsg-close:hover,
.rsg-close:focus-visible {
    background: var(--rsg-ink);
    color: #fff;
}

.rsg-title {
    margin: 0 44px 8px 0;
    font-size: 1.45rem;
    color: var(--rsg-ink);
}

.rsg-intro {
    margin-bottom: 18px;
    color: var(--rsg-muted);
}

.rsg-detected {
    display: block;
    margin-top: 4px;
    font-size: 0.92rem;
}

/* Stegväljare */
.rsg-stepper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.rsg-stepper-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 8px 10px;
    border: 1px solid var(--rsg-line);
    border-radius: 12px;
    background: #f6f8fb;
    color: var(--rsg-muted);
    font-size: 0.82rem;
    text-align: left;
    line-height: 1.25;
}

.rsg-stepper-num {
    flex: 0 0 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--rsg-line);
    font-weight: 700;
    color: var(--rsg-ink);
}

.rsg-stepper-btn.is-active {
    border-color: var(--rsg-brand);
    background: #eef7ee;
    color: var(--rsg-ink);
    font-weight: 700;
}

.rsg-stepper-btn.is-active .rsg-stepper-num,
.rsg-stepper-btn.is-done .rsg-stepper-num {
    background: var(--rsg-brand);
    border-color: var(--rsg-brand);
    color: #fff;
}

.rsg-step-title {
    font-size: 1.12rem;
    margin-bottom: 14px;
    color: var(--rsg-ink);
}

.rsg-step-text {
    margin: 16px 0 6px;
    font-size: 1.02rem;
    color: var(--rsg-ink);
}

.rsg-step-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--rsg-muted);
}

.rsg-step-hint kbd {
    padding: 2px 6px;
    border: 1px solid #c9d1dc;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    color: var(--rsg-ink);
    font-size: 0.82rem;
}

.rsg-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.rsg-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 16px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--rsg-line);
    font-size: 0.88rem;
    color: var(--rsg-muted);
}

/* Markering som visar var kunden ska klicka */
.rsg-highlight {
    position: relative;
    outline: 3px solid var(--rsg-attention);
    outline-offset: 3px;
    border-radius: 6px;
    animation: rsgPulse 1.6s ease-in-out infinite;
}

@keyframes rsgPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.45); }
    50% { box-shadow: 0 0 0 9px rgba(255, 90, 31, 0); }
}

/* Pil mot webbläsarens nedladdningsknapp */
.rsg-pointer {
    position: fixed;
    top: 6px;
    right: clamp(70px, 8vw, 130px);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    pointer-events: none;
    animation: rsgBounce 1.1s ease-in-out infinite;
}

.rsg-pointer-arrow {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    color: var(--rsg-attention);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.rsg-pointer-label {
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--rsg-attention);
    font-weight: 700;
    font-size: 0.9rem;
}

@keyframes rsgBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Gemensamt för ritade fönster */
.rsg-browser,
.rsg-folder,
.rsg-uac,
.rsg-tv {
    border: 1px solid #c9d1dc;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 0.85rem;
    color: #1f2937;
    user-select: none;
}

.rsg-file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    height: 30px;
    border-radius: 7px;
    background: #0e8ee9;
    color: #fff;
    font-size: 0.85rem;
}

/* Webbläsare */
.rsg-browser-tabs {
    padding: 6px 10px 0;
    background: #e8ebf0;
}

.rsg-browser-tab {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 8px 8px 0 0;
    background: #fff;
    font-size: 0.78rem;
}

.rsg-browser-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-bottom: 1px solid #e3e7ee;
}

.rsg-browser-nav {
    color: #9aa3b2;
    letter-spacing: 4px;
}

.rsg-browser-address {
    flex: 1;
    padding: 4px 12px;
    border-radius: 999px;
    background: #f1f3f6;
    color: #4b5563;
    font-size: 0.78rem;
}

.rsg-browser-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rsg-browser-dl {
    display: inline-flex;
    padding: 3px;
    color: #1f2937;
}

.rsg-browser-more {
    color: #4b5563;
    font-weight: 700;
}

.rsg-browser-body {
    position: relative;
    height: 150px;
    background: linear-gradient(145deg, #061024 0%, #0d1d40 100%);
}

.rsg-download-panel {
    position: absolute;
    top: 8px;
    right: 10px;
    width: min(270px, 80%);
    padding: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}

.rsg-download-panel-title {
    margin-bottom: 8px;
    font-weight: 700;
}

.rsg-download-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
}

.rsg-download-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    font-weight: 600;
}

.rsg-open-link {
    padding: 0 4px;
    color: #0a66c2;
    font-weight: 600;
    text-decoration: underline;
}

/* Mappen Hämtade filer */
.rsg-folder-bar {
    padding: 8px 12px;
    background: #f1f3f6;
    border-bottom: 1px solid #e3e7ee;
    font-weight: 600;
}

.rsg-folder-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px;
    padding: 8px;
    font-weight: 600;
}

/* Windows-frågan */
.rsg-uac {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
}

.rsg-uac-head {
    padding: 14px 16px;
    background: #fff4d6;
    border-bottom: 1px solid #f0e2b6;
}

.rsg-uac-title {
    font-size: 0.78rem;
    color: #4b5563;
}

.rsg-uac-question {
    margin-top: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.rsg-uac-app {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.rsg-uac-app-name {
    font-weight: 700;
}

.rsg-uac-publisher {
    font-size: 0.8rem;
    color: #4b5563;
}

.rsg-uac-buttons {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
    background: #f3f4f6;
}

.rsg-uac-btn {
    flex: 1;
    padding: 7px 0;
    border: 1px solid #c3c8d0;
    border-radius: 6px;
    background: #fff;
    text-align: center;
    font-weight: 600;
}

.rsg-uac-yes {
    border-color: #0a66c2;
    background: #0a66c2;
    color: #fff;
}

/* TeamViewer-fönstret */
.rsg-tv {
    max-width: 420px;
    margin: 0 auto;
}

.rsg-tv-bar {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #0e8ee9;
    color: #fff;
    font-weight: 600;
}

.rsg-tv-controls {
    letter-spacing: 6px;
    font-weight: 400;
}

.rsg-tv-body {
    display: grid;
    gap: 14px;
    padding: 18px 16px 20px;
}

.rsg-tv-field {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
}

.rsg-tv-label {
    font-size: 0.8rem;
    color: #4b5563;
}

.rsg-tv-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #111827;
}

.rsg-tv-callout {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--rsg-attention);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    .rsg-overlay {
        padding-top: 64px;
    }

    .rsg-dialog {
        padding: 22px 16px 16px;
    }

    .rsg-stepper-title {
        display: none;
    }

    .rsg-stepper-btn {
        justify-content: center;
    }
}

/* style.css stänger av alla animationer med !important; tillåt guidens egna. */
body.home-v3 .rsg-highlight {
    animation: rsgPulse 1.6s ease-in-out infinite !important;
}

body.home-v3 .rsg-pointer {
    animation: rsgBounce 1.1s ease-in-out infinite !important;
}

@media (prefers-reduced-motion: reduce) {
    body.home-v3 .rsg-highlight,
    body.home-v3 .rsg-pointer {
        animation: none !important;
    }
}
