/* Riddgem Assistant - clean final CSS */

.rg-ai-launcher {
  position: fixed !important;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  width: min(280px, calc(100vw - 24px));
  max-width: min(280px, calc(100vw - 24px));
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  background: #fff;
  overflow: hidden;
  transition: opacity .2s ease, transform .2s ease;
}

#rgAiLauncher {
  display: block;
  opacity: 1;
  visibility: visible;
}

.rg-ai-launcher__inner {
  padding: 12px;
}

.rg-ai-launcher__eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  opacity: .7;
  margin-bottom: 6px;
}

.rg-ai-launcher__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 4px;
}

.rg-ai-launcher__subtitle {
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 10px;
  opacity: .85;
}

.rg-ai-launcher__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rg-ai-launcher__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #f2f2f2;
  color: #111;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10005;
  pointer-events: auto;
}

.rg-ai-btn,
.rg-ai-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
}

.rg-ai-btn {
  background: #111;
  color: #fff;
}

.rg-ai-btn:hover,
.rg-ai-btn:focus {
  color: #fff;
  text-decoration: none;
}

.rg-ai-btn-secondary {
  background: #f3f3f3;
  color: #111;
}

.rg-ai-btn-secondary:hover,
.rg-ai-btn-secondary:focus {
  color: #111;
  text-decoration: none;
}

.rg-product-help {
  margin-top: 10px;
}

.rg-help-center {
  max-width: 960px;
  margin: 0 auto;
}

.rg-help-center__intro {
  margin-bottom: 24px;
}

.rg-help-center__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rg-help-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
  padding: 18px;
}

.rg-help-card h3 {
  margin-top: 0;
  font-size: 16px;
}

.rg-help-card p {
  margin-bottom: 0;
  line-height: 1.6;
}

/* Assistant panel */
.rg-assistant-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.22);
  z-index: 10000;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 14px;
}

.rg-assistant-overlay.is-open {
  display: flex !important;
}

.rg-assistant-panel {
  width: 340px;
  max-width: calc(100vw - 24px);
  max-height: 62vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  position: relative;
  padding: 14px;
}

.rg-assistant-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f1f1f1;
  color: #111;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10005;
  pointer-events: auto;
}

.rg-assistant-header {
  padding-right: 48px;
  margin-bottom: 12px;
}

.rg-assistant-kicker {
  font-size: 12px;
  font-weight: 700;
  opacity: .7;
  margin-bottom: 6px;
}

.rg-assistant-header h2 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.2;
}

.rg-assistant-header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: .85;
}

.rg-assistant-menu {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.rg-assistant-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: #f7f7f7;
  color: #111;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.rg-assistant-answer {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,.06);
  display: none;
}

.rg-assistant-answer.is-visible {
  display: block;
}

.rg-assistant-answer__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.rg-assistant-answer__text {
  line-height: 1.6;
  font-size: 14px;
}

.rg-assistant-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

body.rg-chat-open .rg-ai-launcher {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* Mobile */
@media (max-width: 767px) {
  .rg-ai-launcher {
    width: min(250px, calc(100vw - 20px));
    max-width: min(250px, calc(100vw - 20px));
    right: 10px;
    bottom: calc(74px + env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }

  .rg-ai-launcher__inner {
    padding: 10px;
  }

  .rg-ai-launcher__title {
    font-size: 14px;
  }

  .rg-ai-launcher__subtitle {
    font-size: 11px;
    line-height: 1.35;
  }

  .rg-ai-launcher__close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .rg-assistant-overlay {
    justify-content: center;
    align-items: flex-end;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .rg-assistant-panel {
    width: 100%;
    max-width: 300px;
    max-height: 48vh;
    padding: 12px;
    border-radius: 16px;
  }

  .rg-assistant-header h2 {
    font-size: 17px;
  }

  .rg-assistant-header p {
    font-size: 13px;
  }

  .rg-assistant-item {
    padding: 10px 11px;
    font-size: 13px;
  }

  .rg-assistant-close {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .rg-help-center__grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop dock nav */
@media (min-width: 1024px) {
  body.has-desktop-dock .rg-ai-launcher {
    right: 24px;
    bottom: 24px;
  }
}