.ally-prompt-library-button {
  border: 1px solid #c7d2fe;
  background: #ffffff;
  color: #1f3a8a;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 8px;
}

.ally-prompt-library-button:hover {
  background: #eef2ff;
}

.ally-prompt-library-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ally-prompt-library-panel {
  width: min(980px, 92vw);
  max-height: 86vh;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.ally-prompt-library-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.ally-prompt-library-header h2 {
  margin: 0;
  font-size: 20px;
  color: #111827;
}

#promptLibraryCloseButton {
  border: none;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  color: #4b5563;
}

.ally-prompt-library-subtitle {
  padding: 10px 22px;
  color: #4b5563;
  font-size: 14px;
}

.ally-prompt-library-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 22px 14px 22px;
  border-bottom: 1px solid #e5e7eb;
}

.ally-prompt-category-pill {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
}

.ally-prompt-category-pill.active {
  background: #1f3a8a;
  color: #ffffff;
  border-color: #1f3a8a;
}

.ally-prompt-library-cards {
  padding: 18px 22px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.ally-prompt-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
}

.ally-prompt-card-title {
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.ally-prompt-card-description {
  color: #4b5563;
  font-size: 13px;
  margin-bottom: 10px;
}

.ally-prompt-card-meta {
  color: #6b7280;
  font-size: 12px;
  margin-bottom: 12px;
}

.ally-prompt-card-button {
  background: #1f3a8a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 600;
}

.ally-prompt-card-button:hover {
  background: #172554;
}
/* Prompt Library + Upload button layout cleanup */
#promptLibraryButton {
  width: auto !important;
  min-width: 130px !important;
  max-width: 160px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  margin-right: 12px !important;
}

#largeFileUploadButton,
#uploadFilesButton,
button[id*="Upload"],
button[id*="upload"] {
  width: auto !important;
  min-width: 140px !important;
  max-width: 180px !important;
  height: 36px !important;
  flex: 0 0 auto !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
  white-space: nowrap !important;
}

/* Prevent the upload row from stretching one button across the full chat width */
.upload-row,
.upload-bar,
.upload-controls,
.file-upload-row,
.file-upload-controls {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  justify-content: flex-start !important;
}
/* Ally Prompt Library rollout color cleanup */
.ally-prompt-category-pill.active,
.ally-prompt-card-button {
  background: rgb(126, 103, 139) !important;
  border-color: rgb(126, 103, 139) !important;
  color: #ffffff !important;
}

.ally-prompt-card-button:hover,
.ally-prompt-category-pill.active:hover {
  background: rgb(105, 82, 119) !important;
  border-color: rgb(105, 82, 119) !important;
}

.ally-prompt-library-button {
  color: rgb(126, 103, 139) !important;
  border-color: rgb(126, 103, 139) !important;
}

.ally-prompt-library-button:hover {
  background: rgba(126, 103, 139, 0.10) !important;
}