/* Jobsie - frontend widget CSS (v1.0.11) */
:root{ --jma-accent: #2563eb;  --jobsie-bubble-bg: #0b1220; }

#jma-agent-root{position:fixed; inset:0; pointer-events:none; z-index:2147483647;}
#jma-agent-root .jma-panel,
#jma-agent-root .jma-fab{pointer-events:auto;}

.jma-pos-br .jma-fab{right:18px; bottom:18px;}
.jma-pos-br .jma-panel{right:18px; bottom:84px;}

.jma-pos-bl .jma-fab{left:18px; bottom:18px;}
.jma-pos-bl .jma-panel{left:18px; bottom:84px;}

.jma-pos-tr .jma-fab{right:18px; top:18px;}
.jma-pos-tr .jma-panel{right:18px; top:84px;}

.jma-pos-tl .jma-fab{left:18px; top:18px;}
.jma-pos-tl .jma-panel{left:18px; top:84px;}

.jma-fab{
  position:fixed;
  z-index:1;
  width:56px; height:56px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.75);
  display:grid; place-items:center;
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  cursor:pointer;
  overflow:visible;
}

/* Jemná pozornost (B) – „dýchání“ bubliny.
   - animuje jen bublinu (ručičky jsou součástí a hýbou se s ní)
   - vypne se po prvním kliknutí/tažení (JS odstraní class .jma-breathe)
   - respektuje prefers-reduced-motion */
#jma-agent-root.jma-breathe:not(.jma-open) .jma-fab{
  animation: jmaBreathe 2.2s ease-in-out infinite;
  will-change: transform;
  transform-origin: center;
}
#jma-agent-root.jma-breathe:not(.jma-open) .jma-fab::after{
  content:'';
  position:absolute;
  inset:-10px;
  border-radius:999px;
  background: var(--jma-accent);
  opacity:0;
  filter: blur(12px);
  z-index:-1;
  animation: jmaHalo 2.2s ease-in-out infinite;
  pointer-events:none;
}
#jma-agent-root.jma-dragging .jma-fab,
#jma-agent-root.jma-panel-dragging .jma-fab{
  animation: none !important;
  transform: none !important;
}
#jma-agent-root.jma-dragging .jma-fab::after,
#jma-agent-root.jma-panel-dragging .jma-fab::after{
  animation: none !important;
  opacity:0 !important;
}
@keyframes jmaBreathe{
  0%{ transform: translateY(0) scale(1); }
  18%{ transform: translateY(-10px) scale(1.06); }
  52%{ transform: translateY(-10px) scale(1.06); }
  70%{ transform: translateY(0) scale(1); }
  100%{ transform: translateY(0) scale(1); }
}
@keyframes jmaHalo{
  0%{ opacity:0; }
  18%{ opacity:.12; }
  52%{ opacity:.12; }
  70%{ opacity:0; }
  100%{ opacity:0; }
}
@media (prefers-reduced-motion: reduce){
  #jma-agent-root.jma-breathe:not(.jma-open) .jma-fab{ animation: none !important; }
}
.jma-fab .jma-core{
  background-color: #0b1220;
  background-image: none;
width:100%; height:100%; border-radius:999px; overflow:hidden; display:block;
   background: var(--jobsie-bubble-bg);}
.jma-fab .jma-core img{width:100%; height:100%; object-fit:cover; display:block;}

/* Ručičky (úchyty) pro přetahování bubliny */
.jma-fab{touch-action:none; user-select:none;}
.jma-fab .jma-hand{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  width:16px;
  height:34px;
  border-radius: 999px;
  border:1px solid rgba(148,163,184,.22);
  background: rgba(15,23,42,.88);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  cursor: grab;
  display:grid;
  place-items:center;
}
.jma-fab .jma-hand:before{
  content:'';
  width:10px;
  height:16px;
  border-radius: 8px;
  opacity:.85;
  background: repeating-linear-gradient(
    90deg,
    rgba(148,163,184,.55),
    rgba(148,163,184,.55) 1px,
    transparent 1px,
    transparent 4px
  );
}
.jma-fab .jma-hand-left{ left:0; transform: translate(-120%,-50%); }
.jma-fab .jma-hand-right{ right:0; transform: translate(120%,-50%); }
#jma-agent-root.jma-dragging .jma-fab .jma-hand{ cursor: grabbing; }

.jma-panel{
  position:fixed;
  width:360px; max-width: calc(100vw - 24px);
  height: 520px; max-height: calc(100vh - 120px);
  border-radius: 18px;
  border:1px solid rgba(148,163,184,.22);
  background: rgba(2,6,23,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 46px rgba(0,0,0,.45);
  display:none;
  overflow:visible;
}
.jma-panel.open{display:flex; flex-direction:column;}

.jma-header{display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 12px; border-bottom:1px solid rgba(148,163,184,.16); cursor:grab; user-select:none; touch-action:none;}
.jma-brand{display:flex; align-items:center; gap:10px; min-width:0;}
.jma-avatar{width:34px; height:34px; border-radius:999px; border:1px solid rgba(148,163,184,.22); background: var(--jobsie-bubble-bg); background-repeat: no-repeat; background-size: cover; background-position: center;}
.jma-titletext{min-width:0;}
.jma-titletext strong{display:block; font-size:13px; color:#e5e7eb;}
.jma-titletext span{display:block; font-size:11px; color:#94a3b8; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}

.jma-actions{display:flex; gap:6px;}
.jma-icbtn{
  width:34px; height:34px; border-radius:12px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.75);
  color:#e5e7eb;
  cursor:pointer;
  display:grid; place-items:center;
}
.jma-icbtn.active{border-color: rgba(37,99,235,.7);}
.jma-icbtn.pulse{
  border-color: rgba(37,99,235,.85);
  box-shadow: 0 0 0 2px rgba(37,99,235,.18);
  animation: jmaPulse 1.05s ease-in-out infinite;
}
@keyframes jmaPulse{ 0%{ transform: scale(1);} 50%{ transform: scale(1.08);} 100%{ transform: scale(1);} }

.jma-messages{flex:1; padding:12px; overflow:auto; display:flex; flex-direction:column; gap:10px;}
.jma-msg{max-width: 85%; padding:10px 10px; border-radius: 14px; border:1px solid rgba(148,163,184,.16); white-space:pre-wrap; line-height:1.35; font-size:13px;}
.jma-msg.bot{background: rgba(15,23,42,.55); align-self:flex-start; color:#e5e7eb;}
.jma-msg.user{background: rgba(37,99,235,.18); border-color: rgba(37,99,235,.30); align-self:flex-end; color:#e5e7eb;}

.jma-typing{padding: 0 12px 10px; color:#94a3b8; font-size:12px; min-height:16px;}

.jma-input{display:flex; gap:8px; padding:12px; border-top:1px solid rgba(148,163,184,.16);}
.jma-input textarea{
  flex:1; resize:none; min-height:40px; max-height:110px;
  border-radius: 14px; border:1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.55);
  color:#e5e7eb; padding:10px 10px; outline:none;
}
.jma-input textarea:focus{border-color: rgba(37,99,235,.6);}
.jma-input button{
  width:42px; height:42px; border-radius: 14px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.75);
  color:#e5e7eb; cursor:pointer;
  display:grid; place-items:center;
}

.jma-footer{padding:10px 12px; border-top:1px solid rgba(148,163,184,.12); color:#94a3b8; font-size:11px;}

.jma-highlight{outline: 3px solid rgba(37,99,235,.9)!important; outline-offset: 2px; border-radius: 10px;}

.jma-linkbtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius: 12px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.75);
  color:#e5e7eb;
  text-decoration:none;
  margin-top:6px;
}
.jma-linkbtn:hover{border-color: rgba(37,99,235,.7);}
.jma-linkbtn .dot{width:8px;height:8px;border-radius:999px;background: var(--jma-accent); display:inline-block;}

/* Quick buttons (chips) under bot messages */
.jma-chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:8px;}
.jma-chipbtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 10px;
  border-radius: 999px;
  border:1px solid rgba(148,163,184,.18);
  background: rgba(15,23,42,.75);
  color:#e5e7eb;
  text-decoration:none;
  cursor:pointer;
  font-size:12px;
  line-height:1;
}
.jma-chipbtn:hover{border-color: rgba(37,99,235,.7);}
.jma-chipbtn .dot{width:7px;height:7px;border-radius:999px;background: var(--jma-accent); display:inline-block;}


#jma-agent-root.jma-panel-dragging .jma-header{ cursor: grabbing; }

/* Jemné proaktivní zvýraznění (pouze krátce, 1× za relaci) */
@media (prefers-reduced-motion: no-preference){
  .jma-fab.jma-nudge{
    animation: jmaNudge 2.2s ease-in-out 1;
    will-change: transform;
  }
  @keyframes jmaNudge{
    0%{ transform: translateY(0) scale(1); }
    25%{ transform: translateY(-10px) scale(1.06); }
    55%{ transform: translateY(-10px) scale(1.06); }
    75%{ transform: translateY(0) scale(1); }
    100%{ transform: translateY(0) scale(1); }
  }
}
