.mymodal {
    height: 400px !important;
    top: 200px !important;
    font-size: 20px !important;
}

ul li {
    margin: 0 0 10px 0;
}

.ui.button {
    width: 200px;
    border-radius: 0px !important;
}

.block-center {
    text-align: center !important;
}

.field-with {
    width: 100%;
}

.mtop {
    margin-top: 10px !important;
}

/* همراه چهارسو — FAB (physical bottom-right; safe for RTL mobile) */
.charsoo-companion {
  position: fixed !important;
  top: auto !important;
  left: auto !important;
  right: max(12px, env(safe-area-inset-right, 0px)) !important;
  /* above mobile bottom nav / browser chrome */
  bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1.5px solid #f7c948 !important;
  border-radius: 50% !important;
  cursor: pointer;
  background: #123447 !important;
  box-shadow:
    0 10px 28px rgba(0,0,0,.5),
    0 0 0 3px rgba(247,201,72,.45),
    0 0 24px rgba(247,201,72,.4);
  animation: charsoo-float 3s ease-in-out infinite;
  transition: transform .2s ease, box-shadow .2s ease;
  z-index: 2147483000 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}
#charsoo-agent-fab {
  display: grid !important;
  visibility: visible !important;
  pointer-events: auto !important;
  place-items: center !important;
  background: #123447 !important;
  border: 1.5px solid #f7c948 !important;
}
.charsoo-companion {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
/* hide avatar FAB while chat dock is open */
body.charsoo-chat-open .charsoo-companion,
body:has(#charsoo-agent-dock[data-open="1"]) .charsoo-companion {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
.charsoo-companion::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #f7c948, #e88a20, #f7c948);
  opacity: .35;
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
  animation: charsoo-spin 6s linear infinite;
}
.charsoo-companion .avatar,
.charsoo-companion .online {
  position: relative;
  z-index: 1;
}
.charsoo-companion:hover {
  animation-play-state: paused;
  transform: translateY(-4px) scale(1.06) translateZ(0);
  box-shadow:
    0 12px 32px rgba(0,0,0,.5),
    0 0 0 2px rgba(247,201,72,.6),
    0 0 28px rgba(247,201,72,.45);
}
.charsoo-companion:active { transform: scale(.97) translateZ(0); }
.charsoo-companion:focus-visible {
  outline: 2px solid #f7c948;
  outline-offset: 2px;
}
.charsoo-companion .avatar {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.charsoo-companion .uniform { fill:#102b38; }
.charsoo-companion .collar  { fill:#f7f3e9; }
.charsoo-companion .gold    { fill:#f7c948; }
.charsoo-companion .skin    { fill:#f0c19f; }
.charsoo-companion .hair    { fill:#382522; }
.charsoo-companion .eye     { fill:#26333a; }
.charsoo-companion .brow    { fill:none; stroke:#382522; stroke-width:1.5; stroke-linecap:round; }
.charsoo-companion .smile   { fill:none; stroke:#8f4d4b; stroke-width:1.5; stroke-linecap:round; }

.charsoo-companion .online {
  position: absolute;
  right: 0;
  bottom: 0;
  left: auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #39d98a;
  box-shadow: 0 0 0 2px #071923, 0 0 0 4px rgba(57,217,138,.25);
  animation: charsoo-pulse 2s ease-in-out infinite;
}

@keyframes charsoo-float {
  0%,100% { transform: translateY(0) translateZ(0); }
  50%     { transform: translateY(-3px) translateZ(0); }
}
@keyframes charsoo-spin {
  to { transform: rotate(360deg); }
}
@keyframes charsoo-pulse {
  0%,100% { box-shadow: 0 0 0 3px #071923, 0 0 0 5px rgba(57,217,138,.25); }
  50%     { box-shadow: 0 0 0 3px #071923, 0 0 0 7px rgba(57,217,138,.05); }
}

@media (max-width: 600px) {
  .charsoo-companion {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    /* sit above .chaharso-m-nav (~36–56px) + safe area */
    bottom: max(64px, calc(52px + env(safe-area-inset-bottom, 0px))) !important;
    left: auto !important;
  }
  .charsoo-companion .online {
    width: 9px;
    height: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .charsoo-companion,
  .charsoo-companion::before,
  .charsoo-companion .online { animation: none !important; }
}
