/* versione2/public/css/seo-analyzer.css */
.serp-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.serp-editor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.form-group-serp {
  margin-bottom: 20px;
}

.label-with-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary-dark);
}

.meta-counts {
  font-size: 12px;
  font-weight: normal;
  color: var(--text-muted);
}

.char-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.char-good { background: #dcfce7; color: #166534; }
.char-warn { background: #fef9c3; color: #854d0e; }
.char-bad  { background: #fee2e2; color: #991b1b; }

.serp-input, .serp-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.serp-input:focus, .serp-textarea:focus {
  border-color: var(--border-focus);
}

.serp-textarea {
  resize: vertical;
  min-height: 90px;
}

.length-bar-container {
  width: 100%;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.length-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.2s, background-color 0.2s;
}

/* GOOGLE SERP PREVIEW BOX */
.preview-mode-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mode-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s;
}

.mode-btn.active {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}

.google-preview-card {
  background: #ffffff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 6px rgba(32,33,36,0.12);
  font-family: Roboto, Arial, sans-serif;
}

/* DESKTOP SERP STYLE */
.desktop-serp {
  max-width: 600px;
}

.desktop-serp .serp-site-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.serp-favicon-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}

.desktop-serp .serp-site-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.desktop-serp .serp-site-name {
  font-size: 14px;
  color: #202124;
  font-weight: 400;
}

.desktop-serp .serp-url-display {
  font-size: 12px;
  color: #4d5156;
  word-break: break-all;
}

.desktop-serp .serp-title-link {
  font-size: 20px;
  line-height: 1.3;
  color: #1a0dab;
  text-decoration: none;
  font-weight: 400;
  display: inline-block;
  margin-top: 4px;
  margin-bottom: 4px;
  cursor: pointer;
}

.desktop-serp .serp-title-link:hover {
  text-decoration: underline;
}

.desktop-serp .serp-snippet-desc {
  font-size: 14px;
  line-height: 1.58;
  color: #4d5156;
  word-break: break-word;
}

.serp-date-badge {
  color: #70757a;
  font-size: 14px;
  margin-right: 4px;
}

/* MOBILE SERP STYLE */
.mobile-serp-wrapper {
  max-width: 375px;
  margin: 0 auto;
  border: 8px solid #334155;
  border-radius: 28px;
  padding: 16px 12px;
  background: #f8fafc;
}

.mobile-serp {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.mobile-serp .serp-site-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.mobile-serp .serp-site-name {
  font-size: 13px;
  color: #202124;
  font-weight: 500;
}

.mobile-serp .serp-url-display {
  font-size: 11px;
  color: #5f6368;
}

.mobile-serp .serp-title-link {
  font-size: 17px;
  font-weight: 500;
  color: #1967d2;
  line-height: 1.35;
  margin-bottom: 6px;
  display: block;
}

.mobile-serp .serp-snippet-desc {
  font-size: 13px;
  line-height: 1.45;
  color: #3c4043;
}

/* RICCO: STELLE RECENSIONI */
.serp-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #e37400;
  margin: 4px 0;
}

.serp-rating-stars {
  letter-spacing: 2px;
}

.serp-rating-text {
  color: #70757a;
  font-size: 12px;
}

.recommendations-box {
  margin-top: 24px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.recom-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 8px;
}

.recom-item:last-child { margin-bottom: 0; }

/* CLASSI MODULARI (EX-INLINE) */
.hero-serp {
  padding-bottom: 24px;
}

.url-fetcher-box {
  max-width: 650px;
  margin: 0 auto 20px;
}

.url-fetcher-form {
  display: flex;
  gap: 8px;
}

.btn-fetch-tags {
  white-space: nowrap;
  padding: 10px 18px;
}

.alert-fetch-feedback {
  margin-top: 10px;
  font-size: 13px;
  padding: 10px;
}

.section-serp-main {
  margin-bottom: 60px;
}

.subtitle-snippet {
  margin-top: 0;
  margin-bottom: 20px;
}

.serp-extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.select-serp-pad {
  padding: 8px 12px;
}

.recom-title {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--primary-dark);
}

.pixel-calc-card {
  margin-top: 24px;
  padding: 20px;
}

.pixel-calc-title {
  margin: 0 0 10px;
  font-size: 14px;
}

.pixel-calc-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.trunc-status-row {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.status-text-green {
  color: #166534;
}

@media (max-width: 860px) {
  .serp-layout-grid {
    grid-template-columns: 1fr;
  }
}

