/* Brunelly Prompt Tabs - neutral styling (inherits theme fonts/colors) */
.brunelly-pt {
  width: 100%;
  background-color: #1A1A24;
  border: 1px solid #8726C6;
  border-radius: 10px;
  box-sizing: border-box;
  color: #fff;
  font-family: Poppins, sans-serif;
}

.brunelly-pt__inner {
  width: 100%;
}

.brunelly-pt__tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 0px;
  border-radius: 9px 9px 0 0;
  border: 0.5px solid var(--Background-Nutral-Opacity-3, #8726c65e);
  opacity: 0.69;
  padding: 20px;
}

.brunelly-pt__tab {
  appearance: none;
  border: none;
  border-bottom: 4px solid transparent;
  background: transparent !important;
  padding: 0 14px;
  border-radius: 0;
  cursor: pointer;
  color: var(--Text-Nutral-Tertiary, #9E9E9E);
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  text-transform: uppercase;
  transition: border-color .15s ease, color .15s ease;
}

.brunelly-pt__tab:hover {
  color: #ffffff;
}

.brunelly-pt__tab:active {
  transform: scale(0.99);
}

.brunelly-pt__tab.is-active,
.brunelly-pt__tab[aria-selected="true"] {
  border-bottom: 4px solid var(--Text-Brand-Purple-1, #AF6FFF);
  color: #ffffff;
  background: transparent !important;
}

.brunelly-pt__panels {
  width: 100%;
  padding: 20px 20px 0 20px;
}

.brunelly-pt__panel {
  border: none;
  padding: 0;
  position: relative;
  /* Enabled for absolute positioning of children */
}


.brunelly-pt__textarea {
  width: 100%;
  resize: none;
  min-height: 280px;
  border-radius: 8px;
  padding: 16px;
  font-family: Poppins, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  outline: none;
  color: #ffffff;
  border: 0.5px solid var(--Background-Nutral-Opacity-3, #8726C6);
  background: #000;
}

.brunelly-pt__textarea::placeholder {
  color: var(--Text-Nutral-Tertiary, #9E9E9E);
  font-family: Poppins, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
}

.brunelly-pt__textarea:focus {
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* Panel Footer at the bottom of panel */
.brunelly-pt__panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
}

/* Character counter */
.brunelly-pt__char-counter {
  font-family: Poppins, sans-serif;
  font-size: 14px;
  color: var(--Text-Nutral-Tertiary, #9E9E9E);
  font-weight: 400;
  pointer-events: none;
  user-select: none;
  visibility: hidden;
}

/* Create button in panel footer */
.brunelly-pt__panel-footer .brunelly-pt__create {
  margin: 0;
}

.brunelly-pt__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  /* Slightly reduced */
  flex-wrap: wrap;
}

.brunelly-pt__create {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  border-radius: 8px;
  padding: 12px 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  background: linear-gradient(90deg, #B464F1 0%, #B464F1 0.48%, #8B5CF6 100%);
  color: #ffffff;
  transition: transform .05s ease, opacity .2s ease, box-shadow .2s ease;
}

.brunelly-pt__create:hover {
  box-shadow: 0 0 20px rgba(180, 100, 241, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
  opacity: 0.95;
}

.brunelly-pt__create:active {
  transform: scale(0.99);
}

.brunelly-pt__create.is-loading {
  opacity: 0.85;
  cursor: progress;
}

.brunelly-pt__create[disabled],
.brunelly-pt__create.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.brunelly-pt__create-icon {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.brunelly-pt__create.is-loading .brunelly-pt__create-icon {
  display: none;
}

.brunelly-pt__spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 1);
  display: none;
  animation: brunelly-pt-spin 0.8s linear infinite;
}

.brunelly-pt__create.is-loading .brunelly-pt__spinner {
  display: inline-block;
}

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

.brunelly-pt__hint {
  padding: 0 20px;
  margin: 10px 0 20px;
  font-size: 14px;
  color: #ff4d4d;
  font-family: Poppins, sans-serif;
  opacity: 1;
}

.brunelly-pt__hint:empty {
  display: none;
}

@media (max-width: 560px) {
  .brunelly-pt__hint {
    padding: 0 15px;
    font-size: 13px;
  }
}

.brunelly-pt__quick-prompts {
  margin-top: 15px;
  padding: 20px;
  border-top: 0.5px solid var(--Background-Nutral-Opacity-3, #8726c65e);
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.brunelly-pt__quick-title {
  margin: 0;
  color: #BDBDBD;
  font-family: Poppins, sans-serif;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  white-space: nowrap;
}

.brunelly-pt__clear-btn {
  display: none;
  appearance: none;
  background: transparent;
  border: none;
  color: #eeeeee;
  padding: 0 16px;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 40px;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.brunelly-pt__clear-btn.is-active {
  display: inline-block;
}

.brunelly-pt__clear-btn:hover {
  color: #ffffff;
  background: none !important;
  box-shadow: none !important;
}

.brunelly-pt__quick-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.brunelly-pt__quick-group[hidden] {
  display: none;
}

.brunelly-pt__quick-btn {
  appearance: none;
  background: var(--Background-Nutral-Secondary, #1A1A24);
  border: 1px solid #8626c659;
  color: #eeeeee;
  padding: 0 16px;
  border-radius: 13px;
  text-align: center;
  font-family: Poppins, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 40px;
  /* 250% */
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.brunelly-pt__quick-btn.is-selected {
  border-color: #AF6FFF;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(166, 93, 254, 0.4);
}

.brunelly-pt__quick-btn:hover {
  background: #8626c61e;
}

.brunelly-pt__quick-description {
  margin-top: 20px;
  background: rgba(134, 38, 198, 0.05);
  border: 1px solid rgba(134, 38, 198, 0.2);
  border-radius: 12px;
  padding: 10px;
  margin: 5px 20px 20px 20px;
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  animation: brunellyFadeIn 0.3s ease;
}

.brunelly-pt__quick-description[hidden],
.brunelly-pt__quick-description[style*="display: none"] {
  display: none !important;
}

.brunelly-pt__ai-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
}

.brunelly-pt__desc-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #eeeeee;
  font-family: Poppins, sans-serif;
}

@keyframes brunellyFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .brunelly-pt__tabs {
    gap: 5px;
    padding: 15px;
  }

  .brunelly-pt__tab {
    padding: 0 8px;
    font-size: 14px;
    line-height: 40px;
    /* Reduced from default */
  }

  .brunelly-pt__panels {
    padding: 15px;
  }

  .brunelly-pt__textarea {
    min-height: 220px;
    font-size: 14px;
  }

  .brunelly-pt__textarea::placeholder {
    font-size: 14px;
  }

  .brunelly-pt__panel-footer {
    margin-top: 10px;
  }

  .brunelly-pt__char-counter {
    font-size: 13px;
    visibility: hidden;
  }

  .brunelly-pt__panel-footer .brunelly-pt__create {
    padding: 8px 16px;
    font-size: 13px;
  }

  .brunelly-pt__quick-prompts {
    margin-top: 15px;
    padding: 15px;
  }
}