/* Zapped Help & Support widget */
.help-widget {
    --help-widget-ink: #182033;
    --help-widget-muted: #667085;
    --help-widget-line: #e8edf5;
    --help-widget-paper: #ffffff;
    --help-widget-soft: #f7f9fc;
    --help-widget-pink: rgb(171, 16, 192);
    --help-widget-purple: rgb(153, 32, 228);
    --help-widget-blue: rgb(123, 24, 184);
    --help-widget-brand-soft: rgb(248, 239, 253);
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1050;
    font-size: 14px;
    color: var(--help-widget-ink);
}

.help-widget-launcher {
    position: relative;
    width: 60px;
    height: 60px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 50%;
    background: linear-gradient(145deg, var(--help-widget-purple), var(--help-widget-blue));
    color: #fff;
    box-shadow: 0 18px 38px rgba(43,54,112,.26);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: transform .16s ease, box-shadow .16s ease;
}
.help-widget-launcher:hover { transform: translateY(-1px) scale(1.04); box-shadow: 0 20px 44px rgba(43,54,112,.32); }
.help-widget-launcher-status {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 13px;
    height: 13px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #ffb020;
    z-index: 2;
}
.help-widget-launcher-media {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 50%;
}
.help-widget-launcher-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}
.help-widget-launcher-close {
    display: none;
    font-size: 24px;
    color: #fff;
}
.help-widget.is-open .help-widget-launcher-open,
.help-widget.is-open .help-widget-launcher-status { display: none; }
.help-widget.is-open .help-widget-launcher-close { display: inline; }

.help-widget-panel {
    position: absolute;
    right: 0;
    bottom: 76px;
    width: 420px;
    max-width: calc(100vw - 32px);
    height: min(690px, calc(100vh - 118px));
    background: var(--help-widget-soft);
    border: 1px solid var(--help-widget-line);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(17,24,39,.24);
    overflow: hidden;
    display: none;
    flex-direction: column;
}
.help-widget.is-open .help-widget-panel { display: flex; }

.help-widget-header {
    position: relative;
    background: linear-gradient(135deg, #2b153a 0%, var(--help-widget-blue) 100%);
    color: #fff;
    padding: 18px 22px 19px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.help-widget-header:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: rgba(153,32,228,.58);
}
.help-widget-title { font-weight: 800; font-size: 20px; line-height: 1.2; }
.help-widget-subtitle { font-size: 13px; opacity: .82; margin-top: 5px; line-height: 1.45; }
.help-widget-back {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.help-widget-body { flex: 1; min-height: 0; padding: 14px; overflow-y: auto; }
.help-widget-view { display: none; }
.help-widget-view.is-active { display: block; }

.help-widget-hero,
.help-widget-guide-card,
.help-widget-message-card {
    border: 1px solid var(--help-widget-line);
    border-radius: 18px;
    background: var(--help-widget-paper);
    box-shadow: 0 10px 24px rgba(44,52,82,.06);
}
.help-widget-hero { padding: 14px; overflow: hidden; }
.help-widget-kicker {
    color: var(--help-widget-pink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.help-widget-avatar-stack { display: flex; align-items: center; margin-top: 10px; }
.help-widget-avatar-stack span {
    width: 38px;
    height: 38px;
    margin-right: -10px;
    border: 3px solid #fff;
    border-radius: 50%;
    background-color: #f2f4f8;
    background-position: center;
    background-size: cover;
    box-shadow: 0 8px 18px rgba(36,45,74,.14);
}
.help-widget-hero h3 {
    margin: 12px 0 0;
    color: var(--help-widget-ink);
    font-size: 25px;
    line-height: 1.08;
    font-weight: 850;
}
.help-widget-hero p {
    margin: 7px 0 0;
    color: var(--help-widget-muted);
    line-height: 1.55;
}

.help-widget-actions { margin-top: 10px; display: grid; gap: 8px; }
.help-widget-action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.help-widget-action {
    width: 100%;
    min-height: 72px;
    padding: 12px;
    border: 1px solid var(--help-widget-line);
    border-radius: 16px;
    background: #fff;
    color: var(--help-widget-ink);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(44,52,82,.05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease, background .15s ease;
}
.help-widget-action:hover {
    border-color: rgba(153,32,228,.38);
    box-shadow: 0 12px 26px rgba(44,52,82,.1);
    transform: translateY(-1px);
}
.help-widget-action-primary {
    min-height: 76px;
    color: #fff;
    border-color: rgba(153,32,228,.35);
    background: linear-gradient(135deg, var(--help-widget-pink), var(--help-widget-purple));
}
.help-widget-action-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255,255,255,.18);
}
.help-widget-action:not(.help-widget-action-primary) .help-widget-action-icon {
    color: var(--help-widget-purple);
    background: rgba(153,32,228,.12);
}
.help-widget-action:not(.help-widget-action-primary) .help-widget-action-icon-warning {
    color: #b7791f;
    background: rgba(251,191,36,.16);
}
.help-widget-action:not(.help-widget-action-primary) .help-widget-action-icon-info {
    color: #2563eb;
    background: rgba(37,99,235,.12);
}
.help-widget-action-copy { min-width: 0; flex: 1; }
.help-widget-action-copy span { display: block; font-weight: 800; line-height: 1.25; }
.help-widget-action-copy small { display: block; margin-top: 4px; color: var(--help-widget-muted); font-size: 12px; line-height: 1.3; font-weight: 600; }
.help-widget-action-primary .help-widget-action-copy small { color: rgba(255,255,255,.82); }
.help-widget-action-arrow { margin-top: 11px; color: currentColor; opacity: .72; }

.help-widget-guide-card { margin-top: 9px; padding: 10px 12px; }
.help-widget-guide-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.help-widget-guide-card-header label {
    margin: 0;
    color: var(--help-widget-ink);
    font-size: 13px;
    font-weight: 800;
}
.help-widget-guide-card-header a {
    color: var(--help-widget-pink);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.help-widget-guide-card-header a:hover { color: var(--help-widget-purple); text-decoration: none; }
.help-widget-search { position: relative; }
.help-widget-search i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #99a2b3;
}
.help-widget-search-input {
    width: 100%;
    height: 40px;
    padding: 10px 12px 10px 38px;
    border: 1px solid var(--help-widget-line);
    border-radius: 13px;
    background: #fbfcfe;
    color: var(--help-widget-ink);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.help-widget-search-input:focus {
    border-color: rgba(153,32,228,.55);
    box-shadow: 0 0 0 3px rgba(153,32,228,.1);
}
.help-widget-topic-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.help-widget-topic-chip {
    border: 1px solid var(--help-widget-line);
    border-radius: 999px;
    background: #fff;
    color: #4b5565;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.help-widget-topic-chip:hover { border-color: rgba(153,32,228,.45); color: var(--help-widget-purple); background: rgba(153,32,228,.07); }
.help-widget-search-results { display: grid; gap: 8px; margin-top: 12px; }
.help-widget-result {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px;
    border: 1px solid var(--help-widget-line);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(44,52,82,.05);
}
.help-widget-result:hover {
    border-color: rgba(153,32,228,.42);
    background: rgba(153,32,228,.06);
    color: inherit;
    text-decoration: none;
}
.help-widget-result-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b7791f;
    background: rgba(251,191,36,.16);
}
.help-widget-result-body { min-width: 0; flex: 1; }
.help-widget-result-title {
    display: block;
    color: var(--help-widget-ink);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}
.help-widget-result-summary {
    display: block;
    color: var(--help-widget-muted);
    font-size: 12px;
    line-height: 1.42;
    margin-top: 4px;
}
.help-widget-result-arrow { margin-top: 5px; color: #a6adbb; }
.help-widget-result-empty,
.help-widget-result-loading {
    border: 1px dashed #d6ddea;
    border-radius: 14px;
    background: rgba(255,255,255,.65);
    color: var(--help-widget-muted);
    padding: 13px;
    font-size: 13px;
}
.help-widget-result-empty strong { display: block; color: var(--help-widget-ink); margin-bottom: 4px; }

.help-widget-input,
.help-widget-textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--help-widget-line);
    border-radius: 13px;
    margin-bottom: 10px;
    outline: none;
    color: var(--help-widget-ink);
    background: #fff;
}
.help-widget-input:focus,
.help-widget-textarea:focus {
    border-color: rgba(153,32,228,.55);
    box-shadow: 0 0 0 3px rgba(153,32,228,.1);
}
.help-widget-textarea { resize: vertical; min-height: 120px; }
.help-widget-intent-description {
    border: 1px solid var(--help-widget-line);
    border-radius: 16px;
    background: #fff;
    color: var(--help-widget-muted);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 13px;
}
.help-widget-checkbox {
    display: block;
    padding: 10px 0;
    color: var(--help-widget-ink);
    cursor: pointer;
}
.help-widget-checkbox input { margin-right: 8px; }
.help-widget-turnstile { margin-bottom: 10px; }

.help-widget-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--help-widget-pink), var(--help-widget-purple));
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(123,24,184,.22);
}
.help-widget-submit:hover { filter: brightness(.98); }
.help-widget-submit:disabled { opacity: .6; cursor: not-allowed; }
.help-widget-error {
    color: #b42318;
    background: #fff1f0;
    border: 1px solid #ffd3cf;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 10px;
    padding: 9px 11px;
}

.help-widget-view-success { text-align: center; padding: 28px 8px; }
.help-widget-success-icon { font-size: 44px; color: #16a34a; margin-bottom: 12px; }
.help-widget-success-text { font-weight: 800; }
.help-widget-success-ticket { color: var(--help-widget-muted); font-size: 13px; }
.help-widget-done { min-height: 0; justify-content: center; }

@media (max-width: 480px) {
    .help-widget { right: 14px; bottom: 14px; }
    .help-widget-panel {
        right: -2px;
        bottom: 70px;
        width: calc(100vw - 24px);
        height: min(680px, calc(100vh - 96px));
        border-radius: 20px;
    }
    .help-widget-body { padding: 13px; }
    .help-widget-action-row { grid-template-columns: 1fr; }
}
