/* Docons Icon Font */
@font-face {
  font-family: docons;
  src:
    url("https://learn.microsoft.com/static/third-party/fonts/docons.woff2")
      format("woff2"),
    url("https://learn.microsoft.com/static/third-party/fonts/docons.woff")
      format("woff"),
    url("https://learn.microsoft.com/static/third-party/fonts/docons.ttf")
      format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Atlas Design System Tokens */
  --body-font:
    "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont,
    Helvetica Neue, Helvetica, Arial, sans-serif;
  --type-ramp-base-font-size: 14px;
  --type-ramp-base-line-height: 20px;

  /* Colors */
  --color-primary: #0078d4;
  --color-primary-hover: #106ebe;
  --color-primary-active: #005a9e;
  --color-text: #323130;
  --color-text-secondary: #605e5c;
  /* Borders */
  --color-border: #c7c7c7;
  --color-border-focus: #0078d4;
  --color-background: #fff;
  --color-background-hover: #f5f5f5;
  --color-error: #d13438;

  /* Gradient Colors */
  --theme-gradient-vivid-start: #7b2cbf;
  --theme-gradient-vivid-end: #e040fb;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;

  /* Border Radius */
  --radius-sm: 2px;
  --radius-md: 4px;
}

body {
  font-family: var(--body-font);
  color: var(--neutral-foreground-rest);
  background-color: var(--neutral-layer-1);
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Prototype Ribbon */
.prototype-ribbon {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
  width: 150px;
  height: 150px;
  pointer-events: none;
}

.prototype-ribbon span {
  position: absolute;
  display: block;
  width: 200px;
  padding: 10px 0;
  background-color: #0078d4;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: rotate(-45deg);
  top: 30px;
  left: -50px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.prototype-ribbon span small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 50px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
}

.microsoft-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
}

.logo-squares {
  display: grid;
  grid-template-columns: 5px 5px;
  grid-template-rows: 5px 5px;
  gap: 1px;
  width: 12px;
  height: 12px;
}

.logo-square {
  width: 5px;
  height: 5px;
}

.logo-square:nth-child(1) {
  background-color: #f25022;
}

.logo-square:nth-child(2) {
  background-color: #7fba00;
}

.logo-square:nth-child(3) {
  background-color: #00a4ef;
}

.logo-square:nth-child(4) {
  background-color: #ffb900;
}

.header nav {
  display: flex;
  gap: 20px;
  flex: 1;
}

.header nav a {
  color: #242424;
  text-decoration: none;
  font-size: 14px;
}

.header nav a:hover {
  text-decoration: underline;
}

.user-name {
  margin-left: auto;
  font-size: 14px;
  color: #242424;
  font-weight: 400;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.search-icon {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0078d4;
}

/* Sub-navigation */
.sub-nav {
  display: flex;
  gap: 30px;
  padding: 15px 40px;
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  align-items: center;
}

.sub-nav a {
  color: #505050;
  text-decoration: none;
  font-size: 13px;
}

.sub-nav a.active {
  font-weight: 400;
  color: #242424;
}

.ask-question-btn {
  margin-left: auto;
}

/* Hero Section */
.hero {
  background: #e8e6df;
  padding: 30px 40px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 240px;
}

.hero-content {
  max-width: 600px;
  flex: 1;
}

.hero-eyebrow {
  display: block;
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #666;
  margin-bottom: 8px;
  font-weight: 400;
}

.hero h1 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #242424;
}

.hero h1::before {
  content: none;
}

.hero p {
  color: #242424;
  line-height: 1.5;
  font-size: 16px;
}

.hero-decoration {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 60%;
  pointer-events: none;
  overflow: hidden;
}

.hero-decoration::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 200px;
  background: linear-gradient(
    to right,
    #e8e6df 0%,
    rgba(232, 230, 223, 0) 100%
  );
  z-index: 2;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

/* Main Content */
.main-content {
  display: flex;
  gap: 40px;
  padding: 40px 40px 60px 40px;
  max-width: 1400px;
  background-color: #fff;
  margin: 0 auto;
  flex: 1;
}

.form-section {
  flex: 1.5;
  max-width: 700px;
  background: white;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  min-width: 0;
}

.tips-section {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 14px;
  margin-top: 24px;
}

.form-group label {
  color: var(--theme-text);
  margin-block-end: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  display: block;
  font-family:
    Segoe UI,
    Segoe UI Variable Text,
    -apple-system,
    BlinkMacSystemFont,
    Helvetica Neue,
    Helvetica,
    Arial,
    sans-serif;
}

.required {
  color: #d13438;
}

.helper-text {
  color: #605e5c;
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

input[type="text"],
select,
textarea {
  appearance: none;
  min-height: 2.25em;
  box-shadow: none;
  vertical-align: top;
  border: 1px solid #c7c7c7;
  border-radius: 0.25rem;
  justify-content: flex-start;
  align-items: center;
  padding-block: calc(0.375em - 1px);
  padding-inline: calc(0.625em - 1px);
  font-size: 14;
  line-height: 1.5;
  display: inline-flex;
  position: relative;
  font-weight: 400;
}

input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #0078d4;
}

textarea {
  min-height: 200px;
  resize: vertical;
}

/* Fluent UI Component Styling */
fluent-text-field,
fluent-text-area,
fluent-select {
  width: 100%;
  font-family: var(--body-font);
}

fluent-text-field::part(control),
fluent-text-area::part(control),
fluent-select::part(control) {
  font-size: 14px;
  font-family: var(--body-font);
  color: #242424;
  font-weight: 400;
}

fluent-text-area::part(control) {
  min-height: 300px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.5;
  padding: 12px;
}

/* Prevent red text in required fields */
fluent-text-area:invalid::part(control),
fluent-text-field:invalid::part(control) {
  color: #242424;
}

fluent-button {
  font-family: var(--body-font);
}

.learn-span {
  font-weight: 400;
  font-size: 15px;
}

.tip-margin {
  margin-top: 10px;
}

.toolbar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background-color: #fafafa;
  border: 1px solid #d1d1d1;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
}

.toolbar + fluent-text-area {
  margin-top: -1px;
  display: block;
}

.toolbar + fluent-text-area::part(root) {
  border-radius: 0 0 2px 2px;
  margin: 0;
}

.toolbar + fluent-text-area::part(control) {
  border-radius: 0 0 2px 2px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 8px;
}

.toolbar button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 7px;
  font-size: 13px;
  color: #242424;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar button svg {
  width: 16px;
  height: 16px;
  display: block;
}

.toolbar button:hover {
  background-color: #e1e1e1;
}

.toolbar-divider {
  width: 1px;
  height: 18px;
  background-color: #d1d1d1;
}

.markdown-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #505050;
}

.submit-btn {
  margin-top: 0;
}

/* Tips Section */
.tips-section {
  background-color: transparent;
}

.tips-section h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #242424;
  margin-bottom: 1rem;
  line-height: 1.125;
  margin-bottom: 1.5rem;
}

hr {
  border: none;
  border-top: 1px solid #d1d1d1;
  margin: 20px 0;
}

.tips-section hr {
  border: none;
  border-top: 1px solid #d1d1d1;
  margin: 0 0 1.5rem 0;
}

.tip-box {
  margin-bottom: 24px;
}

.tip-box h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #242424;
}

.tip-box p {
  font-size: 12px;
  line-height: 1.6;
  color: #505050;
}

.tip-box a {
  color: #0078d4;
  text-decoration: none;
}

.tip-box a:hover {
  text-decoration: underline;
}

.tip-box ul {
  margin: 8px 0;
  padding-left: 20px;
  font-size: 12px;
  color: #505050;
}

.tip-box li {
  margin-bottom: 4px;
}

/* Generate Tags Button */
.generate-tags-btn {
  margin-top: 0;
}

.generate-tags-btn svg {
  width: 20px;
  height: 20px;
}

.generate-tags-btn.error {
  --neutral-stroke-rest: #d13438 !important;
  --neutral-stroke-hover: #d13438 !important;
  --neutral-stroke-active: #d13438 !important;
}

.generate-icon {
  width: 20px;
  height: 20px;
}

/* Enable Spinner */
.enable-spinner-container {
  display: none;
  margin-top: 0;
  padding: 12px 16px;
  background-color: #fff;
  border: 1px solid #0078d4;
  border-radius: 4px;
}

.enable-spinner-container.show {
  display: block;
}

/* Submit Spinner */
.submit-spinner-container {
  display: none;
  margin-top: 24px;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #0078d4;
  border-radius: 4px;
}

.submit-spinner-container.show {
  display: block;
}

/* Loading Spinner */
.loading-container {
  display: none;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #c744cc;
  border: 2px solid color(display-p3 0.7216 0.302 0.7765);
  background: #fff;
  background: color(display-p3 1 1 1);
  box-shadow:
    0 2px 4px 0 rgba(0, 0, 0, 0.14),
    0 0 2px 0 rgba(0, 0, 0, 0.12);
  box-shadow:
    0 2px 4px 0 color(display-p3 0 0 0 / 0.14),
    0 0 2px 0 color(display-p3 0 0 0 / 0.12);
}

.loading-container.show {
  display: block;
}

.spinner-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

fluent-progress-ring {
  width: 24px;
  height: 24px;
  --accent-fill-rest: #0078d4;
}

/* Ensure spinner animation */
fluent-progress-ring::part(progress) {
  animation: spin 1s linear infinite;
}

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

.loading-text {
  font-size: 14px;
  color: #242424;
  font-weight: 400;
}

.progress-bar {
  width: 100%;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #0078d4;
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* Generated Tags Display */
.tags-display {
  display: none;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 24px;
}

.tags-display.show {
  display: flex;
}

/* AI Disclaimer */
.ai-disclaimer {
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  color: #616161;
  font-style: normal;
}

/* Previously Selected Tags Section */
.previously-selected-tags {
  margin-top: 12px;
  margin-bottom: 0;
}

#previous-tags-row {
  pointer-events: none;
  cursor: default;
  margin-bottom: 0;
}

.tag-row {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 6px 12px;
  margin-bottom: 0;
  margin-right: 0;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.tag-row:hover {
  background-color: #f5f5f5;
}

.tag-row.selected {
  background-color: #e8e8e8;
}

.tag-row:last-child {
  margin-bottom: 0;
}

.tag-selection-message {
  display: none;
  margin-top: 0;
  margin-bottom: 0 !important;
  font-size: 12px;
  color: #757575;
  font-weight: 400;
}

.tag-selection-message.show {
  display: block;
}

/* Tag item styles - text inside the pill */
.tag-item {
  display: inline;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: #242424;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: none;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

.tag-item:not(:last-child)::after {
  content: "|";
  display: inline;
  margin-left: 10px;
  margin-right: 10px;
  font-size: 14px;
  font-weight: 300;
  color: #c7c7c7;
  background: transparent;
  padding: 0;
}

.tag-row:hover .tag-item {
  background: transparent;
}

.tag-row.selected .tag-item {
  background: transparent;
}

/* Disabled Generate Tags Button */
.generate-tags-btn:disabled {
  --neutral-foreground-rest: var(--neutral-foreground-disabled);
  --neutral-stroke-rest: var(--neutral-stroke-disabled);
  cursor: not-allowed;
}

/* Autosave message styling */
.autosave-message {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #107c10;
  font-weight: 400;
}

.autosave-message.show {
  display: flex;
}

.autosave-message svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Error message styling */
.error-message {
  color: #d13438;
  font-size: 11px;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

/* Regenerate hint message */
.regenerate-hint {
  display: none;
  margin-top: 8px;
  font-size: 12px;
  color: #605e5c;
  line-height: 1.5;
}

.regenerate-hint.show {
  display: block;
}

/* Refinement Info Message */
.refinement-info-message {
  display: none;
  flex-direction: row;
  align-items: flex-start;
  padding: 16px;
  gap: 16px;
  background: #d7eaf8;
  border-radius: 4px;
  margin: 0 40px 20px 40px;
  font-size: 13px;
  color: #323130;
  line-height: 20px;
}

.refinement-info-message.show {
  display: flex;
}

.refinement-info-message .info-icon {
  flex-shrink: 0;
  color: #0078d4;
  margin-top: 2px;
}

.refinement-info-message span {
  flex: 1;
}

fluent-text-field.error::part(control),
fluent-text-area.error::part(control) {
  border: 2px solid #d13438 !important;
  border-radius: 2px;
}

/* Footer */
.footer {
  background-color: #f5f5f5;
  padding: 20px 40px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #505050;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
  .main-content {
    gap: 40px;
  }

  .form-section {
    max-width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .header {
    padding: 0 15px;
  }

  .header nav {
    gap: 15px;
  }

  .header nav a {
    font-size: 13px;
  }

  .sub-nav {
    padding: 12px 15px;
    gap: 20px;
    flex-wrap: wrap;
  }

  .sub-nav a {
    font-size: 12px;
  }

  .ask-question-btn {
    width: 100%;
    margin-top: 10px;
  }

  .hero {
    padding: 25px 15px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero-decoration {
    right: 10px;
    width: 150px;
    height: 90px;
  }

  .main-content {
    flex-direction: column;
    padding: 20px 15px 40px 15px;
    gap: 30px;
  }

  .form-section {
    padding: 20px;
    max-width: 100%;
    width: 100%;
  }

  .tips-section {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .toolbar {
    gap: 6px;
    padding: 6px;
  }

  .toolbar button {
    padding: 3px 5px;
    font-size: 12px;
  }

  .markdown-toggle {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
    margin-top: 5px;
  }

  .footer {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    flex-direction: column;
    gap: 10px;
  }

  .footer-right {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
  }
}

@media screen and (max-width: 480px) {
  .microsoft-logo span {
    display: none;
  }

  .header nav a:not(:first-child):not(:nth-child(3)) {
    display: none;
  }

  .hero h1 {
    font-size: 20px;
  }

  .hero h1::before {
    font-size: 9px;
  }

  .hero p {
    font-size: 13px;
  }

  .hero-decoration {
    display: none;
  }

  .form-section {
    padding: 15px;
  }

  .form-group label {
    font-size: 12px;
  }

  .helper-text {
    font-size: 12px;
  }

  .toolbar {
    gap: 4px;
    padding: 5px;
  }

  .toolbar button {
    padding: 2px 4px;
    font-size: 11px;
  }

  .toolbar-divider {
    display: none;
  }

  .markdown-toggle span {
    font-size: 11px;
  }

  .tips-section h2 {
    font-size: 14px;
  }

  .tip-box h3 {
    font-size: 12px;
  }

  .tip-box p {
    font-size: 12px;
  }

  .footer {
    font-size: 11px;
  }

  .footer-right a {
    font-size: 10px;
  }
}

/* Question Result Page Styles */
.question-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
}

.question-header {
  margin-bottom: 24px;
}

.question-title {
  font-size: 24px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 16px;
  line-height: 1.3;
}

.question-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #605e5c;
  margin-bottom: 8px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #0078d4;
}

.question-body {
  margin-bottom: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #e0e0e0;
}

.question-text {
  font-size: 14px;
  line-height: 1.6;
  color: #323130;
  margin-bottom: 20px;
}

.question-tags {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 0;
  margin-right: 0;
  background-color: #ffffff;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.tag-badge {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 12px;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  margin-right: 8px;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  font-weight: 400;
}

.tag-badge:not(:last-child)::after {
  content: "→";
  display: inline-block;
  margin-left: 12px;
  font-size: 14px;
  color: #616161;
}

.question-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: none;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 13px;
  color: #323130;
  cursor: pointer;
}

.action-btn:hover {
  background-color: #f5f5f5;
}

.answer-section {
  margin-top: 32px;
}

.answer-header {
  font-size: 18px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 16px;
}

.answer-box {
  background-color: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 16px;
}

.answer-toolbar {
  display: flex;
  gap: 8px;
  padding: 8px;
  background-color: #fff;
  border: 1px solid #d1d1d1;
  border-bottom: none;
  border-radius: 2px 2px 0 0;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 0;
}

.answer-textarea {
  width: 100%;
  min-height: 200px;
  padding: 12px;
  border: 1px solid #d1d1d1;
  border-top: none;
  border-radius: 0 0 2px 2px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 14px;
  resize: vertical;
}

.answer-textarea:focus {
  outline: none;
  border-color: #0078d4;
}

.post-answer-btn {
  margin-top: 12px;
}

.sidebar {
  position: sticky;
  top: 20px;
  background: #fafafa;
  padding: 20px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

.sidebar h3 {
  font-size: 14px;
  font-weight: 600;
  color: #323130;
  margin-bottom: 12px;
}

.content-wrapper {
  display: flex;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px;
}

.main-question {
  flex: 1;
  min-width: 0;
}

.sidebar-container {
  width: 300px;
  flex-shrink: 0;
}

/* Atlas Button Styles */
button {
  font-family: var(--body-font);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 7px 12px;
  line-height: 20px;
}

/* Primary/Accent Button (Ask question, Submit) */
.ask-question-btn,
.submit-btn,
.post-answer-btn {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.ask-question-btn:hover,
.submit-btn:hover,
.post-answer-btn:hover {
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.ask-question-btn:active,
.submit-btn:active,
.post-answer-btn:active {
  background-color: var(--color-primary-active);
  border-color: var(--color-primary-active);
}

/* Disabled Submit Button */
.submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Select tag message (shown when submit is disabled) */
.select-tag-message {
  color: #616161;
  font-size: 12px;
  margin-top: 8px;
  display: block;
}

/* Secondary/Outline Button (Generate tags, Follow question, Tag manually) */
.generate-tags-btn,
.follow-question-btn,
.tag-manually-btn {
  background-color: #fff;
  border-color: var(--color-border);
  color: var(--color-text);
}

.reset-manual-tags-btn {
  background-color: #fff;
  border-color: var(--color-border);
  color: var(--color-text);
}

.reset-button-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.docon {
  font-family: docons;
  font-size: inherit;
  speak: none;
  font-variant: normal;
  text-transform: none;
  text-align: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: ltr;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
  display: inline-block;
}

.docon-sparkle::before {
  content: "\F4B3";
}

.gradient-text-vivid {
  -webkit-background-clip: text;
  background-clip: text;
  background-color: var(--theme-gradient-vivid-start);
  background-image: linear-gradient(
    90deg,
    var(--theme-gradient-vivid-start),
    var(--theme-gradient-vivid-end)
  );
  color: #0000;
  -webkit-text-fill-color: transparent;
  line-height: 1.4;
}

.generate-tags-btn:hover,
.follow-question-btn:hover,
.tag-manually-btn:hover,
.reset-manual-tags-btn:hover {
  background-color: var(--color-background-hover);
  border-color: var(--color-text-secondary);
}

.generate-tags-btn:active,
.follow-question-btn:active,
.tag-manually-btn:active,
.reset-manual-tags-btn:active {
  background-color: #ebebeb;
  border-color: var(--color-text);
}

.tags-buttons-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.manual-tag-selection {
  margin-top: 12px;
}

.manual-tag-selection label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #242424;
}

.tag-dropdown {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  line-height: 20px;
  border: 1px solid #8a8886;
  border-radius: 2px;
  background-color: #fff;
  color: #323130;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23605e5c' d='M12.5 5.5l-4.5 4.5-4.5-4.5L2 7l6 6 6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
}

.tag-dropdown:hover {
  border-color: #323130;
}

.tag-dropdown:focus {
  outline: none;
  border-color: #0078d4;
  border-width: 2px;
}

.tag-dropdown.error {
  border-color: var(--color-error);
}

.tag-dropdown.error:focus {
  border-color: var(--color-error);
}

.fluent-icon {
  font-size: 20px;
  line-height: 1;
  width: 20px;
  height: 20px;
  display: inline-block;
}

.fluent-tag-20-regular::before {
  content: "\f6da";
}

.generate-tags-btn.error {
  border-color: var(--color-error);
  border-width: 2px;
}

.generate-tags-btn:disabled,
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.follow-question-btn {
  width: 100%;
  margin-top: 12px;
}

/* Form Input Styles */
.form-input,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--body-font);
  font-size: 14px;
  color: var(--color-text);
  line-height: 20px;
  background-color: var(--color-surface);
  transition:
    border-color 0.1s ease,
    box-shadow 0.1s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 1px var(--color-border-focus);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--color-error);
}

.form-textarea {
  resize: vertical;
  min-height: 200px;
}

/* Markdown Toggle Switch */
.markdown-toggle-switch {
  width: 36px;
  height: 20px;
  appearance: none;
  background-color: #e0e0e0;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s;
}

.markdown-toggle-switch:checked {
  background-color: var(--color-primary);
}

.markdown-toggle-switch::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.markdown-toggle-switch:checked::before {
  transform: translateX(16px);
}

/* Submit buttons container */
.submit-buttons-container {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

/* Discard draft button */
.discard-draft-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  background-color: transparent;
  border: 1px solid #8a8886;
  border-radius: var(--radius-sm);
  color: #323130;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  transition: all 0.1s ease;
  margin: 0;
}

.discard-draft-btn:hover {
  background-color: #f3f2f1;
  border-color: #323130;
}

.discard-draft-btn svg {
  flex-shrink: 0;
}

/* Modal styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.show {
  display: flex;
}

.modal-dialog {
  background-color: white;
  border-radius: 2px;
  box-shadow:
    0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132),
    0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108);
  max-width: 400px;
  width: 90%;
  animation: modalSlideIn 0.2s ease-out;
}

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

.modal-header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid #edebe9;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #323130;
}

.modal-body {
  padding: 20px 24px;
}

.modal-body p {
  margin: 0;
  font-size: 14px;
  color: #605e5c;
  line-height: 1.5;
}

.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.modal-btn-primary,
.modal-btn-secondary {
  padding: 6px 16px;
  font-size: 14px;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.modal-btn-primary {
  background-color: #0078d4;
  color: white;
  border-color: #0078d4;
}

.modal-btn-primary:hover {
  background-color: #106ebe;
  border-color: #106ebe;
}

.modal-btn-secondary {
  background-color: white;
  color: #323130;
  border-color: #8a8886;
}

.modal-btn-secondary:hover {
  background-color: #f3f2f1;
  border-color: #323130;
}
