/* Scoped styling for website-security-header-scanner */
.wshs-container {
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  font-family: inherit;
  color: var(--tf-ink, #0f172a);
}

.wshs-header {
  margin-bottom: 1.5rem;
}

.wshs-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 4px;
  background-color: var(--tf-accent-light, #eff6ff);
  color: var(--tf-accent, #0284c7);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  border: 1px solid var(--tf-accent-border, #bfdbfe);
}

.wshs-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: var(--tf-ink, #0f172a);
  letter-spacing: -0.02em;
}

.wshs-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--tf-ink-soft, #64748b);
  line-height: 1.5;
}

/* Main Grid */
.wshs-main-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.wshs-input-section,
.wshs-results-section {
  display: flex;
  flex-direction: column;
}

/* Cards */
.wshs-card {
  background: var(--tf-surface, #ffffff);
  border: 1px solid var(--tf-rule, #e2e8f0);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.wshs-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--tf-rule, #e2e8f0);
  padding-bottom: 0.75rem;
}

.wshs-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: var(--tf-ink, #0f172a);
}

.wshs-card-actions {
  display: flex;
  gap: 0.5rem;
}

.wshs-badge-meta {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  background: var(--tf-surface-alt, #f1f5f9);
  color: var(--tf-ink-soft, #475569);
  border-radius: 4px;
}

/* Forms */
.wshs-form-group {
  margin-bottom: 1rem;
}

.wshs-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--tf-ink, #0f172a);
}

.wshs-select,
.wshs-select-sm,
.wshs-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--tf-surface, #ffffff);
  border: 1px solid var(--tf-rule, #cbd5e1);
  border-radius: 6px;
  color: var(--tf-ink, #0f172a);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.wshs-select-sm {
  width: auto;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
}

.wshs-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.825rem;
  line-height: 1.5;
  resize: vertical;
}

.wshs-select:focus,
.wshs-select-sm:focus,
.wshs-textarea:focus {
  border-color: var(--tf-accent, #0284c7);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Buttons */
.wshs-btn-row {
  margin-top: 0.75rem;
}

.wshs-btn-primary {
  width: 100%;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--tf-accent, #0284c7);
  border: 1px solid var(--tf-accent, #0284c7);
  border-radius: 6px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.wshs-btn-primary:hover {
  filter: brightness(1.08);
}

.wshs-btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tf-ink, #0f172a);
  background: var(--tf-surface-alt, #f8fafc);
  border: 1px solid var(--tf-rule, #cbd5e1);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wshs-btn-sm:hover {
  border-color: var(--tf-accent, #0284c7);
  color: var(--tf-accent, #0284c7);
}

/* Generator box */
.wshs-code-box {
  background: #0f172a;
  color: #f8fafc;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.5;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.wshs-code-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.wshs-copy-status {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.wshs-copy-success {
  color: #16a34a;
}

.wshs-copy-err {
  color: #dc2626;
}

/* Score Banner */
.wshs-grade-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}

.wshs-grade-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  font-weight: 900;
  flex-shrink: 0;
}

.wshs-grade-info {
  flex: 1;
}

.wshs-grade-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.wshs-grade-score {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tf-ink-soft, #475569);
  margin-bottom: 0.35rem;
}

.wshs-grade-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--tf-ink-soft, #64748b);
}

/* Grade Tiers */
.wshs-grade-aplus,
.wshs-grade-a {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.wshs-grade-aplus .wshs-grade-circle,
.wshs-grade-a .wshs-grade-circle {
  background: #16a34a;
  color: #ffffff;
}
.wshs-grade-aplus .wshs-grade-title,
.wshs-grade-a .wshs-grade-title {
  color: #15803d;
}

.wshs-grade-b {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.wshs-grade-b .wshs-grade-circle {
  background: #2563eb;
  color: #ffffff;
}
.wshs-grade-b .wshs-grade-title {
  color: #1d4ed8;
}

.wshs-grade-c {
  background: #fefce8;
  border-color: #fef08a;
}
.wshs-grade-c .wshs-grade-circle {
  background: #ca8a04;
  color: #ffffff;
}
.wshs-grade-c .wshs-grade-title {
  color: #a16207;
}

.wshs-grade-d {
  background: #fff7ed;
  border-color: #fed7aa;
}
.wshs-grade-d .wshs-grade-circle {
  background: #ea580c;
  color: #ffffff;
}
.wshs-grade-d .wshs-grade-title {
  color: #c2410c;
}

.wshs-grade-f {
  background: #fef2f2;
  border-color: #fecaca;
}
.wshs-grade-f .wshs-grade-circle {
  background: #dc2626;
  color: #ffffff;
}
.wshs-grade-f .wshs-grade-title {
  color: #b91c1c;
}

/* Breakdown list */
.wshs-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wshs-header-item {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--tf-rule, #e2e8f0);
  background: var(--tf-surface, #ffffff);
}

.wshs-item-pass { border-left: 4px solid #16a34a; }
.wshs-item-warn { border-left: 4px solid #eab308; }
.wshs-item-fail { border-left: 4px solid #dc2626; }

.wshs-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.wshs-item-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tf-ink, #0f172a);
}

.wshs-item-pill {
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.wshs-pill-pass { background: #dcfce7; color: #15803d; }
.wshs-pill-warn { background: #fef9c3; color: #a16207; }
.wshs-pill-fail { background: #fee2e2; color: #b91c1c; }

.wshs-item-value {
  margin: 0 0 0.35rem 0;
  font-size: 0.8rem;
}

.wshs-item-value code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--tf-surface-alt, #f1f5f9);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  color: var(--tf-ink, #0f172a);
  word-break: break-all;
}

.wshs-item-advice {
  font-size: 0.775rem;
  color: var(--tf-ink-soft, #64748b);
  line-height: 1.4;
}

.wshs-config-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
