/* Slide-out AI panel */
#ross-ai-panel.ross-ai-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background: #ffffff;
  box-shadow: -6px 0 20px rgba(0, 0, 0, 0.08);
  transition: right 0.3s ease;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  border-left: 1px solid #eaeaea;
  box-sizing: border-box;
}

/* Open state */
#ross-ai-panel.ross-ai-panel.open {
  right: 0;
}

/* Move site content left when panel is open */
body.ross-ai-open .site,
body.ross-ai-open .site-content,
body.ross-ai-open .wp-site-blocks {
  margin-right: 420px;
  transition: margin-right 0.3s ease;
}

/* Panel header */
.ross-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  padding: 24px 15px 15px 15px;
  border-bottom: 1px solid #eaeaea;
  background: #EBEBEB;
}

.ross-ai-header-content {
  display: flex;
  gap: 12px;
}

.ross-ai-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.ross-ai-header-text {
  display: flex;
  flex-direction: column;
}

.ross-ai-title {
  font-size: 28px;
  font-weight: 4000;
  line-height: 1.3
}

.ross-ai-subtitle {
  font-size: 16px;
  color: #666;
  margin-top: 2px;
  line-height: 1.4;
}

.ross-ai-close {
  position: absolute;
  right: 18px;
  top: 18px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  z-index: 2;
}

/* Inner panel content spacing */
.ross-ai-prompts,
.ross-ai-response,
.ross-ai-form {
  padding-left: 15px;
  padding-right: 15px;
}

/* Response area */
.ross-ai-response {
  flex: 1;
  overflow-y: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  font-family: inherit;
  /* font-size: inherit; */
  font-size: 18px;
  line-height: 1.6;
  padding-left: 15px;
  padding-right: 15px;
}

.ross-ai-response strong {
  font-weight: 700;
}

/* Input area */
.ross-ai-form {
  padding: 12px 15px 18px 15px;
  border-top: none;
  background: #F7F7F7;
}

.ross-ai-input-wrap {
  position: relative;
  width: 100%;
  border: 1px solid #d8d8d8;
  border-radius: 24px;
  background: #fff;
  box-sizing: border-box;
  padding: 12px 48px 12px 14px;
  min-height: 40px;
}

#ross-ai-question {
  width: 100%;
  height: 20px;
  min-height: 20px;
  max-height: 140px;
  resize: none;
  overflow-y: auto;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font-family: inherit;
  /* font-size: inherit; */
  font-size: 18px;
  font-weight: inherit;
  line-height: 20px;
  color: inherit;
  box-sizing: border-box;
  display: block;
}

#ross-ai-question::placeholder {
  color: #8a8a8a;
}

#ross-ai-question:focus::placeholder {
  color: transparent;
}

/* Send button */
.ross-ai-send {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: transparent;
  color: #b8b8b8;
  cursor: default;
  box-shadow: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Icon */
.ross-ai-send i {
  font-size: 14px;
  pointer-events: none;
}

/* Disabled */
.ross-ai-send:disabled {
  color: #b8b8b8;
  cursor: default;
  background-color: transparent;
}

/* Active */
.ross-ai-send.is-active {
  color: #111;
  cursor: pointer;
}

/* Hover when active ONLY */
.ross-ai-send.is-active:hover {
  background-color: rgba(255, 148, 0, 0.35);
  color: #111;
}

/* Loading dots */
.ross-ai-loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* font-size: inherit; */
  font-size: 18px;
  color: #555;
}

.ross-ai-loading-text {
  margin-right: 4px;
}

.ross-ai-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #111;
  opacity: 0.25;
  animation: ross-ai-dot-pulse 1.2s infinite ease-in-out;
}

.ross-ai-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ross-ai-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.ross-ai-dot:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes ross-ai-dot-pulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.2;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Streaming animation */
.ross-ai-response-streaming {
  will-change: contents;
}

.ross-ai-response strong,
.ross-ai-response a {
  transition: opacity 0.15s ease;
}

/* Prompt drawer */
.ross-ai-prompts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 15px 6px 15px;
  border-top: 1px solid #eaeaea;
  background: #F7F7F7;
}

.ross-ai-prompts-main,
.ross-ai-prompts-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ross-ai-prompts-more {
  display: none;
}

.ross-ai-prompts-more.open {
  display: flex;
}

/* Prompt buttons */
.ross-ai-prompts button {
  border: 1px solid #ddd;
  background: #FFF;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: #333;
}

/* More / Less questions toggle */
.ross-ai-more-toggle {
  border: none;
  background: transparent;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #666;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Prevent theme from underlining the whole link */
.ross-ai-more-toggle,
.ross-ai-more-toggle:hover,
.ross-ai-more-toggle:focus,
.ross-ai-more-toggle:active {
  text-decoration: none !important;
}

/* Only underline the text on hover */
.ross-ai-more-toggle:hover .ross-ai-more-toggle-text {
  text-decoration: underline;
}

/* No underline by default */
.ross-ai-more-toggle-text {
  text-decoration: none;
}

/* Hover */
.ross-ai-more-toggle:hover {
  opacity: 1;
  color: #111;
}

.ross-ai-more-toggle:hover .ross-ai-more-toggle-text {
  text-decoration: underline;
}

/* Chevron */
.ross-ai-more-toggle i {
  font-size: 12px;
  transition: transform 0.2s ease;
  position: relative;
  top: 1px;
}

/* Rotate chevron */
.ross-ai-more-toggle.is-open i {
  transform: rotate(180deg);
}

/* Mobile */
@media (max-width: 900px) {
  #ross-ai-panel.ross-ai-panel {
    width: 100%;
    right: -100%;
  }

  #ross-ai-panel.ross-ai-panel.open {
    right: 0;
  }

  body.ross-ai-open .site,
  body.ross-ai-open .site-content,
  body.ross-ai-open .wp-site-blocks {
    margin-right: 0;
  }
}

/* Logged-in WordPress admin bar */
body.admin-bar #ross-ai-panel.ross-ai-panel {
  top: 32px;
  height: calc(100vh - 32px);
}

@media (max-width: 782px) {
  body.admin-bar #ross-ai-panel.ross-ai-panel {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

/* Conversation spacing */
.ross-ai-message {
  margin-bottom: 18px;
}

/* Ross label */
.ross-ai-message-label {
  font-size: 12px;
  color: #8a8a8a;
  margin-bottom: 4px;
  font-weight: 500;
}

/* AI response text (no bubble) */
.ross-ai-response-text {
  line-height: 1.6;
  font-size: 18px;
}

/* User message bubble */
.ross-ai-message-user {
  display: flex;
  justify-content: flex-end;
}

.ross-ai-bubble-user {
  border: 2px solid #FF9400;
  background: #ffffff;
  border-radius: 25px 5px 25px 25px;
  padding: 12px 14px;
  max-width: 85%;
  color: #858585;
}

.ross-ai-response-text p {
    margin-top: 0px;
}

/* New Chat button */
.ross-ai-new-chat {
  border: 1px solid #e0e0e0;
  background: #f7f7f7;
  color: #444;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 15px;
}

.ross-ai-new-chat:hover {
  background: #eeeeee;
  border-color: #d5d5d5;
  color: #111;
}

.ross-ai-new-chat:active {
  background: #eaeaea;
  transform: translateY(1px);
}

/* AI URL Styles */
.ross-project-link {
  font-weight: 700;
  text-decoration: underline;
  color: inherit;
}

.ross-project-link:hover {
  text-decoration: none;
}

.fa-solid {
    color: #333;
}