/* AEO Checker - page-specific styles.
 * All AEO-specific classes use the aeo- prefix.
 * Shared tool styles (bar, chips, textarea, report, sections) live in landing-page-analyzer.css.
 * Report renderer classes use the tr- prefix from tool-report.js.
 */

/* ---- Tool container ---- */

.aeo-tool-wrap {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}

.aeo-intro {
  color: var(--color--neutral-light, #b0b6c3);
  margin-top: 0.75rem;
  margin-bottom: 2rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

/* ---- Screen-reader only ---- */

.aeo-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- URL bar (reusing lpa-bar pattern) ---- */

.aeo-bar {
  position: relative;
}

.aeo-bar-inner {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  padding: 6px 6px 6px 16px;
  gap: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.aeo-bar-inner:focus-within {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

.aeo-bar-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.aeo-bar-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
  padding: 10px 0;
  line-height: 1.4;
}

.aeo-bar-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.aeo-bar-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.aeo-hint {
  font-size: 0.8125rem;
  color: var(--color--neutral-light, #b0b6c3);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* ---- Draft textarea ---- */

.aeo-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  color: #fff;
  font-size: 0.9375rem;
  font-family: inherit;
  line-height: 1.5;
  padding: 12px 16px;
  resize: vertical;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.aeo-textarea:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.18);
}

.aeo-textarea::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

/* ---- Action row (chips + draft-mode analyze button) ---- */

.aeo-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.aeo-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.aeo-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 6px 14px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.aeo-chip:hover,
.aeo-chip[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---- Status and error messages ---- */

.aeo-status {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.aeo-status.is-loading::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #818cf8;
  border-radius: 50%;
  animation: aeo-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

.aeo-error {
  margin-top: 1.25rem;
  padding: 12px 16px;
  background: rgba(224, 49, 49, 0.12);
  border: 1px solid rgba(224, 49, 49, 0.3);
  border-radius: 10px;
  color: #fca5a5;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* ---- JS-needed warning banner ---- */

.aeo-js-warning {
  margin-top: 1.25rem;
  padding: 14px 16px;
  background: rgba(245, 166, 35, 0.1);
  border: 1px solid rgba(245, 166, 35, 0.35);
  border-radius: 10px;
  color: #fde68a;
  font-size: 0.9rem;
  line-height: 1.55;
}

.aeo-js-warning-icon {
  margin-right: 6px;
}

/* ---- Report area ---- */

.aeo-report-area {
  margin-top: 1.5rem;
}

/* ---- Site access section ---- */

.aeo-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.aeo-section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 1.25rem;
}

.aeo-access-draft-note {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9375rem;
}

.aeo-access-block {
  margin-bottom: 2rem;
}

.aeo-access-heading {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
}

.aeo-access-note {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5rem;
}

/* ---- Crawler groups ---- */

.aeo-crawler-group {
  margin-bottom: 1.25rem;
}

.aeo-crawler-group-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.aeo-crawler-group-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.aeo-crawler-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aeo-crawler-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.aeo-crawler-token {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.aeo-crawler-vendor {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  flex: 1;
  min-width: 60px;
}

.aeo-robots-note {
  font-size: 0.75rem;
  color: rgba(245, 166, 35, 0.8);
  font-style: italic;
}

/* ---- Badges ---- */

.aeo-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.aeo-badge--allowed {
  background: rgba(42, 199, 105, 0.15);
  color: #6ee7a0;
  border: 1px solid rgba(42, 199, 105, 0.3);
}

.aeo-badge--blocked {
  background: rgba(224, 49, 49, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(224, 49, 49, 0.3);
}

.aeo-badge--unknown {
  background: rgba(176, 182, 195, 0.1);
  color: rgba(176, 182, 195, 0.8);
  border: 1px solid rgba(176, 182, 195, 0.2);
}

/* ---- llms.txt block ---- */

.aeo-llms-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.75);
}

.aeo-llms-explanation {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.375rem;
}

.aeo-llms-details {
  margin-top: 0.75rem;
}

.aeo-llms-details summary {
  cursor: pointer;
  font-size: 0.875rem;
  color: rgba(129, 140, 248, 0.9);
  user-select: none;
}

.aeo-llms-pre {
  margin-top: 0.5rem;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 260px;
  overflow-y: auto;
}

/* ---- Crawler response metrics ---- */

.aeo-response-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.aeo-response-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.aeo-response-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
}

.aeo-response-value {
  font-size: 1.125rem;
  font-weight: 600;
}

.aeo-response-value.aeo-metric--good  { color: #6ee7a0; }
.aeo-response-value.aeo-metric--ok    { color: #fde68a; }
.aeo-response-value.aeo-metric--slow  { color: #fca5a5; }

.aeo-response-cat {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
}

.aeo-response-note {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.25rem;
}

/* ---- Cross-tool link ---- */

.aeo-cross-link {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

.aeo-cross-link a {
  color: rgba(129, 140, 248, 0.9);
  text-decoration: none;
}

.aeo-cross-link a:hover {
  text-decoration: underline;
  color: #818cf8;
}

/* ---- Content sections (placeholder for TODO-6 copy) ---- */

.aeo-content-section {
  background: transparent;
}

.aeo-content-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* ---- More free tools row ---- */

.aeo-more-tools-section {
  padding-top: 0;
}

.aeo-more-tools-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
}

.aeo-tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.aeo-tool-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  min-width: 160px;
  max-width: 260px;
  flex: 1;
}

.aeo-tool-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
}

.aeo-tool-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}

.aeo-tool-card-desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.aeo-see-all-wrap {
  margin-top: 1rem;
  font-size: 0.875rem;
}

.aeo-see-all-link {
  color: rgba(129, 140, 248, 0.9);
  text-decoration: none;
}

.aeo-see-all-link:hover {
  text-decoration: underline;
}


/* ---- Responsive ---- */

@media (max-width: 620px) {
  .aeo-bar-input {
    font-size: 0.9rem;
  }

  .aeo-bar-btn {
    font-size: 0.875rem;
    padding: 8px 14px;
  }

  .aeo-response-row {
    gap: 1rem;
  }

  .aeo-tools-row {
    flex-direction: column;
  }

  .aeo-tool-card {
    max-width: 100%;
  }
}
