/* Konekts Mobile MVP — Sprint 2
   KIE-first mobile experience. Scoped to phone/tablet only. */

@media (max-width:860px){
  html[data-mobile-kie-v2="true"] .pulso-stage.kie-focus .pulso-page-title{display:none!important}
  html[data-mobile-kie-v2="true"] .pulso-stage.kie-focus .pulso-copilot{display:none!important}
  html[data-mobile-kie-v2="true"] .pulso-stage.kie-focus .pulso-main{padding-top:10px!important}
  html[data-mobile-kie-v2="true"] .pulso-stage.kie-focus .pulso-workspace{overflow:visible!important}

  .mobile-kie-shell{display:grid;gap:10px;min-width:0;width:100%}
  .mobile-kie-tabs{
    position:sticky;top:78px;z-index:45;
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;
    padding:5px;margin:0;background:rgba(255,255,255,.97);
    border:1px solid #e9e2f3;border-radius:16px;
    box-shadow:0 10px 28px rgba(45,28,78,.07);backdrop-filter:blur(14px)
  }
  .mobile-kie-tab{
    min-width:0;min-height:43px;border:0;border-radius:12px;
    background:transparent;color:#746d83;font-size:12px;font-weight:850;
    display:flex;align-items:center;justify-content:center;gap:5px;padding:8px 5px
  }
  .mobile-kie-tab[aria-selected="true"]{background:#6f3fc3;color:#fff;box-shadow:0 7px 18px rgba(111,63,195,.22)}
  .mobile-kie-tab-count{min-width:19px;height:19px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:rgba(255,255,255,.22);font-size:10px;line-height:1}
  .mobile-kie-tab[aria-selected="false"] .mobile-kie-tab-count{background:#eee8f7;color:#6f3fc3}

  .mobile-kie-panels,.mobile-kie-panel{min-width:0;width:100%}
  .mobile-kie-panel[hidden]{display:none!important}
  .mobile-kie-panel{animation:mobileKieIn .16s ease-out}
  @keyframes mobileKieIn{from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:none}}

  /* Conversation */
  .mobile-kie-conversation-panel .copilot-chat{
    padding:12px!important;border:0!important;background:transparent!important;
    box-shadow:none!important;border-radius:0!important
  }
  .mobile-kie-conversation-panel .copilot-head,
  .mobile-kie-conversation-panel .chat-progress,
  .mobile-kie-conversation-panel .chat-readiness-note{display:none!important}
  .mobile-kie-conversation-head{
    display:grid;grid-template-columns:46px minmax(0,1fr);gap:10px;align-items:center;
    padding:4px 2px 11px
  }
  .mobile-kie-conversation-head img{width:46px;height:46px;border-radius:50%;object-fit:cover;background:#eee7fa;box-shadow:0 6px 20px rgba(92,55,165,.12)}
  .mobile-kie-conversation-head small{display:block;color:#6f3fc3;font-size:10px;font-weight:950;letter-spacing:.12em;margin-bottom:2px}
  .mobile-kie-conversation-head strong{display:block;color:#241b31;font-size:18px;line-height:1.18;letter-spacing:-.02em}
  .mobile-kie-next-strip{
    grid-column:1/-1;width:100%;min-height:42px;margin-top:2px;padding:9px 11px;
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    border:1px solid #e8def6;border-radius:13px;background:#faf7ff;color:#553194;text-align:left
  }
  .mobile-kie-next-strip span{font-size:12px;line-height:1.3;font-weight:750}
  .mobile-kie-next-strip b{white-space:nowrap;font-size:11px;color:#6f3fc3}

  .mobile-kie-conversation-panel .chat-messages{
    min-height:250px;max-height:52dvh;overflow-y:auto;overscroll-behavior:contain;
    display:grid!important;gap:9px!important;padding:5px 2px 12px!important;scrollbar-width:thin
  }
  .mobile-kie-conversation-panel .message{max-width:100%!important;gap:8px!important}
  .mobile-kie-conversation-panel .message-bubble{max-width:min(86%,560px)!important;padding:12px 13px!important;border-radius:16px!important;font-size:15px!important;line-height:1.48!important}
  .mobile-kie-conversation-panel .message-bubble p{margin:0!important}
  .mobile-kie-conversation-panel .message.user{justify-content:flex-end!important}
  .mobile-kie-conversation-panel .message.user .message-avatar{order:2!important;display:none!important}
  .mobile-kie-conversation-panel .message.user .message-bubble{margin-left:auto!important;background:#6f3fc3!important;color:#fff!important;border-bottom-right-radius:5px!important}
  .mobile-kie-conversation-panel .message.assistant .message-bubble{background:#fff!important;border:1px solid #ece6f3!important;color:#282030!important;border-bottom-left-radius:5px!important;box-shadow:0 4px 14px rgba(45,28,78,.035)!important}
  .mobile-kie-conversation-panel .message.assistant + .message.assistant .message-avatar{visibility:hidden!important}
  .mobile-kie-conversation-panel .quick-options{display:flex!important;gap:6px!important;overflow-x:auto!important;padding:7px 0 1px!important;scrollbar-width:none!important}
  .mobile-kie-conversation-panel .quick-options::-webkit-scrollbar{display:none!important}
  .mobile-kie-conversation-panel .quick-options button{flex:0 0 auto!important;min-height:39px!important;border-radius:999px!important;padding:8px 11px!important;font-size:12px!important;white-space:nowrap!important}
  .mobile-kie-conversation-panel .chat-input-wrap{
    position:relative!important;display:grid!important;grid-template-columns:1fr!important;gap:7px!important;
    margin-top:7px!important;padding:9px!important;border:1px solid #e4dcef!important;border-radius:17px!important;
    background:#fff!important;box-shadow:0 10px 28px rgba(45,28,78,.07)!important
  }
  .mobile-kie-conversation-panel #copilotInput{
    width:100%!important;min-height:74px!important;max-height:150px!important;resize:vertical!important;
    padding:10px!important;border:0!important;background:#faf9fc!important;border-radius:12px!important;
    box-shadow:none!important;font-size:16px!important;line-height:1.4!important
  }
  .mobile-kie-conversation-panel #sendCopilot{width:100%!important;min-height:48px!important;border-radius:13px!important;font-size:15px!important;font-weight:850!important}
  .mobile-kie-conversation-panel .chat-hint{display:none!important}

  /* Pending */
  .mobile-kie-pending-panel{display:grid;gap:12px;padding:3px 0}
  .mobile-kie-section-head{padding:4px 2px 2px}
  .mobile-kie-section-head small{display:block;color:#6f3fc3;font-size:10px;font-weight:950;letter-spacing:.12em;margin-bottom:4px}
  .mobile-kie-section-head h2{margin:0;color:#241b31;font-size:26px;line-height:1.08;letter-spacing:-.04em}
  .mobile-kie-section-head p{margin:7px 0 0;color:#746d83;font-size:14px;line-height:1.45}
  .mobile-kie-pending-panel .chat-readiness-note{
    display:grid!important;gap:7px!important;margin:0!important;padding:17px!important;
    border:1px solid #dfd2f1!important;border-radius:18px!important;background:linear-gradient(135deg,#fff,#faf6ff)!important;
    box-shadow:0 8px 26px rgba(45,28,78,.05)!important
  }
  .mobile-kie-pending-panel .chat-readiness-note b{font-size:19px!important;line-height:1.2!important;color:#2e203f!important}
  .mobile-kie-pending-panel .chat-readiness-note span{font-size:14px!important;line-height:1.45!important;color:#746d83!important}
  .mobile-kie-pending-panel .chat-readiness-note button{width:100%!important;min-height:46px!important;margin-top:4px!important;padding:10px 12px!important;border-radius:13px!important;background:#6f3fc3!important;color:#fff!important;text-align:center!important}
  .mobile-kie-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .mobile-kie-shortcuts button{min-width:0;min-height:66px;padding:9px 6px;border:1px solid #e8e0f2;border-radius:15px;background:#fff;color:#342744;font-size:11px;font-weight:850;line-height:1.25;box-shadow:0 5px 18px rgba(45,28,78,.035)}
  .mobile-kie-shortcuts button span{display:block;font-size:19px;line-height:1;margin-bottom:5px}
  .mobile-kie-pending-tip{padding:13px 14px;border-radius:15px;background:#f4effb;color:#5c4a72;font-size:13px;line-height:1.45}
  .mobile-kie-pending-tip b{display:block;color:#5e35a7;margin-bottom:3px}

  /* Summary */
  .mobile-kie-summary-panel{display:grid;gap:12px;padding:3px 0}
  .mobile-kie-progress-card{display:grid;grid-template-columns:68px minmax(0,1fr);gap:13px;align-items:center;padding:15px;border-radius:18px;background:#221733;color:#fff;box-shadow:0 12px 32px rgba(34,23,51,.14)}
  .mobile-kie-progress-ring{width:68px;height:68px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#a78bfa var(--kie-progress,0%),rgba(255,255,255,.12) 0)}
  .mobile-kie-progress-ring:before{content:"";width:52px;height:52px;border-radius:50%;background:#221733;grid-area:1/1}
  .mobile-kie-progress-ring b{grid-area:1/1;z-index:1;font-size:14px}
  .mobile-kie-progress-card small{display:block;color:#c7b9dc;font-size:10px;font-weight:900;letter-spacing:.1em;margin-bottom:3px}
  .mobile-kie-progress-card strong{display:block;font-size:18px;line-height:1.18}
  .mobile-kie-progress-card p{margin:4px 0 0;color:#cfc6db;font-size:12px;line-height:1.35}
  .mobile-kie-summary-panel .copilot-head{display:none!important}
  .mobile-kie-summary-panel .chat-progress{display:none!important}
  .mobile-kie-summary-panel .copilot-side{display:block!important;width:100%!important;min-width:0!important}
  .mobile-kie-summary-panel .copilot-side>.panel{padding:15px!important;border-radius:18px!important}
  .mobile-kie-summary-panel .dna-panel .panel-head{align-items:center!important}
  .mobile-kie-summary-panel .dna-panel .panel-head h3{font-size:20px!important;margin:3px 0!important}
  .mobile-kie-summary-panel .dna-list{display:grid!important;grid-template-columns:1fr!important;gap:0!important}
  .mobile-kie-summary-panel .dna-list>div{display:grid!important;grid-template-columns:42% minmax(0,1fr)!important;gap:10px!important;align-items:start!important;padding:11px 0!important;border-bottom:1px solid #eee8f4!important}
  .mobile-kie-summary-panel .dna-list>div.is-missing{display:none!important}
  .mobile-kie-summary-panel .dna-list span{font-size:12px!important;color:#857d8f!important}
  .mobile-kie-summary-panel .dna-list strong{font-size:13px!important;text-align:right!important;overflow-wrap:anywhere!important}
  .mobile-kie-summary-note{padding:12px 13px;border-radius:14px;background:#faf7ff;color:#6c5b7c;font-size:12px;line-height:1.4}

  @media (min-width:600px){
    .mobile-kie-conversation-panel .chat-messages{max-height:58dvh}
    .mobile-kie-summary-panel .dna-list{grid-template-columns:1fr 1fr!important;column-gap:18px!important}
    .mobile-kie-summary-panel .dna-list>div{grid-template-columns:1fr!important;gap:4px!important}
    .mobile-kie-summary-panel .dna-list strong{text-align:left!important}
  }
}
