/* HEM PÅ DATORN — datorrundan AT-74, 2026-10-14 (Patrik gav fri hand: "Allt du gör blir riktigt bra").
   - Panelerna (.hw-card) som den stora detaljrutan (detail-frame-desktop.css): lätt ram + mjuk skugga.
   - Statistikraderna i "Mina ärenden": en gemensam yta (förr nästan osynlig vit ram i ljusa teman, gul bara på interna).
   - Att göra (Patrik: "todo krånglig"): kryssrutan först och rund (klick = klar, home-widgets.js), tiden som diskret
     text till höger, klocka/papperskorg syns vid hover eller fokus, raderna mjukare och tätare. Bara desktop. */
@media (min-width: 769px) {
  html body #view-chat .hw-card.hw-card {
    border-color: color-mix(in srgb, var(--border-color) 60%, transparent) !important;
    box-shadow:
      0 1px 2px rgba(10, 25, 35, 0.06),
      0 10px 28px -8px rgba(10, 25, 35, 0.22) !important;
  }
  html body #view-chat .hw-stat-item.hw-stat-item {
    background: color-mix(in srgb, var(--text-primary) 4%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--border-color) 45%, transparent) !important;
  }
  html body #view-chat .hw-stat-item.hw-stat-internal {
    border-color: rgba(241, 196, 15, 0.45) !important;
  }
  html body #view-chat .hw-stat-item.hw-stat-link:hover {
    background: color-mix(in srgb, var(--text-primary) 8%, transparent) !important;
  }

  html body #view-chat .hw-todo-item.hw-todo-item {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 4px 10px !important;
    min-height: 30px !important;
    background: color-mix(in srgb, var(--text-primary) 3.5%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--border-color) 40%, transparent) !important;
    border-radius: 8px !important;
  }
  html body #view-chat .hw-todo-item .hw-todo-check,
  html body #view-chat .hw-todo-item .hw-todo-restore { order: -2 !important; flex: 0 0 auto !important; }
  html body #view-chat .hw-todo-item .hw-todo-text {
    order: 0 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  html body #view-chat .hw-todo-item .hw-todo-ts {
    order: 1 !important;
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    font-size: 11px !important;
    opacity: 0.6 !important;
    white-space: nowrap !important;
  }
  html body #view-chat .hw-todo-item .hw-todo-bell { order: 2 !important; }
  html body #view-chat .hw-todo-item .hw-todo-del { order: 3 !important; }
  html body #view-chat .hw-todo-item:not(:hover):not(:focus-within) .hw-todo-bell:not(.has-remind),
  html body #view-chat .hw-todo-item:not(:hover):not(:focus-within) .hw-todo-del { opacity: 0 !important; }
  html body #view-chat .hw-todo-item:hover .hw-todo-bell,
  html body #view-chat .hw-todo-item:hover .hw-todo-del { opacity: 0.75 !important; }
  html body #view-chat .hw-todo-item .hw-todo-check {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
  }
  html body #view-chat .hw-todo-item .hw-todo-check:hover {
    border-color: var(--accent-primary, #2ecc71) !important;
    background: color-mix(in srgb, var(--accent-primary, #2ecc71) 14%, transparent) !important;
  }
  html body #view-chat .hw-todo-item.done .hw-todo-text {
    text-decoration: line-through !important;
    opacity: 0.55 !important;
  }
}
/* Hem i Trafik (Fråga Atlas-fältet nertill; Standard döljer det). Patrik 10-14 natt: Hem gjordes bara för Standard.
   Bandet: ingen hård överkant, mindre höjd så Att göra får plats; fältet = mjuk platta i temats accent som Hem-panelerna. */
@media (min-width: 769px) {
  html body #view-chat #home-chat-footer.chat-input-area.chat-input-area {
    border-top: 0 !important; box-shadow: none !important; backdrop-filter: none !important;
    min-height: 0 !important; padding: 10px 40px 16px !important;
    background: transparent !important;
  }
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer #chat-form {
    background: color-mix(in srgb, var(--accent-primary) 7%, transparent) !important;
    border: 1px solid color-mix(in srgb, var(--accent-primary) 22%, transparent) !important;
    border-radius: 999px !important; box-shadow: none !important; max-width: 620px !important;
  }
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer #chat-form:focus-within {
    border-color: color-mix(in srgb, var(--accent-primary) 50%, transparent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 12%, transparent) !important;
  }
}

/* Rutorna ovanför klipps inte rakt mot frågefältet: mjuk uttoning nertill + luft när man scrollat till botten (Patrik: 'stannar precis på linjen'). */
@media (min-width: 769px) {
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-widgets-area {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 28px), transparent 100%);
    padding-bottom: 28px !important;
  }
}
/* Hem i Trafik: frågefältets band lika högt som sidomenyns profilruta (.sidebar-footer min-height 60px) så linjerna möts. */
@media (min-width: 769px) {
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer.chat-input-area.chat-input-area {
    height: 60px !important; min-height: 60px !important; padding: 0 40px !important; box-sizing: border-box !important;
  }
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer #chat-form {
    padding: 4px 4px 4px 20px !important; align-items: center !important;
  }
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer #my-chat-input {
    height: 34px !important; min-height: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
  }
}
/* Hem i Trafik: bandet bakom frågefältet i headerns ton (Patrik: "nyansskillnad på bakgrunden och skrivfältet … samma som headern"). */
@media (min-width: 769px) {
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer.chat-input-area.chat-input-area {
    background: color-mix(in srgb, var(--accent-primary) 14%, var(--bg-color, transparent)) !important;
  }
  html:not(.atlas-edition-standard):not(.atlas-edition-unresolved) body #view-chat #home-chat-footer #chat-form {
    /* Lite ljusare än bandet i alla teman (relativ färg; mörka teman fick annars ett mörkt hål). Datorrundan 10-15. */
    background: oklch(from color-mix(in srgb, var(--accent-primary) 14%, var(--bg-color, #fff)) calc(l + 0.07) calc(c * 0.8) h) !important;
    border-color: color-mix(in srgb, var(--text-primary) 13%, transparent) !important;
  }
}
