/* Compact store helpdesk. Scoped styles keep the rest of the store and CRM unchanged. */
[data-shop-support] {--sp-primary:#6d28d9;--sp-ink:#18243b;--sp-muted:#69768b;--sp-border:#e5e9f0;--sp-soft:#f5f7fb;color:var(--sp-ink);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;overflow:visible;min-width:0}
[data-shop-support] [hidden] {display:none!important}
body.store-customer-page:has(.store-support-page){overflow-x:clip!important;overflow-y:visible!important;height:auto!important;min-height:100vh}
html:has(.store-support-page){overflow-y:auto!important;height:auto!important;overscroll-behavior-y:auto}
.store-support-page {overflow:visible!important;min-height:70vh;padding-bottom:32px}
.store-support-hero {padding:28px 0 22px!important;min-height:0!important}
.store-support-hero h1 {font-size:clamp(25px,3vw,38px)!important;line-height:1.2!important;margin:12px 0!important;letter-spacing:-.04em}
.store-support-hero p{font-size:14px!important;margin:0!important}
.support-breadcrumbs {font-size:12px;display:flex;gap:8px;align-items:center;margin-bottom:10px}.support-breadcrumbs a{color:#6d28d9;text-decoration:none}.support-crumb-sep{color:#a5aebc}
.store-support-hero .hero-badge{display:inline-flex;align-items:center;gap:7px;border-radius:20px;font-size:11px;padding:4px 10px;background:#ede9fe;color:#6d28d9}.pulse-dot{height:7px;width:7px;border-radius:50%;background:#20a67a;display:inline-block}
.gradient-text{color:#6d28d9}
[data-shop-support] button,[data-shop-support] input,[data-shop-support] textarea,[data-shop-support] select{font:inherit;box-sizing:border-box}
[data-shop-support] button{cursor:pointer;border:1px solid var(--sp-border);border-radius:8px;background:#fff;color:var(--sp-ink);padding:9px 13px;font-weight:600}
[data-shop-support] button:hover{background:#f5f3ff;border-color:#c9b5f2}[data-shop-support] button:disabled{opacity:.5;cursor:not-allowed}
[data-shop-support] button:focus-visible,[data-shop-support] a:focus-visible,[data-shop-support] textarea:focus-visible,[data-shop-support] input:focus-visible{outline:3px solid #c4b5fd;outline-offset:2px}
[data-shop-support] .support-shell{display:grid;grid-template-columns:270px minmax(0,1fr);gap:16px;align-items:start;margin:12px 0 30px;overflow:visible!important}
[data-shop-support] .support-sidebar,[data-shop-support] .support-chat{background:white;border:1px solid var(--sp-border);border-radius:12px;min-width:0;box-shadow:0 5px 22px #18243b05;padding:0}
[data-shop-support] .support-sidebar-header,[data-shop-support] .support-chat-header,[data-shop-support] .panel-header{padding:16px 18px;border-bottom:1px solid var(--sp-border);margin:0}
[data-shop-support] h2{font-size:16px;line-height:1.4;margin:0;font-weight:700;color:var(--sp-ink)}
[data-shop-support] .support-sidebar-title-row,[data-shop-support] .support-chat-header,.support-ticket-row{display:flex;justify-content:space-between;gap:10px;align-items:center}
[data-shop-support] .support-ticket-count{font-size:11px;background:#ede9fe;color:#6d28d9;padding:2px 8px;border-radius:12px}
[data-shop-support] .support-btn-new-ticket{background:var(--sp-primary);color:white;border:0;width:100%;margin-top:14px}
[data-shop-support] [data-tickets]{display:flex;flex-direction:column;gap:6px;padding:10px;max-height:470px;overflow-y:auto;overscroll-behavior:auto;scrollbar-width:thin}
[data-shop-support] .support-ticket{display:block;text-align:left;background:white;width:100%;padding:12px;border-color:transparent}
[data-shop-support] .support-ticket.selected{background:#f5f3ff;border-color:#ddd3f4}.support-ticket-code{font-size:11px;color:#6d28d9}.support-ticket-subject{font-size:13px;margin-top:5px;overflow-wrap:anywhere}.support-ticket-meta{font-size:11px;color:var(--sp-muted);overflow-wrap:anywhere}
[data-shop-support] .support-status-pill,[data-shop-support] .status-chip{border-radius:20px;padding:3px 8px;font-size:10px;font-weight:600;text-transform:capitalize;background:#e9f7ef;color:#197443}
[data-shop-support] [data-status=pending]{background:#fff3d9;color:#936318}[data-shop-support] [data-status=resolved]{background:#edf0f5;color:#626e7c}
[data-shop-support] .support-chat{display:flex;flex-direction:column;overflow:visible;min-height:0}
.support-ticket-code-badge{font-size:10px;color:#69768b;margin-bottom:3px}.support-chat-header-info{min-width:0}.support-chat-header-info h2{overflow-wrap:anywhere}
[data-shop-support] .support-messages{height:360px;max-height:52vh;min-height:230px;padding:18px;overflow-y:auto!important;overscroll-behavior:auto!important;touch-action:pan-y;scrollbar-width:thin;display:flex;flex-direction:column;gap:12px;background:#f7f8fc;flex:0 0 auto;border:0;border-radius:0;margin:0;overflow-anchor:none}
[data-shop-support] .support-message{max-width:min(78%,610px);flex-shrink:0;width:fit-content;box-sizing:border-box;padding:10px 13px;border:1px solid #e5e9f0;border-radius:12px 12px 12px 3px;align-self:flex-start;background:white;overflow-wrap:anywhere}
[data-shop-support] .support-message.customer{align-self:flex-end;background:#ede7ff;border-color:#e3dafb;border-radius:12px 12px 3px 12px;color:#33245a}
[data-shop-support] .support-message strong{display:block;font-size:10px;letter-spacing:.02em;color:#69768b;font-weight:650;text-transform:none}
[data-shop-support] .support-message.assistant strong{color:#6d28d9}[data-shop-support] .support-message p{margin:4px 0;font-size:13px;line-height:1.6;white-space:pre-wrap;color:inherit}
[data-shop-support] .support-message small{display:block;text-align:right;font-size:10px;color:#8a93a2;margin-top:6px}
.support-messages-empty,.support-tickets-empty{padding:25px 12px;color:#69768b;text-align:center;display:grid;gap:8px;font-size:13px}.support-messages-empty{margin:auto;max-width:360px}
[data-shop-support] .support-form{padding:14px 18px;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--sp-border);margin:0;background:white;border-radius:0 0 12px 12px}
[data-shop-support] label{display:block;font-size:11px;font-weight:600;color:#626e7c}
[data-shop-support] input:not([type=file]):not([type=hidden]),[data-shop-support] textarea,[data-shop-support] select{width:100%;padding:10px 12px;background:#fff;border:1px solid #dce1ea;border-radius:8px;color:#18243b;resize:vertical}
[data-shop-support] textarea{min-height:46px;max-height:160px;margin-top:5px}
.support-form-actions{display:flex;align-items:center;gap:8px;justify-content:space-between}.support-security-tip{font-size:10px;color:#7a8595}.support-btn-send{background:#6d28d9!important;color:white!important;border-color:#6d28d9!important;white-space:nowrap}
.support-upload-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:#69768b}.support-upload-filename{overflow-wrap:anywhere;max-width:250px}.support-upload-select{font-size:12px!important;padding:6px 9px!important}.support-upload-hint{flex:1}.support-upload-remove{font-size:11px!important;padding:4px 7px!important}
.support-attachment {display:block;max-width:270px;margin-top:8px}.support-attachment img{display:block;max-width:100%;max-height:220px;border-radius:8px;object-fit:contain}.support-attachment-status{font-size:11px;color:#69768b}.support-attachment-name{display:block;font-size:10px;margin-top:4px}
.support-topics{display:flex;gap:6px;flex-wrap:wrap;padding:11px 18px;border-top:1px solid var(--sp-border);background:white}.support-topics button{font-size:11px!important;padding:5px 9px!important;border-radius:20px!important;color:#6d28d9!important;background:#faf8ff!important}
.support-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#f2f5ff;border:1px solid #dbe3fb;border-radius:10px;font-size:12px;margin:10px 0}.support-banner.is-error{color:#a12e2e;background:#fff5f5;border-color:#f3cccc}.support-banner-content{display:flex;align-items:center;gap:8px}.support-btn-retry{font-size:11px!important;white-space:nowrap}.support-notice{font-size:12px}
[data-shop-support] .support-guest-card{max-width:580px;margin:25px auto;padding:32px;background:white;border:1px solid var(--sp-border);border-radius:12px;text-align:center}.support-guest-actions,.support-guest-channels{display:flex;gap:12px;justify-content:center;flex-wrap:wrap;margin-top:15px}
[data-shop-support] [data-team-action]{padding:12px 18px;border-top:1px solid var(--sp-border);display:flex;align-items:end;gap:10px;flex-wrap:wrap}[data-team-action] label{flex:1;min-width:140px}[data-shop-support] .support-team-tools{border-top:1px solid var(--sp-border)}
.crm-shop-support .dashboard-hero{margin-bottom:16px}.crm-shop-support .workspace-toolbar{margin-bottom:14px}
@media(max-width:760px){[data-shop-support] .support-shell{grid-template-columns:1fr;gap:12px}[data-shop-support] [data-tickets]{max-height:160px}.support-sidebar-title-row h2{font-size:14px}[data-shop-support] .support-sidebar-header{padding:12px 14px}[data-shop-support] .support-messages{height:340px;max-height:50vh;padding:14px}[data-shop-support] .support-message{max-width:90%}[data-shop-support] .support-form{padding:12px}.support-security-tip{display:none}.support-banner{align-items:start}.store-support-hero{padding:20px 0 12px!important}}
@media(prefers-reduced-motion:reduce){[data-shop-support] *{scroll-behavior:auto!important}}

.support-closed-note{padding:14px 18px;background:#f0f3f8;border-top:1px solid #e5e9f0;font-size:12px;color:#626e7c}
