/* =========================================================
   Hayalmasal Converse Theme (Light)
   Fully theme-scoped to avoid leakage into dark mode
   Structure:
   1. Design tokens
   2. Theme root
   3. Shared surfaces
   4. Sidebar / roster
   5. Messages
   6. Composer
   7. Floating UI
   8. Modals
   9. Login
   10. Motion
   ========================================================= */


/* =========================================================
   1. Design tokens
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) {
  --hm-bg: #f6f5f4;
  --hm-bg-panel: #ffffff;
  --hm-bg-float: #ffffff;
  --hm-bg-soft: #f1f3f5;
  --hm-bg-softer: #ebedef;
  --hm-bg-hover: #e7eaee;
  --hm-bg-selected: #dbeafe;

  --hm-border: #d0d7de;
  --hm-border-soft: #c7ced6;

  --hm-fg: #1f2328;
  --hm-fg-soft: #3f4650;
  --hm-fg-muted: #5f6b7a;
  --hm-fg-placeholder: #7b8794;

  --hm-blue: #3584e4;
  --hm-blue-hover: #1f6fd1;
  --hm-link: #1c71d8;
  --hm-link-hover: #1559aa;

  --hm-online: #2f9e44;
  --hm-away: #c88800;
  --hm-busy: #c01c28;
  --hm-offline: #8b949e;

  --hm-radius: 10px;
  --hm-radius-sm: 8px;
  --hm-radius-lg: 12px;
  --hm-radius-pill: 999px;

  --hm-shadow: 0 8px 24px rgba(31, 35, 40, 0.08);
  --hm-shadow-soft: 0 2px 8px rgba(31, 35, 40, 0.06);

  --border-radius: 8px;
}


/* =========================================================
   2. Theme root
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) {
  --foreground-color: var(--hm-fg);
  --background-color: var(--hm-bg);
  --background-color-rgb: 246, 245, 244;
  --global-background-color: var(--hm-bg);

  --blue: var(--hm-blue);
  --blue-rgb: 53, 132, 228;
  --primary-color: var(--hm-blue) !important;
  --primary-rgb: 53, 132, 228;
  --secondary-color: var(--hm-bg-soft) !important;

  --green: var(--hm-online);
  --green-rgb: 47, 158, 68;
  --red: var(--hm-busy);
  --red-rgb: 192, 28, 40;
  --orange: var(--hm-away);

  --converse-body-bg: var(--hm-bg);
  --converse-body-color: var(--hm-fg) !important;

  --heading-color: #111418;
  --subdued-color: var(--hm-fg-muted);

  --link-color: var(--hm-link);
  --link-color-hover: var(--hm-link-hover);

  --selection-color: var(--hm-blue);
  --highlight-color: var(--hm-bg-selected);
  --highlight-color-hover: #cde0fb;

  --chat-header-bg-color: var(--hm-bg-panel);
  --chat-header-fg-color: var(--hm-fg);

  --chat-status-online: var(--hm-online);
  --chat-status-away: var(--hm-away);
  --chat-status-busy: var(--hm-busy);
  --chat-status-offline: var(--hm-offline);

  background: var(--hm-bg) !important;
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) body {
  background: var(--hm-bg);
}


/* =========================================================
   3. Shared surfaces / shared text / shared icons
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.controlbox-pane, .controlbox) {
  background: var(--hm-bg-panel) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.chat-body, .chat-content, .chatroom-body) {
  background: var(--hm-bg) !important;
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.chat-head, .controlbox-head, .chatbox-title) {
  background: var(--hm-bg-panel) !important;
  color: var(--hm-fg) !important;
  border-bottom: 1px solid var(--hm-border) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) a {
  color: var(--hm-link) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) a:hover {
  color: var(--hm-link-hover) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) ::selection {
  background: var(--hm-blue) !important;
  color: #fff !important;
}

/* Primary icon rule */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-icon svg {
  fill: var(--hm-fg-soft) !important;
  stroke: var(--hm-fg-soft) !important;
}

/* Fallback icon styling */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .chat-toolbar i,
  .chat-toolbar svg,
  .chat-toolbar .fa,
  .dropdown-menu i,
  .dropdown-menu svg,
  .dropdown-menu .fa,
  .modal-header i,
  .modal-header svg,
  .modal-header .fa,
  .controlbox-head i,
  .controlbox-head svg,
  .controlbox-head .fa,
  .chat-head i,
  .chat-head svg,
  .chat-head .fa,
  button i,
  button svg,
  a[role="button"] i,
  a[role="button"] svg
) {
  color: var(--hm-fg-soft) !important;
  fill: var(--hm-fg-soft) !important;
  stroke: var(--hm-fg-soft) !important;
}


/* =========================================================
   4. Sidebar / roster
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.open-chat, .roster-contact, .list-item) {
  color: var(--hm-fg) !important;
  background: transparent !important;
  min-height: 44px;
  margin: 2px 6px;
  padding: 6px 10px !important;
  border-radius: var(--hm-radius);
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.open-chat, .roster-contact, .list-item):hover,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster .roster-group li:hover,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster li:hover,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #chatrooms li:hover {
  background: var(--hm-bg-hover) !important;
  border-radius: 6px;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.open-chat.active, .open-chat--active, .roster-contact.active, .selected, [aria-selected="true"]),
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster li.current-chat,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #chatrooms li.current-chat {
  background: var(--hm-bg-selected) !important;
  color: var(--hm-fg) !important;
  border-radius: 6px;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .roster-group,
  .controlbox-heading,
  .roster-group-toggle,
  .contacts-heading,
  .groupchats-heading,
  .list-group__header,
  .roster-group-header
) {
  color: var(--hm-fg-soft) !important;
  opacity: 1 !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.fa-caret-down, .fa-caret-right, .caret, .toggle-icon) {
  color: var(--hm-fg-muted) !important;
  opacity: 1 !important;
}

/* Section menu icon */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster converse-dropdown {
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster converse-dropdown converse-icon svg {
  fill: var(--hm-fg-soft) !important;
  stroke: var(--hm-fg-soft) !important;
}

/* Room names */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .chatroom a,
  .open-chat.room a,
  .open-chat.muc a,
  .rooms-list a,
  .room-item a,
  .chatroom-name,
  .open-chat.room,
  .open-chat.muc
) {
  color: var(--hm-fg) !important;
}

/* Roster avatars */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster .avatar,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster img.avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster li {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster .contact-name,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster .roster-contact span {
  line-height: 32px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) #converse-roster .xmpp-status {
  transform: scale(0.8);
  margin-left: 2px;
}

/* Presence colors */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .xmpp-status .fa-circle, .xmpp-status svg, .xmpp-status i,
  .choose-xmpp-status .fa-circle, .choose-xmpp-status svg, .choose-xmpp-status i,
  .roster-contact .fa-circle, .roster-contact svg, .roster-contact i,
  .open-chat .fa-circle, .open-chat svg, .open-chat i
) {
  color: inherit !important;
  fill: inherit !important;
  stroke: inherit !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.online, .chat-status-online, [data-status="online"]) {
  color: var(--hm-online) !important;
  fill: var(--hm-online) !important;
  stroke: var(--hm-online) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.away, .chat-status-away, [data-status="away"]) {
  color: var(--hm-away) !important;
  fill: var(--hm-away) !important;
  stroke: var(--hm-away) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.busy, .chat-status-busy, [data-status="dnd"], [data-status="busy"]) {
  color: var(--hm-busy) !important;
  fill: var(--hm-busy) !important;
  stroke: var(--hm-busy) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.offline, .chat-status-offline, [data-status="offline"]) {
  color: var(--hm-offline) !important;
  fill: var(--hm-offline) !important;
  stroke: var(--hm-offline) !important;
}


/* =========================================================
   5. Messages
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(img.avatar, .avatar, .chat-msg__avatar img) {
  border-radius: var(--hm-radius-pill) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg {
  margin-bottom: 12px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg__text {
  line-height: 1.5;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg__time {
  opacity: 0.7;
  font-size: 0.8em;
  color: var(--hm-fg-muted) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg__content {
  background: #ffffff !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  max-width: 70%;
  box-shadow: var(--hm-shadow-soft);
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg--received .chat-msg__content {
  background: #ffffff !important;
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg--sent .chat-msg__content {
  background: var(--hm-blue) !important;
  border-color: var(--hm-blue) !important;
  color: #fff !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg--sent .chat-msg__content a {
  color: #ffffff !important;
  text-decoration: underline;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg__content:hover {
  background: var(--hm-bg-soft) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-msg--sent .chat-msg__content:hover {
  background: var(--hm-blue-hover) !important;
}


/* =========================================================
   6. Composer
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.chat-textarea, textarea, input[type="text"]) {
  background: #ffffff !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border-soft) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(textarea, input)::placeholder {
  color: var(--hm-fg-placeholder) !important;
  opacity: 1 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(textarea, input):focus {
  outline: none !important;
  border-color: var(--hm-blue) !important;
  box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.18) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-textarea textarea {
  min-height: 36px;
  max-height: 140px;
  line-height: 1.5;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-textarea textarea:focus {
  min-height: 48px;
  background: #ffffff !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-toolbar {
  background: var(--hm-bg) !important;
  border-top: 1px solid var(--hm-border) !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  color: var(--hm-fg-soft) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-toolbar :is(button, a, .toggle-emojis, .toggle-attachments, .toggle-omemo, .fa, i) {
  color: var(--hm-fg-soft) !important;
  opacity: 1 !important;
  background: transparent !important;
  border: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .chat-toolbar :is(button, a):hover {
  color: var(--hm-fg) !important;
  background: var(--hm-bg-hover) !important;
  border-radius: var(--hm-radius-sm) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.chat-footer, .chat-toolbar, .message-form, .chat-textarea) {
  overflow: visible !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(button[type="submit"], .send-button) {
  background: var(--hm-blue) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(button[type="submit"], .send-button):hover {
  background: var(--hm-blue-hover) !important;
}


/* =========================================================
   7. Floating UI
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.dropdown-menu, .popover, .tooltip-inner, converse-emoji-picker) {
  background: var(--hm-bg-float) !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: var(--hm-radius) !important;
  box-shadow: var(--hm-shadow) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .dropdown-menu {
  padding: 6px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .dropdown-item {
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .dropdown-item:hover {
  background: var(--hm-bg-hover) !important;
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .popover {
  padding: 0 !important;
  border: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .popover-header {
  background: var(--hm-bg-soft) !important;
  color: var(--hm-fg) !important;
  border-bottom: 1px solid var(--hm-border) !important;
  border-top-left-radius: var(--hm-radius) !important;
  border-top-right-radius: var(--hm-radius) !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .popover-body {
  color: var(--hm-fg) !important;
  padding: 12px 14px !important;
  line-height: 1.4 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .popover .popover-arrow::before,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .popover .popover-arrow::after {
  border-top-color: var(--hm-bg-float) !important;
  border-bottom-color: var(--hm-bg-float) !important;
}

/* emoji */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .dropdown-menu.show {
  background: var(--hm-bg-float) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--hm-shadow) !important;
  padding: 0 !important;
  overflow: visible !important;
  z-index: 9999 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-emoji-dropdown .dropdown-menu {
  background: var(--hm-bg-float) !important;
  border: 1px solid var(--hm-border) !important;
  min-width: 20rem !important;
  min-height: 16rem !important;
  padding: 0 !important;
  overflow: visible !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-emoji-dropdown .dropdown-menu > li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-emoji-picker {
  --background-color: var(--hm-bg-float) !important;
  --foreground-color: var(--hm-fg) !important;
  --primary-color: var(--hm-blue) !important;
  --secondary-color: var(--hm-fg-soft) !important;
  --text-color: var(--hm-fg) !important;
  --muted-color: var(--hm-fg-muted) !important;
  --border-color: var(--hm-border) !important;

  display: block !important;
  width: 20rem !important;
  min-width: 320px !important;
  min-height: 256px !important;
  background: var(--hm-bg-float) !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 12px !important;
  padding: 6px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-emoji-picker button:hover {
  background: var(--hm-bg-hover) !important;
  border-radius: 6px !important;
}


/* =========================================================
   8. Modals
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .modal .form-label,
  .modal label,
  .profile .form-label,
  .profile label,
  .profile-item__label,
  .profile-field__label,
  .vcard .label,
  .vcard label,
  #converse-modals .modal .modal-body p.form-help
) {
  color: var(--hm-fg-muted) !important;
  opacity: 1 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .modal .form-value,
  .modal .value,
  .profile .value,
  .profile-item__value,
  .profile-field__value,
  .vcard .value
) {
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .modal-footer :is(button, .btn) {
  color: var(--hm-fg) !important;
  background: var(--hm-bg-soft) !important;
  border: 1px solid var(--hm-border-soft) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .modal-footer :is(button, .btn):hover {
  background: var(--hm-bg-hover) !important;
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .modal .btn-toolbar,
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .modal .btn-toolbar * {
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .modal .btn-toolbar :is(.text-muted, .subdued, small) {
  color: var(--hm-fg-soft) !important;
  opacity: 1 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) converse-user-details-modal :is(.remove-contact, .toggle-form, .change-form, .btn, button) {
  color: var(--hm-fg) !important;
  opacity: 1 !important;
}


/* =========================================================
   9. Login
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel, .login-container, .login-form, .card) {
  background: var(--hm-bg-float) !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border) !important;
  border-radius: 12px !important;
  box-shadow: var(--hm-shadow) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-container, .login-panel) {
  max-width: 420px !important;
  margin: 80px auto !important;
  padding: 24px 28px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel h1, .login-panel h2, .login-panel h3, .login-form legend, .login-form label) {
  color: var(--hm-fg) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .login-panel input,
  .login-panel select,
  .login-panel textarea,
  .login-form input,
  .login-form select,
  .login-form textarea
) {
  background: #ffffff !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border-soft) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel input::placeholder, .login-form input::placeholder) {
  color: var(--hm-fg-placeholder) !important;
  opacity: 1 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .login-panel input:focus,
  .login-panel select:focus,
  .login-panel textarea:focus,
  .login-form input:focus,
  .login-form select:focus,
  .login-form textarea:focus
) {
  outline: none !important;
  border-color: var(--hm-blue) !important;
  box-shadow: 0 0 0 2px rgba(53, 132, 228, 0.18) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel button, .login-panel .btn, .login-form button, .login-form .btn) {
  border-radius: 10px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel .btn-primary, .login-form .btn-primary) {
  background: var(--hm-blue) !important;
  color: #fff !important;
  border: none !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel .btn-primary, .login-form .btn-primary):hover {
  background: var(--hm-blue-hover) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel .btn-secondary, .login-form .btn-secondary) {
  background: var(--hm-bg-soft) !important;
  color: var(--hm-fg) !important;
  border: 1px solid var(--hm-border-soft) !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .login-panel small,
  .login-panel .text-muted,
  .login-panel .form-text,
  .login-form small,
  .login-form .text-muted,
  .login-form .form-text
) {
  color: var(--hm-fg-muted) !important;
  opacity: 1 !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel .form-group, .login-panel .mb-3) {
  margin-bottom: 16px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(.login-panel h1, .login-panel h2, .login-panel legend) {
  margin-bottom: 16px !important;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) .login-panel .btn-primary {
  width: 100%;
  margin-top: 8px !important;
  padding: 10px 14px !important;
}

/* login warning */
:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  .alert.alert-danger.conn-feedback,
  .alert.alert-danger.conn-feedback .feedback-message,
  .conn-feedback,
  .conn-feedback .feedback-message,
  .conn-feedback span,
  .conn-feedback p,
  .conn-feedback small
) {
  background: #fff4f4 !important;
  color: #8a1f28 !important;
  border: 1px solid #e9b4b8 !important;
  opacity: 1 !important;
}


/* =========================================================
   10. Motion
   ========================================================= */

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(
  button,
  a,
  .dropdown-item,
  .roster-contact,
  .open-chat,
  .chat-msg__content,
  .chat-toolbar button,
  .chat-toolbar a
) {
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

:is(
  .conversejs.theme-hayalmasal-light,
  [data-converse-theme="hayalmasal-light"],
  [data-bs-theme="hayalmasal-light"]
) :is(textarea, input) {
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
