/* ================================================
   SESCOM HEADER — White Solid Override
   ================================================ */

header,
header.transparent {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 2px 16px rgba(18, 19, 44, 0.10) !important;
}

#topbar {
  background: #f0f4fa !important;
  border-bottom: 1px solid #dde4f0 !important;
}

/* Topbar text & icons */
.topbar-widget a,
#topbar a {
  color: #12132c !important;
}
#topbar .icofont-location-pin,
#topbar .icofont-phone,
#topbar .icofont-envelope {
  color: #4a81d3 !important;
}
#topbar .social-icons a i {
  color: #4a81d3 !important;
}

/* Main nav links */
#mainmenu > li > a,
#mainmenu a.menu-item {
  color: #12132c !important;
}
#mainmenu > li > a:hover,
#mainmenu a:hover {
  color: #4a81d3 !important;
}
#mainmenu > li.has-child:after {
  border-color: #12132c transparent transparent transparent !important;
}

/* Dropdown sub-menu */
#mainmenu li li a {
  color: #12132c !important;
}
#mainmenu li li a:hover {
  color: #4a81d3 !important;
}

/* ================================================
   SESCOM AI Chat Widget — Sescom color scheme
   ================================================ */

#sc-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a81d3, #514A9D);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(74, 129, 211, 0.55);
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 9999;
  border: none;
  padding: 0;
}
#sc-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(74, 129, 211, 0.7);
}
#sc-bubble img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  padding: 4px;
  filter: brightness(0) invert(1);
}

.sc-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 14px; height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
  display: block;
}
#sc-bubble.open .sc-dot { display: none; }

/* Push back-to-top above the chat bubble */
#back-to-top.show { bottom: 100px !important; }

#sc-win {
  position: fixed;
  bottom: 102px;
  right: 28px;
  width: 370px;
  max-height: 570px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 48px rgba(18, 19, 44, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  transform: scale(0.92) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(.4, 0, .2, 1), opacity 0.25s;
}
#sc-win.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.sc-hd {
  background: #12132c;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-bottom: 2px solid rgba(74, 129, 211, 0.4);
}
.sc-av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a81d3, #514A9D);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 6px;
}
.sc-av img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.sc-inf h3 {
  color: #fff;
  font-size: 0.95rem;
  margin: 0;
  font-weight: 600;
}
.sc-inf p {
  color: #7ba3e0;
  font-size: 0.78rem;
  margin: 0;
}
.sc-cl {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: #7ba3e0;
  font-size: 1.3rem;
  padding: 4px;
  transition: color 0.2s;
  line-height: 1;
}
.sc-cl:hover { color: #fff; }

/* Messages area */
#sc-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f0f2f8;
}
#sc-msgs::-webkit-scrollbar { width: 4px; }
#sc-msgs::-webkit-scrollbar-thumb { background: #c5cde0; border-radius: 4px; }

.sc-m {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  animation: scUp 0.2s ease;
}
@keyframes scUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sc-m.bot {
  background: #fff;
  color: #12132c;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(18,19,44,0.1);
}
.sc-m.user {
  background: linear-gradient(135deg, #4a81d3, #514A9D);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(74, 129, 211, 0.35);
}
.sc-m.typing {
  background: #fff;
  color: #999;
  align-self: flex-start;
  font-style: italic;
  border-bottom-left-radius: 4px;
}

/* Input area */
.sc-inp {
  padding: 10px 12px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  background: #fff;
  flex-shrink: 0;
}
#sc-in {
  flex: 1;
  border: 1.5px solid #d1d9e0;
  border-radius: 24px;
  padding: 9px 16px;
  font-size: 0.875rem;
  outline: none;
  background: #f7f9fc;
  transition: border 0.2s;
  color: #12132c;
}
#sc-in:focus { border-color: #4a81d3; background: #fff; }
#sc-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4a81d3, #514A9D);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.15s;
}
#sc-btn:hover { opacity: 0.9; transform: scale(1.05); }
#sc-btn:disabled { background: #aaa; cursor: default; transform: none; }
#sc-btn svg { width: 17px; height: 17px; fill: #fff; }

/* ---- Tooltip / Speech Bubble ---- */
#sc-tooltip {
  position: fixed;
  bottom: 102px;
  right: 22px;
  background: #fff;
  border-radius: 12px;
  padding: 11px 14px 11px 12px;
  box-shadow: 0 4px 24px rgba(18, 19, 44, 0.16);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9997;
  min-width: 210px;
  animation: scTipIn 0.4s ease;
  transition: opacity 0.3s, transform 0.3s;
}
#sc-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 22px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #fff;
}
#sc-tooltip.sc-tip-hide {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}
@keyframes scTipIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sc-tip-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid #e8edf2;
  padding: 3px;
}
.sc-tip-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.sc-tip-text strong {
  font-size: 0.82rem;
  color: #12132c;
  font-weight: 700;
}
.sc-tip-text small {
  font-size: 0.76rem;
  color: #6b7280;
}
.sc-tip-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 4px;
  margin-left: auto;
  transition: color 0.2s;
  flex-shrink: 0;
}
.sc-tip-close:hover { color: #12132c; }

@media (max-width: 480px) {
  #sc-win { width: calc(100vw - 20px); right: 10px; }
  #sc-bubble { bottom: 18px; right: 18px; }
  #sc-tooltip { right: 10px; min-width: 190px; }
}
