@import url("../theme.css");

/* --module-accent set on body (.atlas-accent, .shortlist-accent, .decision-accent) */

.app-shell-block {
  margin-bottom: 1rem;
}

.app-shell-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.app-shell-footer {
  margin: 0.35rem 0 0;
  text-align: right;
}

.product-feedback-link {
  border: none;
  padding: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.product-feedback-link:hover {
  color: var(--module-accent, var(--atlas-accent, #0d9488));
}

.product-feedback-modal .product-feedback-reply-note {
  margin-bottom: 0.75rem;
}

.product-feedback-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.product-feedback-field {
  display: grid;
  gap: 0.3rem;
  font-size: 0.88rem;
}

.product-feedback-field input,
.product-feedback-field textarea {
  width: 100%;
  font: inherit;
  padding: 0.5rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface, #fff);
}

.product-feedback-field textarea {
  resize: vertical;
  min-height: 6rem;
}

.product-feedback-error {
  color: #b91c1c;
}

.product-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

@media (max-width: 640px) {
  .app-shell-footer {
    text-align: left;
  }

  .product-feedback-actions .primary-action,
  .product-feedback-actions .secondary-action {
    flex: 1 1 100%;
  }
}

.app-shell-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.app-account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  max-width: min(100%, 28rem);
}

.app-account .account-email {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0;
}

.app-account .account-entitlement {
  font-size: 0.78rem;
  margin: 0;
}

.account-signin-btn,
.app-account .secondary-action {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.account-admin-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.account-admin-link:hover {
  color: var(--module-accent, var(--atlas-accent, #0d9488));
}

.account-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.account-modal-overlay[hidden] {
  display: none;
}

.account-modal {
  position: relative;
  width: min(100%, 32rem);
  max-height: min(90vh, 640px);
  overflow: auto;
  padding: 1.25rem 1.35rem 1.5rem;
}

.account-modal h2 {
  margin: 0 2rem 0.75rem 0;
  font-size: 1.25rem;
}

.account-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.account-purchase-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.account-purchase-card {
  padding: 0.85rem;
}

.account-purchase-heading {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.account-qty-label {
  display: block;
  margin: 0.5rem 0;
  font-size: 0.88rem;
}

.account-qty-label input {
  display: block;
  margin-top: 0.25rem;
  width: 5rem;
}

.account-modal label {
  display: block;
  margin: 0.65rem 0;
  font-size: 0.88rem;
}

.account-modal label input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  box-sizing: border-box;
}

.account-oauth-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.75rem 0 0.35rem;
}

.account-oauth-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.account-oauth-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.85rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.account-oauth-divider::before,
.account-oauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.45);
}

.account-oauth-divider span {
  flex: 0 0 auto;
}

.account-signin-flash {
  width: 100%;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
}

.account-dev-link a {
  display: inline-block;
  margin-top: 0.35rem;
  text-decoration: none;
}

.account-toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  max-width: min(92vw, 28rem);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.account-toast[hidden] {
  display: none;
}

.account-toast--success {
  border-color: var(--module-accent, var(--atlas-accent, #0d9488));
}

.locale-toggle {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.locale-btn {
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.locale-btn.active {
  background: var(--module-accent, var(--atlas-accent, #0d9488));
  color: #fff;
}

.app-shell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.app-shell a {
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.2;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
}

.app-shell a:hover {
  border-color: var(--module-accent, var(--atlas-accent, #4f46e5));
}

.app-shell a.active {
  background: var(--module-accent, var(--atlas-accent, #4f46e5));
  color: #fff;
  border-color: var(--module-accent, var(--atlas-accent, #4f46e5));
}

.workspace-hero .hero-inner,
.shortlist-workspace,
.toolbar-wrap {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.workspace-panel,
.toolbar-wrap {
  box-sizing: border-box;
}

.workspace-panel {
  max-width: 1100px;
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
}

.workspace-panel > summary {
  font-weight: 700;
  cursor: pointer;
  padding: 0.5rem 0;
}

.filter-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.filter-advanced {
  width: 100%;
  margin-top: 0.5rem;
}

.filter-advanced .chips {
  margin-top: 0.35rem;
}

.perspective-card.card-compact .card-more > summary {
  font-weight: 600;
  cursor: pointer;
  margin: 0.5rem 0;
}

.perspective-card.card-compact .card-more[open] summary {
  margin-bottom: 0.75rem;
}

.card-score-line {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--module-accent, var(--atlas-accent, #0d9488));
}

.card-score-line.muted {
  color: var(--muted);
  font-weight: 500;
}

.decision-scores .score-composite {
  font-size: 1.4rem;
  color: var(--module-accent, var(--atlas-accent, #0d9488));
}

.score-dimension-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.score-dimension {
  margin-bottom: 0.85rem;
}

.score-dim-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
}

.score-bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--module-accent, var(--atlas-accent, #0d9488));
  margin: 0.25rem 0;
  max-width: 100%;
}

.feedback-prompt {
  margin-top: 1rem;
  padding: 0.75rem;
}

.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.shortlist-workspace {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.shortlist-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.shortlist-row h3 {
  margin: 0;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .shortlist-row {
    grid-template-columns: 1fr;
  }
}
