/*
 * Styles for the Rockstar Music chat widget
 *
 * These rules position the launcher button in the bottom right corner
 * of the viewport and style the chat panel.  Colours are chosen to be
 * high contrast and brand-friendly; adjust to match your palette as
 * needed.  The chat panel uses flexbox to lay out messages and the
 * input area, and hides offscreen until activated.
 */

/* Launcher button */
#rockstar-chat-launcher {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: 50%;
  border: none;
  background-color: #f05b4e; /* primary brand colour */
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 2147483647; /* ensure on top of most elements */
  transition: background-color 0.2s ease;
}

#rockstar-chat-launcher:hover {
  background-color: #c8473b; /* darker on hover */
}

#rockstar-chat-launcher img {
  width: 60%;
  height: 60%;
  pointer-events: none;
}

/* Chat panel container */
#rockstar-chat-panel {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-width: 100%;
  height: 480px;
  max-height: calc(100vh - 140px);
  background-color: #ffffff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483646;
}

#rockstar-chat-panel.open {
  display: flex;
}

/* Header */
.rockstar-chat-header {
  /* Updated to pastel orange to match pricing table */
  background-color: #f5a26b;
  color: #ffffff;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.rockstar-chat-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* Body */
.rockstar-chat-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #fafafa;
  min-height: 0; /* allows inner elements to scroll */
}

/* Messages */
.rockstar-chat-messages {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.4;
}

.rockstar-chat-message {
  margin-bottom: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  max-width: 80%;
  word-wrap: break-word;
}

.rockstar-chat-message.user {
  background-color: #e7ffe7;
  align-self: flex-end;
  color: #333333;
}

.rockstar-chat-message.bot {
  background-color: #f0f0f0;
  align-self: flex-start;
  color: #333333;
}

/* Input area */
.rockstar-chat-input-area {
  display: flex;
  padding: 8px;
  border-top: 1px solid #ddd;
  background-color: #ffffff;
}

.rockstar-chat-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.rockstar-chat-input:focus {
  outline: none;
  border-color: #f5a26b;
  box-shadow: 0 0 0 2px rgba(245, 162, 107, 0.2);
}

.rockstar-chat-send {
  margin-left: 6px;
  padding: 8px 12px;
  background-color: #f05b4e;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.rockstar-chat-send:hover {
  background-color: #c8473b;
}

/* CTA button for booking a free trial */
.rockstar-chat-cta {
  margin: 8px;
  padding: 8px 12px;
  background-color: #f05b4e;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  width: calc(100% - 16px);
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.rockstar-chat-cta:hover {
  background-color: #c8473b;
}

/* Lead form */
.rockstar-lead-form {
  padding: 12px;
  overflow-y: auto;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* allow form to consume vertical space and scroll */
  height: 100%;     /* fills available space */
  overflow-y: auto; /* enables scrolling */
}

.rockstar-lead-instructions {
  margin-bottom: 12px;
  font-weight: bold;
}

.rockstar-lead-field {
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
}

.rockstar-lead-field label {
  margin-bottom: 4px;
  font-size: 13px;
}

.rockstar-lead-field input,
.rockstar-lead-field select {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.rockstar-lead-submit {
  margin-top: 12px;
  padding: 8px 12px;
  background-color: #f05b4e;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  align-self: flex-start;
  transition: background-color 0.2s ease;
}

.rockstar-lead-submit:hover {
  background-color: #c8473b;
}

.rockstar-lead-thanks,
.rockstar-lead-error {
  margin-top: 20px;
  font-size: 14px;
}

/* Quick start options */
.rockstar-chat-quick-options {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rockstar-chat-quick-option {
  padding: 6px 10px;
  background-color: #00c5bf; /* brand teal for option buttons */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  flex-grow: 1;
  text-align: center;
  transition: background-color 0.2s ease;
}

.rockstar-chat-quick-option:hover {
  background-color: #00b5ad;
}
