.support-page {
  color: #254033;
}

.support-hero-icon {
  display: inline-grid;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 1rem;
  place-items: center;
  border: 1px solid rgba(25, 135, 84, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: #198754;
  font-size: 1.35rem;
}

.support-content {
  background: #fffdf8;
}

.support-content > .container {
  max-width: 1100px !important;
}

.support-info-panel,
.support-chat-panel {
  border: 1px solid #eadfca;
  border-radius: 12px;
  background: #fffaf0;
  box-shadow: 0 12px 28px rgba(90, 71, 42, 0.08);
}

.support-info-panel {
  padding: clamp(1.1rem, 2vw, 1.5rem);
  align-self: start;
  position: sticky;
  top: 5rem;
}

.support-kicker {
  color: #198754;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.support-info-panel h2 {
  margin: 0.65rem 0 0.75rem;
  color: #244333;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.support-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.support-detail-icon {
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e7f4ec;
  color: #198754;
}

.support-detail strong,
.support-detail span,
.support-detail a {
  display: block;
}

.support-detail strong {
  color: #355443;
  font-size: 0.85rem;
}

.support-detail span,
.support-detail a {
  margin-top: 0.15rem;
  color: #718178;
  font-size: 0.82rem;
  text-decoration: none;
}

.support-detail a:hover {
  color: #198754;
  text-decoration: underline;
}

.support-faqs {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #eadfca;
}

.support-faqs h3 {
  margin-bottom: 0.75rem;
  color: #355443;
  font-size: 1rem;
}

.support-faqs a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(234, 223, 202, 0.8);
  color: #567064;
  font-size: 0.82rem;
  text-decoration: none;
}

.support-faqs a:hover {
  color: #198754;
}

.support-faqs a i {
  flex: 0 0 auto;
  font-size: 0.7rem;
}

.support-chat-panel {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eadfca;
  color: #355443;
  font-size: 0.82rem;
  font-weight: 700;
}

.support-status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #f0ad4e;
  vertical-align: middle;
}

.support-chat-header.is-connected .support-status-dot {
  background: #198754;
}

.support-chat-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.support-encryption {
  color: #8d9a91;
  font-size: 0.7rem;
  font-weight: 500;
}

.support-chat-body {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.support-identity-form {
  max-width: 680px;
  margin: auto;
  width: 100%;
}

.support-form-heading h2 {
  margin-bottom: 0.35rem;
  color: #244333;
  font-size: 1.35rem;
}

.support-form-heading p {
  margin-bottom: 1.25rem;
  color: #718178;
  font-size: 0.85rem;
}

.support-identity-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: #496254;
  font-size: 0.76rem;
  font-weight: 700;
}

.support-identity-form .form-control,
.support-message-form textarea {
  border: 1px solid #d7e3da;
  border-radius: 7px;
  background: #fbfdfb;
  color: #254033;
  font-size: 0.86rem;
}

.support-identity-form .form-control:focus,
.support-message-form textarea:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.12);
}

.support-start-button {
  display: inline-flex !important;
  width: fit-content !important;
  min-height: 40px;
  margin-top: 1.25rem;
  padding: 0.55rem 1rem;
  border: 1px solid #198754 !important;
  border-radius: 7px;
  background: #198754 !important;
  color: #ffffff !important;
  font-size: 0.8rem;
  font-weight: 700;
}

.support-start-button:hover,
.support-start-button:focus-visible {
  border-color: #146c43 !important;
  background: #146c43 !important;
  color: #ffffff !important;
}

.support-form-error {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
  color: #b54747;
  font-size: 0.78rem;
}

.support-conversation {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.support-messages {
  display: flex;
  min-height: 250px;
  flex: 1;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding: 0.25rem 0.25rem 1rem;
}

.support-message {
  max-width: min(78%, 520px);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
}

.support-message--visitor {
  align-self: flex-end;
  background: #198754;
  color: #ffffff;
}

.support-message--admin,
.support-message--system {
  align-self: flex-start;
  background: #f3f7f3;
  color: #355443;
}

.support-message-meta {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.66rem;
  opacity: 0.72;
}

.support-typing {
  min-height: 1.2rem;
  color: #718178;
  font-size: 0.72rem;
  font-style: italic;
}

.support-message-form {
  display: flex;
  align-items: flex-end;
  gap: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid #eadfca;
}

.support-message-form textarea {
  min-height: 44px;
  max-height: 140px;
  flex: 1;
  resize: vertical;
  padding: 0.7rem 0.8rem;
}

.support-message-form .btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px !important;
  height: 44px !important;
  padding: 0;
  border: 0 !important;
  border-radius: 12px !important;
  background: #198754 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.support-message-form .btn:hover,
.support-message-form .btn:focus-visible {
  background: #146c43 !important;
  border: 0 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.support-message-form .btn i {
  display: block;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1;
  text-align: center;
}

@media (max-width: 767.98px) {
  .support-content {
    padding-block: 2rem !important;
  }

  .support-info-panel {
    position: static;
  }

  .support-chat-panel {
    min-height: min(480px, 72vh);
    min-height: min(480px, 72dvh);
  }

  .support-chat-header {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
  }

  .support-chat-header-actions {
    width: auto;
    margin-left: auto;
  }

  .support-chat-body {
    padding: 0.9rem;
  }

  .support-message {
    max-width: 90%;
    font-size: 0.82rem;
  }
}

.admin-support-page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 720px;
  height: calc(100vh - 120px);
  max-height: calc(100vh - 120px);
  padding: clamp(1rem, 3vw, 2rem);
  background: #fffdf8;
  color: #254033;
  overflow: hidden;
}

.admin-support-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto 1.25rem;
  max-width: 1500px;
  flex-shrink: 0;
}

.admin-support-header h1 {
  margin: 0.35rem 0;
  color: #244333;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.admin-support-header p {
  margin: 0;
  color: #718178;
  font-size: 0.86rem;
}

.admin-support-online {
  color: #567064;
  font-size: 0.8rem;
  white-space: nowrap;
}

.admin-support-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 540px;
  max-width: 1500px;
  flex: 1 1 auto;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #eadfca;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(90, 71, 42, 0.08);
  min-width: 0;
}

.admin-support-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  border-right: 1px solid #eadfca;
  background: #fffaf0;
  overflow: hidden;
}

.admin-support-sidebar,
.admin-support-chat,
.admin-support-list,
.admin-support-messages,
#supportAdminConversation {
  min-height: 0;
}

.admin-support-sidebar-top,
.admin-support-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #eadfca;
}

.admin-support-sidebar-top h2,
.admin-support-chat-header h2 {
  margin: 0;
  color: #355443;
  font-size: 1rem;
}

.admin-support-sidebar-top .badge {
  font-size: 0.65rem;
}

.admin-support-sidebar-top .form-select {
  width: auto;
  max-width: 110px;
  font-size: 0.7rem;
}

.admin-support-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d7e3da;
  border-radius: 7px;
  background: #ffffff;
  color: #8d9a91;
  flex-shrink: 0;
}

.admin-support-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #355443;
  font-size: 0.78rem;
}

.admin-support-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  position: relative;
}

.admin-support-chat {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

#supportAdminConversation {
  display: flex;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.admin-support-sidebar .admin-support-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.admin-support-conversation {
  display: block;
  width: 100%;
  padding: 0.8rem 1rem;
  border: 0;
  border-bottom: 1px solid #eee6d8;
  background: transparent;
  color: #355443;
  text-align: left;
}

.admin-support-conversation:hover,
.admin-support-conversation.is-active {
  background: #eaf5ee;
}

.admin-support-conversation-top,
.admin-support-conversation-meta,
.admin-support-conversation-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-support-conversation-top strong {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-support-conversation-subject {
  display: block;
  margin-top: 0.35rem;
  overflow: hidden;
  color: #567064;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-support-conversation-meta {
  display: block;
  margin-top: 0.35rem;
  color: #8d9a91;
  font-size: 0.68rem;
}

.admin-support-no-results {
  padding: 1.5rem 1rem;
  color: #8d9a91;
  font-size: 0.8rem;
  text-align: center;
}

.admin-support-empty {
  display: grid;
  flex: 1;
  place-content: center;
  padding: 2rem;
  color: #8d9a91;
  text-align: center;
}

.admin-support-empty i {
  margin-bottom: 0.75rem;
  color: #b4c9ba;
  font-size: 2rem;
}

.admin-support-empty h2 {
  color: #567064;
  font-size: 1.1rem;
}

.admin-support-empty p {
  font-size: 0.8rem;
}

.admin-support-chat-header p {
  margin: 0.25rem 0 0;
  color: #8d9a91;
  font-size: 0.75rem;
}

.admin-support-chat-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-support-chat-actions .form-select {
  width: auto;
  font-size: 0.75rem;
}

.admin-support-messages {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  height: auto;
  max-height: 100%;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.25rem;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.admin-support-message {
  max-width: min(76%, 620px);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.admin-support-message--visitor {
  align-self: flex-start;
  background: #f3f7f3;
  color: #355443;
}

.admin-support-message--admin {
  align-self: flex-end;
  background: #198754;
  color: #ffffff;
}

.admin-support-message--system {
  align-self: center;
  background: #fffaf0;
  color: #718178;
  font-size: 0.75rem;
}

.admin-support-message span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.65rem;
  opacity: 0.72;
}

.admin-support-reply-form {
  display: flex;
  align-items: flex-end;
  flex-shrink: 0;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #eadfca;
}

.admin-support-reply-form .btn {
  min-height: 42px !important;
  padding: 0.6rem 1rem !important;
  border: 1px solid #198754 !important;
  border-radius: 8px !important;
  background: #198754 !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.admin-support-reply-form .btn:hover,
.admin-support-reply-form .btn:focus-visible,
.admin-support-reply-form .btn:active,
.admin-support-reply-form .btn:focus {
  border-color: #146c43 !important;
  background: #146c43 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.admin-support-reply-form textarea {
  min-height: 44px;
  flex: 1;
  resize: vertical;
  border: 1px solid #d7e3da;
  border-radius: 7px;
  font-size: 0.84rem;
}

.support-admin-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1060;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 7px;
  background: #244333;
  color: #ffffff;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.support-admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767.98px) {
  .admin-support-page {
    padding: 1rem 0.75rem;
  }

  .admin-support-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-support-workspace {
    display: block;
    min-height: 0;
  }

  .admin-support-sidebar {
    border-right: 0;
    border-bottom: 1px solid #eadfca;
  }

  .admin-support-list {
    max-height: 270px;
  }

  .admin-support-chat {
    min-height: 560px;
  }

  .admin-support-chat-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-support-chat-actions {
    width: 100%;
  }

  .admin-support-chat-actions .form-select {
    flex: 1;
  }

  .admin-support-message {
    max-width: 90%;
    font-size: 0.8rem;
  }

  .admin-support-reply-form {
    align-items: stretch;
    flex-direction: column;
    padding: 0.75rem;
  }

  .admin-support-reply-form .btn {
    width: 100%;
  }
}
