/* Container */
.container {
  margin: 1.5rem 0;
}

/* Header */
.header {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 0.75rem;
}

.clientLabel {
  display: flex;
  align-items: center;
  padding: 0.625rem 1rem;
  background: var(--ifm-background-surface-color);
  border: 1px solid var(--ifm-color-emphasis-200);
  border-right: none;
  border-radius: 6px 0 0 6px;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.5;
}

/* Dropdown */
.dropdownWrapper {
  position: relative;
}

.dropdownTrigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--ifm-color-emphasis-100);
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ifm-font-color-base);
  line-height: 1.5;
}

.dropdownTrigger:hover {
  background: var(--ifm-color-emphasis-200);
}

.dropdownTriggerOpen {
  background: var(--ifm-color-emphasis-200);
  border-color: var(--ifm-color-emphasis-300);
}

.triggerIcon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  cursor: default !important;
  mix-blend-mode: normal;
}

.triggerText {
  min-width: 80px;
}

.chevron {
  transition: transform 0.2s ease;
  color: var(--ifm-color-emphasis-600);
}

.chevronOpen {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: dropdownFadeIn 0.15s ease;
}

[data-theme='dark'] .dropdown {
  background: #1e1e1e;
}

/* Backdrop overlay when dropdown is open */
.dropdownBackdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.05);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.dropdownBackdropActive {
  opacity: 1;
  pointer-events: auto;
}

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

/* Search */
.searchWrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.searchIcon {
  color: var(--ifm-color-emphasis-500);
  flex-shrink: 0;
}

.searchInput {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--ifm-font-color-base);
  outline: none;
}

.searchInput::placeholder {
  color: var(--ifm-color-emphasis-500);
}

/* Dropdown List */
.dropdownList {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.375rem;
}

.dropdownItem {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s ease;
  text-align: left;
  font-size: 0.875rem;
  color: var(--ifm-font-color-base);
}

.dropdownItem:hover {
  background: var(--ifm-color-emphasis-100);
}

.dropdownItemSelected {
  background: var(--ifm-color-emphasis-100);
}

.itemIcon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  cursor: default !important;
  mix-blend-mode: normal;
}

.itemName {
  flex: 1;
}

.checkIcon {
  color: var(--ifm-color-primary);
}

.noResults {
  padding: 1rem;
  text-align: center;
  color: var(--ifm-color-emphasis-600);
  font-size: 0.875rem;
}

/* Description */
.description {
  color: var(--ifm-color-emphasis-700);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

/* Card */
.card {
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 8px;
  overflow: hidden;
}

.cardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.cardTitle {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ifm-heading-color);
  flex: 1;
}

.cardToggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 6px;
  color: var(--ifm-color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.cardToggle:hover {
  background: var(--ifm-color-emphasis-100);
  border-color: var(--ifm-color-primary);
  color: var(--ifm-color-primary-dark);
}

.cardChevron {
  transition: transform 0.2s ease;
  color: var(--ifm-color-primary);
}

.cardChevronOpen {
  transform: rotate(180deg);
}

.cardContent {
  /* Content wrapper for step 1 */
}

/* Template Hint */
.templateHint {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-800);
  line-height: 1.6;
}

.templateLink {
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--ifm-color-primary);
  text-decoration: none;
  font-weight: 500;
}

.templateLink:hover {
  text-decoration: underline;
}

/* One-click Install */
.oneClickInstall {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.oneClickLabel {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  font-weight: 500;
}

.oneClickButton {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.oneClickButton:hover {
  opacity: 0.8;
  text-decoration: none;
}

.oneClickImage {
  height: 40px;
  display: block;
}

/* Custom One-click Button */
.customOneClickButton {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--ifm-color-emphasis-100);
  color: var(--ifm-font-color-base);
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid var(--ifm-color-emphasis-300);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  text-decoration: none;
}

.customOneClickButton:hover {
  background: var(--ifm-color-emphasis-200);
  border-color: var(--ifm-color-emphasis-400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--ifm-font-color-base);
}

.customOneClickButton:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.customButtonIcon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  cursor: default !important;
  flex-shrink: 0;
}

.customButtonText {
  line-height: 1.5;
  white-space: nowrap;
}

/* Install Command Section */
.installCommandSection {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.installCommandBlock {
  margin-bottom: 1rem;
}

.installCommandBlock:last-child {
  margin-bottom: 0;
}

.installCommandLabel {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
}

.installCommandText {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  line-height: 1.6;
}

/* CLI Section */
.cliSection {
  margin: 0;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.cliLabel {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  font-weight: 500;
}

.cliCommandBlock {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--ifm-color-emphasis-100);
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.cliCommandText {
  flex: 1;
  font-family: var(--ifm-font-family-monospace);
  font-size: 0.8125rem;
  color: var(--ifm-font-color-base);
  word-break: break-all;
}

.copyCliButton {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: transparent;
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 4px;
  cursor: pointer;
  color: var(--ifm-color-emphasis-600);
  transition: all 0.15s ease;
}

.copyCliButton:hover {
  background: var(--ifm-color-emphasis-200);
  border-color: var(--ifm-color-primary);
  color: var(--ifm-color-emphasis-900);
}

.alternativeConfig {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-600);
  font-style: italic;
}

.orManualConfig {
  margin: 0;
  padding: 1rem 1.25rem 0.5rem;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
  font-weight: 500;
}

.configHint {
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
}

.inlineCode {
  padding: 0.2rem 0.4rem;
  background: var(--ifm-color-emphasis-100);
  border-radius: 4px;
  font-family: var(--ifm-font-family-monospace);
  font-size: 0.8125rem;
  color: var(--ifm-color-emphasis-800);
}

/* Code Block */
.codeBlock {
  margin: 0 1.25rem 1rem;
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 6px;
  overflow: hidden;
  background: #1e1e1e;
}

[data-theme='light'] .codeBlock {
  background: #fafafa;
}

.codeHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme='light'] .codeHeader {
  background: rgba(0, 0, 0, 0.03);
  border-bottom-color: var(--ifm-color-emphasis-200);
}

.codeLanguage {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

[data-theme='light'] .codeLanguage {
  color: var(--ifm-color-emphasis-600);
}

.copyCodeButton {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.15s ease;
}

[data-theme='light'] .copyCodeButton {
  color: var(--ifm-color-emphasis-600);
}

.copyCodeButton:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

[data-theme='light'] .copyCodeButton:hover {
  background: var(--ifm-color-emphasis-200);
  color: var(--ifm-color-emphasis-900);
}

.codeContent {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Fira Mono', 'Droid Sans Mono', 'Source Code Pro', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* Code Lines */
.codeLine {
  display: flex;
  padding: 0 0.75rem;
  min-height: 1.6em;
}

.codeLine:first-child {
  padding-top: 0.75rem;
}

.codeLine:last-child {
  padding-bottom: 0.75rem;
}

.lineNumber {
  display: inline-block;
  width: 2rem;
  padding-right: 1rem;
  text-align: right;
  color: rgba(255, 255, 255, 0.3);
  user-select: none;
  flex-shrink: 0;
}

[data-theme='light'] .lineNumber {
  color: var(--ifm-color-emphasis-400);
}

.lineContent {
  flex: 1;
  color: #d4d4d4;
}

[data-theme='light'] .lineContent {
  color: #383a42;
}

/* Syntax Highlighting */
.jsonKey {
  color: #9cdcfe;
}

[data-theme='light'] .jsonKey {
  color: #e45649;
}

.jsonString {
  color: #ce9178;
}

[data-theme='light'] .jsonString {
  color: #50a14f;
}

.jsonBracket {
  color: #d4d4d4;
}

[data-theme='light'] .jsonBracket {
  color: #383a42;
}

/* Help Section */
/* Collapsible Section */
.collapsibleSection {
  margin-top: 0.75rem;
}

.collapsibleToggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--ifm-color-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.collapsibleToggle:hover {
  background: var(--ifm-color-emphasis-100);
  color: var(--ifm-color-primary-dark);
}

.collapsibleChevron {
  transition: transform 0.2s ease;
  color: var(--ifm-color-primary);
}

.collapsibleChevronOpen {
  transform: rotate(180deg);
}

.collapsibleContent {
  padding-top: 0.5rem;
}

.helpSection {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--ifm-color-emphasis-200);
  background: var(--ifm-background-surface-color);
}

.helpText {
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
}

.helpLink {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--ifm-color-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.helpLink:hover {
  color: var(--ifm-color-primary-dark);
  text-decoration: none;
}

.helpLink svg {
  transition: transform 0.15s ease;
}

.helpLink:hover svg {
  transform: translate(1px, -1px);
}

/* Verify Card */
.verifyCard {
  margin-top: 1.5rem;
  border: 1px solid var(--ifm-color-emphasis-200);
  border-radius: 8px;
  overflow: hidden;
}

.verifyTitle {
  margin: 0;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ifm-heading-color);
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.verifyDescription {
  margin: 0;
  padding: 1rem 1.25rem 0.75rem;
  font-size: 0.875rem;
  color: var(--ifm-color-emphasis-700);
}

/* Prompt Wrapper */
.promptWrapper {
  margin: 0 1.25rem 1rem;
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 6px;
  overflow: hidden;
}

.promptLabel {
  padding: 0.5rem 0.75rem;
  background: var(--ifm-color-emphasis-100);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ifm-color-emphasis-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.promptContent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--ifm-background-color);
  gap: 0.75rem;
  border-top: 1px solid var(--ifm-color-emphasis-200);
}

.promptContent:first-of-type {
  border-top: none;
}

.promptActions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.openIDEButton {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 6px;
  color: var(--ifm-font-color-base);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.openIDEButton:hover {
  background: var(--ifm-color-emphasis-100);
  border-color: var(--ifm-color-primary);
}

.openIDEButton:active {
  transform: scale(0.95);
}

.openIDEIcon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
}

.promptText {
  flex: 1;
  display: block;
  font-family: var(--ifm-font-family-monospace);
  font-size: 0.875rem;
  color: var(--ifm-font-color-base);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  line-height: 1.5;
  margin: 0;
  padding: 0.5rem;
  box-sizing: border-box;
}

/* Second row prompt text - limit max height */
.promptContent:not(:first-of-type) .promptText {
  max-height: 6rem;
  overflow-y: auto;
}

.copyPromptButton {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 4px;
  background: var(--ifm-background-color);
  color: var(--ifm-font-color-base);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.875rem;
  line-height: 1;
}

.copyPromptButton:hover {
  background: var(--ifm-color-emphasis-100);
  border-color: var(--ifm-color-primary);
}

.refreshPromptButton {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-height: 2.75rem;
  padding: 0;
  background: transparent;
  border: none;
  border-right: 1px solid var(--ifm-color-emphasis-300);
  color: var(--ifm-color-emphasis-600);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  line-height: 1;
}

.refreshPromptButton:hover {
  background: var(--ifm-color-emphasis-100);
  color: var(--ifm-color-emphasis-900);
}

.refreshPromptButton:active {
  transform: scale(0.95);
}

.refreshPromptButton:active svg {
  animation: rotate 0.3s ease;
}

.refreshPromptButton svg {
  flex-shrink: 0;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.copyPromptButton:active {
  transform: scale(0.95);
}

/* Responsive */
@media (max-width: 640px) {
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .clientLabel {
    border-radius: 6px;
    border-right: 1px solid var(--ifm-color-emphasis-200);
    text-align: center;
  }

  .dropdownTrigger {
    border-radius: 6px;
    justify-content: center;
  }

  .dropdown {
    width: 100%;
    left: 0;
    right: 0;
  }

  .card {
    border-radius: 6px;
  }

  .codeBlock {
    margin: 0 0.75rem 0.75rem;
    font-size: 0.75rem;
  }

  .lineNumber {
    width: 1.5rem;
    padding-right: 0.5rem;
  }

  .oneClickImage {
    height: 32px;
  }

  .cliCommandBlock {
    flex-direction: column;
    align-items: stretch;
  }

  .copyCliButton {
    align-self: flex-end;
  }

  .promptContent {
    flex-direction: column;
    align-items: stretch;
  }

  .promptActions {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .openIDEButton {
    flex: 1;
    justify-content: center;
  }

  .copyPromptButton {
    align-self: flex-end;
  }
}
