/* ===== SUPPORT CHAT WIDGET ===== */
/* Luxury-terminal aesthetic: precise geometry, glass depth, fluid motion */

/* ===== Floating Button ===== */
.support-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #3861fb 0%, #6c5ce7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 24px rgba(56, 97, 251, 0.35),
    0 0 0 0 rgba(56, 97, 251, 0.4);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  animation: support-breathe 3s ease-in-out infinite;
}

.support-fab:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 32px rgba(56, 97, 251, 0.5),
    0 0 0 8px rgba(56, 97, 251, 0.08);
}

.support-fab:active {
  transform: scale(0.95);
}

.support-fab.has-notification {
  animation: support-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both, support-breathe 3s ease-in-out infinite 0.6s;
}

.support-fab svg {
  width: 26px;
  height: 26px;
  transition: transform 0.3s ease;
}

.support-fab:hover svg {
  transform: rotate(-8deg) scale(1.05);
}

/* Unread Badge */
.support-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #ff3366;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(255, 51, 102, 0.5);
  transform: scale(0);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.support-badge.show {
  transform: scale(1);
}

.support-badge.bounce {
  animation: support-badge-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Chat Window ===== */
.support-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  z-index: 9999;
  width: 390px;
  height: 540px;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(56, 97, 251, 0.15);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(56, 97, 251, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  /* Hidden by default */
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.support-window.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Gradient accent bar at top */
.support-window::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3861fb, #6c5ce7, #3861fb);
  background-size: 200% 100%;
  animation: support-gradient-slide 4s linear infinite;
  z-index: 2;
}

/* ===== Header ===== */
.support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  background: rgba(6, 11, 20, 0.7);
  border-bottom: 1px solid rgba(56, 97, 251, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.support-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.support-header-back {
  background: none;
  border: none;
  color: var(--text-secondary, #8899aa);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.support-header-back:hover {
  color: #fff;
  background: rgba(56, 97, 251, 0.12);
}

.support-header-back svg {
  width: 18px;
  height: 18px;
}

.support-header-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.support-header-subtitle {
  font-size: 11px;
  color: var(--text-muted, #556677);
  margin-top: 1px;
}

.support-header-close {
  background: none;
  border: none;
  color: var(--text-muted, #556677);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.support-header-close:hover {
  color: #ff3366;
  background: rgba(255, 51, 102, 0.08);
}

.support-header-close svg {
  width: 18px;
  height: 18px;
}

/* ===== Body (scrollable content area) ===== */
.support-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

.support-body::-webkit-scrollbar {
  width: 4px;
}

.support-body::-webkit-scrollbar-track {
  background: transparent;
}

.support-body::-webkit-scrollbar-thumb {
  background: rgba(56, 97, 251, 0.2);
  border-radius: 4px;
}

/* ===== Views ===== */
.support-view {
  display: none;
  flex-direction: column;
  height: 100%;
}

.support-view.active {
  display: flex;
}

/* ===== Ticket List View ===== */
.support-new-ticket-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 16px 8px;
  padding: 10px 16px;
  border: 1px dashed rgba(56, 97, 251, 0.3);
  border-radius: 10px;
  background: rgba(56, 97, 251, 0.04);
  color: #3861fb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.support-new-ticket-btn:hover {
  background: rgba(56, 97, 251, 0.1);
  border-color: rgba(56, 97, 251, 0.5);
  transform: translateY(-1px);
}

.support-new-ticket-btn svg {
  width: 16px;
  height: 16px;
}

.support-ticket-list {
  padding: 6px 12px 12px;
  flex: 1;
  overflow-y: auto;
}

.support-ticket-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  border: 1px solid transparent;
  margin-bottom: 4px;
  animation: support-item-in 0.3s ease both;
}

.support-ticket-item:nth-child(1) { animation-delay: 0s; }
.support-ticket-item:nth-child(2) { animation-delay: 0.04s; }
.support-ticket-item:nth-child(3) { animation-delay: 0.08s; }
.support-ticket-item:nth-child(4) { animation-delay: 0.12s; }
.support-ticket-item:nth-child(5) { animation-delay: 0.16s; }

.support-ticket-item:hover {
  background: rgba(56, 97, 251, 0.06);
  border-color: rgba(56, 97, 251, 0.1);
}

.support-ticket-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 97, 251, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #3861fb;
}

.support-ticket-icon svg {
  width: 16px;
  height: 16px;
}

.support-ticket-info {
  flex: 1;
  min-width: 0;
}

.support-ticket-subject {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.support-ticket-preview {
  font-size: 12px;
  color: var(--text-muted, #556677);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-ticket-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.support-ticket-time {
  font-size: 11px;
  color: var(--text-muted, #556677);
  font-family: 'JetBrains Mono', monospace;
}

.support-ticket-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.support-ticket-status.open {
  background: rgba(56, 97, 251, 0.12);
  color: #3861fb;
}

.support-ticket-status.answered {
  background: rgba(0, 230, 138, 0.12);
  color: #00e68a;
}

.support-ticket-status.closed {
  background: rgba(85, 102, 119, 0.15);
  color: #667788;
}

/* Empty state */
.support-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
}

.support-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(56, 97, 251, 0.06);
  border: 1px solid rgba(56, 97, 251, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted, #556677);
}

.support-empty-icon svg {
  width: 28px;
  height: 28px;
  opacity: 0.5;
}

.support-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #8899aa);
  margin-bottom: 6px;
}

.support-empty-desc {
  font-size: 12px;
  color: var(--text-muted, #556677);
  line-height: 1.5;
}

/* ===== Conversation View ===== */
.support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-messages::-webkit-scrollbar {
  width: 4px;
}

.support-messages::-webkit-scrollbar-track {
  background: transparent;
}

.support-messages::-webkit-scrollbar-thumb {
  background: rgba(56, 97, 251, 0.15);
  border-radius: 4px;
}

.support-msg {
  max-width: 82%;
  animation: support-msg-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.support-msg.user {
  align-self: flex-end;
}

.support-msg.admin {
  align-self: flex-start;
}

.support-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.support-msg.user .support-msg-bubble {
  background: linear-gradient(135deg, #3861fb, #4c6ef5);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.support-msg.admin .support-msg-bubble {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid rgba(56, 97, 251, 0.1);
  color: var(--text-primary, #e0e6ed);
  border-bottom-left-radius: 4px;
}

.support-msg-time {
  font-size: 10px;
  color: var(--text-muted, #556677);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
  padding: 0 4px;
}

.support-msg.user .support-msg-time {
  text-align: right;
}

.support-msg.admin .support-msg-time {
  text-align: left;
}

/* Admin label */
.support-msg-sender {
  font-size: 10px;
  font-weight: 600;
  color: #00e68a;
  margin-bottom: 4px;
  padding-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Date divider */
.support-date-divider {
  text-align: center;
  font-size: 10px;
  color: var(--text-muted, #556677);
  padding: 8px 0;
  position: relative;
}

.support-date-divider::before,
.support-date-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: rgba(56, 97, 251, 0.08);
}

.support-date-divider::before { left: 0; }
.support-date-divider::after { right: 0; }

/* ===== Message Input ===== */
.support-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px 14px;
  background: rgba(6, 11, 20, 0.5);
  border-top: 1px solid rgba(56, 97, 251, 0.08);
  flex-shrink: 0;
}

.support-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(56, 97, 251, 0.12);
  border-radius: 12px;
  background: rgba(12, 18, 32, 0.8);
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  resize: none;
  max-height: 80px;
  min-height: 38px;
  line-height: 1.4;
  transition: border-color 0.2s;
  outline: none;
}

.support-input::placeholder {
  color: var(--text-muted, #556677);
}

.support-input:focus {
  border-color: rgba(56, 97, 251, 0.35);
}

.support-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3861fb, #6c5ce7);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(56, 97, 251, 0.3);
}

.support-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 18px rgba(56, 97, 251, 0.45);
}

.support-send-btn:active {
  transform: scale(0.95);
}

.support-send-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.support-send-btn svg {
  width: 18px;
  height: 18px;
}

/* ===== New Ticket Form ===== */
.support-new-ticket-form {
  display: none;
  flex-direction: column;
  padding: 16px;
  gap: 12px;
  height: 100%;
}

.support-new-ticket-form.active {
  display: flex;
}

.support-new-ticket-form .support-form-title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.support-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.support-form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #8899aa);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.support-form-field input,
.support-form-field textarea {
  padding: 10px 14px;
  border: 1px solid rgba(56, 97, 251, 0.12);
  border-radius: 10px;
  background: rgba(12, 18, 32, 0.8);
  color: #fff;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.support-form-field input:focus,
.support-form-field textarea:focus {
  border-color: rgba(56, 97, 251, 0.4);
}

.support-form-field input::placeholder,
.support-form-field textarea::placeholder {
  color: var(--text-muted, #556677);
}

.support-form-field textarea {
  flex: 1;
  min-height: 100px;
  resize: none;
  line-height: 1.5;
}

.support-form-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.support-form-cancel {
  flex: 1;
  padding: 10px;
  border: 1px solid rgba(56, 97, 251, 0.12);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary, #8899aa);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.support-form-cancel:hover {
  background: rgba(56, 97, 251, 0.06);
  color: #fff;
}

.support-form-submit {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #3861fb, #6c5ce7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(56, 97, 251, 0.25);
}

.support-form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(56, 97, 251, 0.4);
}

.support-form-submit:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

/* ===== Typing Indicator ===== */
.support-typing {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 4px 14px 8px;
  font-size: 11px;
  color: var(--text-muted, #556677);
}

.support-typing.show {
  display: flex;
}

.support-typing-dots {
  display: flex;
  gap: 3px;
}

.support-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted, #556677);
  animation: support-typing-wave 1.2s ease-in-out infinite;
}

.support-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.support-typing-dot:nth-child(3) { animation-delay: 0.3s; }

/* ===== File Attachment Button ===== */
.support-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(56, 97, 251, 0.15);
  background: transparent;
  color: var(--text-muted, #556677);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.support-attach-btn:hover {
  color: #3861fb;
  border-color: rgba(56, 97, 251, 0.3);
  background: rgba(56, 97, 251, 0.05);
}

.support-attach-btn svg {
  width: 18px;
  height: 18px;
}

/* File preview in message */
.support-msg-file {
  margin-top: 6px;
}

.support-msg-file img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
}

.support-msg-file img:hover {
  opacity: 0.85;
}

.support-msg-file-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(56, 97, 251, 0.1);
  color: #3861fb;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.2s;
}

.support-msg-file-link:hover {
  background: rgba(56, 97, 251, 0.18);
}

.support-msg-file-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* File preview bar (before sending) */
.support-file-preview {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(56, 97, 251, 0.06);
  border-top: 1px solid rgba(56, 97, 251, 0.08);
  font-size: 12px;
  color: var(--text-secondary, #8899aa);
}

.support-file-preview.show {
  display: flex;
}

.support-file-preview-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-file-preview-remove {
  background: none;
  border: none;
  color: #ff3366;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  font-size: 16px;
  line-height: 1;
}

.support-file-preview img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
}

/* ===== Welcome / Guest View ===== */
.support-welcome {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 32px 24px;
  text-align: center;
  gap: 16px;
}

.support-welcome.active {
  display: flex;
}

.support-welcome-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(56, 97, 251, 0.12), rgba(108, 92, 231, 0.12));
  border: 1px solid rgba(56, 97, 251, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3861fb;
  animation: support-breathe 3s ease-in-out infinite;
}

.support-welcome-icon svg {
  width: 32px;
  height: 32px;
}

.support-welcome-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.support-welcome-desc {
  font-size: 13px;
  color: var(--text-muted, #556677);
  line-height: 1.6;
  max-width: 280px;
}

.support-welcome-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #3861fb, #6c5ce7);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 18px rgba(56, 97, 251, 0.3);
}

.support-welcome-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(56, 97, 251, 0.45);
}

.support-welcome-online {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #00e68a;
  font-weight: 500;
}

.support-welcome-online::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e68a;
  box-shadow: 0 0 8px rgba(0, 230, 138, 0.5);
  animation: support-breathe-green 2s ease-in-out infinite;
}

@keyframes support-breathe-green {
  0%, 100% { box-shadow: 0 0 4px rgba(0, 230, 138, 0.3); }
  50% { box-shadow: 0 0 10px rgba(0, 230, 138, 0.6); }
}

[data-theme="light"] .support-welcome-title {
  color: #111827;
}

[data-theme="light"] .support-attach-btn {
  border-color: rgba(56, 97, 251, 0.1);
}

/* ===== Animations ===== */
@keyframes support-breathe {
  0%, 100% {
    box-shadow: 0 4px 24px rgba(56, 97, 251, 0.3), 0 0 0 0 rgba(56, 97, 251, 0.15);
  }
  50% {
    box-shadow: 0 4px 24px rgba(56, 97, 251, 0.3), 0 0 0 10px rgba(56, 97, 251, 0);
  }
}

@keyframes support-shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

@keyframes support-badge-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  60% { transform: scale(0.85); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes support-gradient-slide {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes support-item-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes support-msg-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes support-typing-wave {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* ===== Light Theme ===== */
[data-theme="light"] .support-window {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(56, 97, 251, 0.12);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.15), 0 0 1px rgba(56, 97, 251, 0.2);
}

[data-theme="light"] .support-header {
  background: rgba(255, 255, 255, 0.8);
  border-bottom-color: rgba(56, 97, 251, 0.08);
}

[data-theme="light"] .support-header-title {
  color: #111827;
}

[data-theme="light"] .support-msg.admin .support-msg-bubble {
  background: #f3f4f8;
  border-color: rgba(56, 97, 251, 0.08);
  color: #1a1a2e;
}

[data-theme="light"] .support-input {
  background: #f3f4f8;
  border-color: rgba(56, 97, 251, 0.1);
  color: #111827;
}

[data-theme="light"] .support-input-area {
  background: rgba(255, 255, 255, 0.6);
  border-top-color: rgba(56, 97, 251, 0.06);
}

[data-theme="light"] .support-ticket-subject {
  color: #111827;
}

[data-theme="light"] .support-new-ticket-btn {
  background: rgba(56, 97, 251, 0.03);
  border-color: rgba(56, 97, 251, 0.2);
}

[data-theme="light"] .support-form-field input,
[data-theme="light"] .support-form-field textarea {
  background: #f3f4f8;
  border-color: rgba(56, 97, 251, 0.1);
  color: #111827;
}

[data-theme="light"] .support-new-ticket-form .support-form-title {
  color: #111827;
}

[data-theme="light"] .support-empty-title {
  color: #333;
}

[data-theme="light"] .support-ticket-icon {
  background: rgba(56, 97, 251, 0.06);
}

/* ===== Mobile — fullscreen below 600px ===== */
@media (max-width: 600px) {
  .support-window {
    bottom: 0;
    right: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: 100dvh;
    max-height: 100vh;
  }

  .support-window.open {
    transform: translateY(0) scale(1);
  }

  .support-header {
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 8px);
  }

  .support-chat-input-area {
    padding-bottom: env(safe-area-inset-bottom, 12px);
  }

  .support-fab {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .support-fab svg {
    width: 22px;
    height: 22px;
  }

  .support-badge {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  /* Messages */
  .support-msg {
    max-width: 85%;
    font-size: 13px;
  }

  .support-msg-time {
    font-size: 10px;
  }

  /* New ticket form */
  .support-form-field input,
  .support-form-field textarea {
    font-size: 14px;
  }

  .support-ticket-item {
    padding: 12px 14px;
  }

  .support-ticket-subject {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .support-fab {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }

  .support-fab svg {
    width: 20px;
    height: 20px;
  }
}
