/* ===== Support Center Styles ===== */

/* Support Center View */
.support-center {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.support-center h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.support-center-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* Announcement Banner */
.support-announcements {
  margin-bottom: 24px;
}

.announcement-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.announcement-bar.maintenance {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.05);
}

.announcement-bar.warning {
  border-color: rgba(228, 54, 54, 0.4);
  background: rgba(228, 54, 54, 0.05);
}

.announcement-bar.release {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.announcement-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.announcement-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.announcement-content p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Support Cards Grid */
.support-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.support-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.support-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  background: rgba(228, 54, 54, 0.1);
  color: var(--do-blue);
}

.support-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.support-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 32px;
}

.faq-category-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
}

.faq-question:hover {
  background: var(--bg-card-hover);
}

.faq-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Ticket List */
.ticket-list {
  margin-bottom: 24px;
}

.ticket-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ticket-row:hover {
  background: var(--bg-card-hover);
}

.ticket-row-info {
  flex: 1;
}

.ticket-row-subject {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ticket-row-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.ticket-row-status {
  flex-shrink: 0;
}

/* KB Article Cards */
.kb-list {
  margin-bottom: 24px;
}

.kb-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.kb-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.kb-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.kb-card-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.kb-article-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.kb-article-body h1, .kb-article-body h2, .kb-article-body h3 {
  color: var(--text-primary);
  margin: 20px 0 8px;
}

.kb-article-body code {
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.kb-article-body pre {
  background: var(--bg-tertiary);
  padding: 14px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 12px 0;
}

/* Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

.chatbot-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--do-blue);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-fast);
  color: #fff;
}

.chatbot-trigger:hover {
  background: var(--do-blue-hover);
  transform: scale(1.05);
}

.chatbot-trigger svg {
  width: 26px;
  height: 26px;
}

.chatbot-window {
  display: none;
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  flex-direction: column;
}

.chatbot-widget.open .chatbot-window {
  display: flex;
}

.chatbot-header {
  padding: 16px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-header-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.chatbot-header-title span {
  font-size: 15px;
  font-weight: 600;
}

.chatbot-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.chatbot-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
  max-height: 350px;
}

.chatbot-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.chatbot-msg-bot {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chatbot-msg-user {
  background: var(--do-blue);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chatbot-msg-bot strong {
  color: var(--text-primary);
}

.chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.chatbot-suggestion {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.chatbot-suggestion:hover {
  border-color: var(--do-blue);
  color: var(--do-blue);
}

.chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.chatbot-input-area input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
}

.chatbot-input-area input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.chatbot-input-area input::placeholder {
  color: var(--text-muted);
}

.chatbot-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--do-blue);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.chatbot-send:hover {
  background: var(--do-blue-hover);
}

.chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chatbot-escalate-bar {
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.08);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--yellow);
}

.chatbot-escalate-bar button {
  padding: 5px 12px;
  background: var(--yellow);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}

/* Live Chat Overlay */
.live-chat-overlay {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  flex-direction: column;
  overflow: hidden;
}

.live-chat-overlay.active {
  display: flex;
}

.live-chat-header {
  padding: 16px 18px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-chat-header-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-chat-header-info .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}

.live-chat-header-info .status-dot.connected {
  background: var(--green);
}

.live-chat-header-info span {
  font-size: 15px;
  font-weight: 600;
}

.live-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
  max-height: 350px;
}

.live-chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.5;
}

.live-chat-msg-user {
  background: var(--do-blue);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.live-chat-msg-agent {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.live-chat-msg-system {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text-muted);
  align-self: center;
  font-style: italic;
  font-size: 13px;
  text-align: center;
}

.live-chat-waiting {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
}

.live-chat-waiting .spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--do-blue);
  border-radius: 50%;
  animation: support-spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes support-spin {
  to { transform: rotate(360deg); }
}

.live-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.live-chat-input-area input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
}

.live-chat-input-area input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.live-chat-input-area input::placeholder {
  color: var(--text-muted);
}

.live-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--do-blue);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.live-chat-end {
  padding: 10px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.live-chat-end button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  font-family: var(--font-sans);
}

.live-chat-end button:hover {
  color: var(--red);
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  align-self: flex-start;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Support back button */
.support-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font-sans);
  margin-bottom: 16px;
  padding: 0;
}

.support-back:hover {
  color: var(--text-primary);
}

/* Ticket form */
.ticket-form {
  max-width: 600px;
}

/* Feedback form */
.feedback-form {
  max-width: 500px;
}

.star-rating {
  display: flex;
  gap: 4px;
  margin: 8px 0;
}

.star-rating button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 24px;
  padding: 0;
  transition: color var(--transition-fast);
}

.star-rating button.active,
.star-rating button:hover {
  color: var(--yellow);
}
