/* Backend Helpdesk Prototype — Shopify Admin Shell */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f1f1f1;
    overflow: hidden;
}

/* ════════════════════════════════════════
   Shopify Admin — Top Bar
   ════════════════════════════════════════ */

.shopify-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 200;
    gap: 16px;
}

.shopify-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    width: 208px;
}

.shopify-logo-text {
    height: 26px;
    width: auto;
    flex-shrink: 0;
}

.shopify-topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
}

.shopify-topbar-search {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #8c9196;
    font-size: 14px;
    cursor: text;
}

.shopify-topbar-search-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.shopify-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.shopify-topbar-icon-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #8c9196;
    cursor: pointer;
}

.shopify-topbar-icon-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #e3e5e7;
}

.shopify-topbar-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #7c71aa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
}

/* ════════════════════════════════════════
   Shopify Admin — Sidebar
   ════════════════════════════════════════ */

.shopify-body {
    display: flex;
    padding-top: 56px;
    height: 100vh;
}

.shopify-sidebar {
    width: 240px;
    flex-shrink: 0;
    height: calc(100vh - 56px);
    position: fixed;
    left: 0;
    top: 56px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 8px 0;
    z-index: 100;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.shopify-nav-item {
    display: flex;
    align-items: center;
    padding: 0 6px;
    margin: 1px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #b5b5b5;
    font-size: 13px;
    cursor: pointer;
    line-height: 28px;
}

.shopify-nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #e3e5e7;
}

.shopify-nav-item--selected {
    background: rgba(255,255,255,0.1);
    color: #e3e5e7;
    font-weight: 600;
}

.shopify-nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
    fill: #8c9196;
}

.shopify-nav-item:hover .shopify-nav-icon {
    fill: #b5b5b5;
}

.shopify-nav-item--selected .shopify-nav-icon {
    fill: #e3e5e7;
}

.shopify-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 12px;
}

/* Apps section label */
.shopify-nav-section-label {
    font-size: 12px;
    font-weight: 600;
    color: #8c9196;
    padding: 4px 18px 2px;
    text-transform: none;
}

/* App item with favicon icon */
.shopify-nav-item--app {
    font-weight: 500;
    color: #e3e5e7;
}

.shopify-nav-app-icon {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    flex-shrink: 0;
    border-radius: 4px;
}

/* App sub-navigation (indented) */
.shopify-nav-app-sub {
    padding-left: 14px;
}

.shopify-nav-item--sub {
    padding-left: 26px;
    font-size: 13px;
    color: #8c9196;
}

.shopify-nav-item--sub:hover {
    color: #b5b5b5;
}

.shopify-nav-item--sub.shopify-nav-item--selected {
    color: #e3e5e7;
    background: rgba(255,255,255,0.1);
}

/* ════════════════════════════════════════
   Content Area
   ════════════════════════════════════════ */

.shopify-content {
    margin-left: 240px;
    flex: 1;
    height: calc(100vh - 56px);
    overflow-y: auto;
    background: #f1f1f1;
}

/* ════════════════════════════════════════
   Chat Page — Inner Sidebar
   ════════════════════════════════════════ */

.chat-sidebar {
    width: 250px;
    flex-shrink: 0;
    height: 100%;
    background: var(--p-color-bg-surface, #fff);
    border-right: 1px solid var(--p-color-border-secondary, #e1e3e5);
    overflow-y: auto;
}

/* Navigation items */
.chat-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--p-color-text-secondary, #616161);
    font-size: 13px;
    cursor: pointer;
}

.chat-nav-item:hover {
    background: var(--p-color-bg-surface-hover, #f1f1f1);
    color: var(--p-color-text, #303030);
}

.chat-nav-item--selected {
    background: var(--p-color-bg-surface-active, #e3e3e3);
    color: var(--p-color-text, #303030);
    font-weight: 550;
}

.chat-nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-nav-label {
    flex: 1;
}

/* Team member status dots */
.chat-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-status-dot--online {
    background: #29845a;
}

.chat-status-dot--offline {
    background: #8c9196;
}

/* Visitor row icons */
.chat-visitor-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-visitor-icon--active {
    background: #005bd3;
    color: #fff;
}

.chat-visitor-icon--active .Polaris-Icon__Svg {
    fill: #fff;
}

.chat-visitor-icon--idle {
    background: #e4e5e7;
    color: #616161;
}

.chat-visitor-icon--idle .Polaris-Icon__Svg {
    fill: #616161;
}

/* Conversation list items */
.chat-conv-item {
    background: var(--p-color-bg-surface, #fff);
}

.chat-conv-item--active {
    background: var(--p-color-bg-surface-active, #e3e3e3);
}

.chat-conv-item:hover:not(.chat-conv-item--active) {
    background: var(--p-color-bg-surface-hover, #f1f1f1);
}

/* Visitor path dots */
.chat-path-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--p-color-border, #e1e3e5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-path-dot::after {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--p-color-icon, #616161);
}

/* ════════════════════════════════════════
   Chat V2 — Panel Switching
   ════════════════════════════════════════ */

.chat-panel {
    display: none;
}

.chat-panel--active {
    display: flex;
}

