/* ═══════════ PRESS RELEASE TEMPLATE BUILDER ═══════════ */

.pr-wrap { display: flex; flex-direction: column; gap: var(--space-5); }
.pr-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); }

.pr-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.pr-breadcrumb { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 6px; }
.pr-breadcrumb span { margin: 0 6px; }
.pr-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-ai-badge { font-size: 0.65rem; font-weight: var(--fw-semibold); color: #a78bfa; background: rgba(139,92,246,0.14); border: 1px solid rgba(139,92,246,0.3); padding: 3px 10px; border-radius: var(--radius-full); }
.pr-subtitle { color: var(--text-secondary); font-size: var(--fs-base); margin-top: 6px; max-width: 900px; }
.pr-header-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }

/* Stats */
.pr-stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4); }
.pr-stat { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: var(--space-5); }
.pr-stat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pr-stat-label { font-size: var(--fs-xs); color: var(--text-secondary); }
.pr-stat-val { font-size: 1.9rem; font-weight: var(--fw-bold); color: var(--text-primary); margin-top: 4px; }
.pr-stat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.pr-stat-delta { font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.pr-stat-delta.pos { color: var(--success); }
.pr-link-inline { color: var(--primary); cursor: pointer; font-size: var(--fs-xs); }

/* Main 3-col grid */
.pr-main-grid { display: grid; grid-template-columns: 340px 1fr 340px; gap: var(--space-5); align-items: start; }
.pr-left, .pr-middle, .pr-right { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }

.pr-section-num { font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text-primary); margin-bottom: var(--space-4); }
.pr-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.pr-card-head h3 { font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--text-primary); }

/* Form */
.pr-form { display: flex; flex-direction: column; gap: 14px; }
.pr-form-group { display: flex; flex-direction: column; }
.pr-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pr-form-row-3 { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.pr-label { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text-secondary); display: block; margin-bottom: 4px; }
.pr-optional { color: var(--text-muted); font-weight: var(--fw-normal); }
.pr-counter { font-size: var(--fs-2xs); color: var(--text-muted); text-align: right; margin-top: 2px; }

.pr-gen-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, #3b82f6, #0ea5e9); border: none; color: #fff; font-weight: var(--fw-semibold); font-size: var(--fs-sm); border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: var(--space-3); }
.pr-gen-btn:hover { filter: brightness(1.1); }

/* Tags */
.pr-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pr-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-elevated); border: 1px solid var(--border-color); color: var(--text-secondary); padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--fs-2xs); }
.pr-tag-remove { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.7rem; padding: 0; margin-left: 2px; line-height: 1; }
.pr-tag-remove:hover { color: var(--error); }
.pr-tag-add { background: none; border: 1px dashed var(--border-color); color: var(--primary); padding: 4px 10px; border-radius: var(--radius-full); font-size: var(--fs-2xs); cursor: pointer; }
.pr-tag-add:hover { border-color: var(--primary); }

/* Toggle */
.pr-toggle-wrap { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.pr-toggle { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.pr-toggle input { opacity: 0; width: 0; height: 0; }
.pr-toggle-slider { position: absolute; inset: 0; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: 10px; cursor: pointer; transition: 0.2s; }
.pr-toggle-slider::before { content: ''; position: absolute; width: 14px; height: 14px; left: 2px; top: 2px; background: var(--text-muted); border-radius: 50%; transition: 0.2s; }
.pr-toggle input:checked + .pr-toggle-slider { background: var(--primary); border-color: var(--primary); }
.pr-toggle input:checked + .pr-toggle-slider::before { transform: translateX(16px); background: #fff; }

/* Content settings row */
.pr-content-settings { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }

/* Editor area */
.pr-editor-wrap { display: flex; flex-direction: column; }
.pr-editor-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-color); }
.pr-editor-tab { background: none; border: none; color: var(--text-secondary); padding: 10px 16px; font-size: var(--fs-xs); font-weight: var(--fw-medium); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pr-editor-tab:hover { color: var(--text-primary); }
.pr-editor-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.pr-editor-word-count { margin-left: auto; padding: 10px 16px; font-size: var(--fs-xs); color: var(--text-muted); align-self: center; }

.pr-toolbar { display: flex; gap: 2px; padding: 8px 12px; border-bottom: 1px solid var(--border-color); flex-wrap: wrap; }
.pr-tool-btn { background: none; border: none; color: var(--text-secondary); width: 30px; height: 28px; border-radius: 4px; cursor: pointer; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; }
.pr-tool-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.pr-tool-sep { width: 1px; height: 20px; background: var(--border-color); margin: 4px 4px; align-self: center; }

.pr-editor-body { padding: 20px; min-height: 360px; font-size: var(--fs-sm); line-height: 1.7; color: var(--text-primary); overflow-y: auto; max-height: 500px; }
.pr-editor-body h2 { font-size: 1.3rem; font-weight: var(--fw-bold); margin: 0 0 16px 0; line-height: 1.3; }
.pr-editor-body p { margin: 0 0 14px 0; }
.pr-editor-body blockquote { border-left: 3px solid var(--accent); padding: 10px 16px; margin: 16px 0; background: rgba(139,92,246,0.06); border-radius: 0 6px 6px 0; font-style: italic; color: var(--text-secondary); }
.pr-editor-body ul { margin: 10px 0 14px 20px; padding: 0; }
.pr-editor-body li { margin-bottom: 4px; }
.pr-editor-body .pr-about-heading { font-size: var(--fs-base); font-weight: var(--fw-bold); margin: 20px 0 8px 0; }
.pr-editor-body .pr-contact-block { margin-top: 16px; font-size: var(--fs-xs); color: var(--text-secondary); }

/* SEO Score bar */
.pr-seo-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--border-color); flex-wrap: wrap; }
.pr-seo-score-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-primary); white-space: nowrap; }
.pr-seo-bar-track { flex: 0 0 100px; height: 6px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; }
.pr-seo-bar-fill { height: 100%; border-radius: 3px; background: var(--success); }
.pr-seo-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.pr-seo-pill { font-size: var(--fs-2xs); color: var(--text-muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.pr-seo-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pr-seo-pill.good::before { background: var(--success); }
.pr-seo-pill.warn::before { background: var(--warning); }
.pr-seo-pill.info::before { background: var(--primary); }

/* SEO Preview */
.pr-seo-preview { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; margin-bottom: var(--space-3); }
.pr-seo-preview-label { font-size: var(--fs-2xs); color: var(--text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.pr-seo-preview-url { font-size: var(--fs-xs); color: var(--success); margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.pr-seo-preview-url .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--success); display: inline-flex; align-items: center; justify-content: center; font-size: 8px; color: #fff; flex-shrink: 0; }
.pr-seo-preview-title { font-size: var(--fs-base); font-weight: var(--fw-medium); color: #8ab4f8; margin-bottom: 4px; cursor: pointer; }
.pr-seo-preview-title:hover { text-decoration: underline; }
.pr-seo-preview-desc { font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.5; }

.pr-length-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pr-length-label { font-size: var(--fs-xs); color: var(--text-secondary); }
.pr-length-bar { flex: 0 0 120px; height: 5px; background: var(--bg-elevated); border-radius: 3px; overflow: hidden; margin: 0 10px; }
.pr-length-fill { height: 100%; border-radius: 3px; }
.pr-length-val { font-size: var(--fs-xs); color: var(--text-muted); min-width: 45px; text-align: right; }

/* Distribution suggestions */
.pr-dist-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-color); }
.pr-dist-row:last-child { border-bottom: none; }
.pr-dist-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; flex-shrink: 0; }
.pr-dist-name { flex: 1; font-size: var(--fs-sm); color: var(--text-primary); font-weight: var(--fw-medium); }
.pr-dist-badge { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); padding: 3px 10px; border-radius: var(--radius-full); white-space: nowrap; }
.pr-dist-badge.visibility { background: rgba(34,197,94,0.14); color: var(--success); }
.pr-dist-badge.premium { background: rgba(139,92,246,0.14); color: #a78bfa; }
.pr-dist-badge.authority { background: rgba(59,130,246,0.14); color: #60a5fa; }
.pr-dist-badge.reach { background: rgba(245,158,11,0.14); color: var(--warning); }

.pr-view-all { text-align: center; padding: 12px 0; margin-top: var(--space-2); }
.pr-link-btn { background: none; border: none; color: var(--primary); font-size: var(--fs-sm); cursor: pointer; font-weight: var(--fw-medium); display: inline-flex; align-items: center; gap: 6px; }
.pr-link-btn:hover { text-decoration: underline; }

/* AI Content Optimizations */
.pr-opt-grid { display: flex; gap: var(--space-4); }
.pr-opt-checks { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.pr-opt-row { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); }
.pr-opt-check { width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; flex-shrink: 0; }
.pr-opt-check.pass { background: rgba(34,197,94,0.14); color: var(--success); }
.pr-opt-check.warn { background: rgba(245,158,11,0.14); color: var(--warning); }
.pr-opt-label { flex: 1; color: var(--text-secondary); }
.pr-opt-status { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); padding: 2px 8px; border-radius: var(--radius-full); }
.pr-opt-status.good { background: rgba(34,197,94,0.14); color: var(--success); }
.pr-opt-status.optimize { background: rgba(59,130,246,0.14); color: #60a5fa; }

.pr-score-ring { position: relative; width: 90px; height: 90px; flex-shrink: 0; }
.pr-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pr-score-ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pr-score-ring-val { font-size: 1.5rem; font-weight: var(--fw-bold); color: var(--text-primary); line-height: 1; }
.pr-score-ring-sub { font-size: var(--fs-2xs); color: var(--text-muted); }

.pr-improve-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, #22c55e, #06b6d4); border: none; color: #fff; font-weight: var(--fw-semibold); font-size: var(--fs-xs); border-radius: var(--radius-md); cursor: pointer; margin-top: var(--space-3); display: flex; align-items: center; justify-content: center; gap: 6px; }
.pr-improve-btn:hover { filter: brightness(1.1); }

/* Template shortcuts */
.pr-templates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pr-template-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 10px; text-align: center; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.pr-template-card:hover { border-color: var(--border-color-hover); transform: translateY(-2px); }
.pr-template-card.active { border-color: var(--primary); background: var(--primary-muted); }
.pr-template-label { font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-primary); line-height: 1.3; }

/* Previous press releases table */
.pr-history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table th { text-align: left; font-size: var(--fs-2xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; padding: 8px; border-bottom: 1px solid var(--border-color); }
.pr-table td { padding: 10px 8px; border-bottom: 1px solid var(--border-color); vertical-align: middle; font-size: var(--fs-xs); color: var(--text-secondary); }
.pr-table tbody tr:hover { background: var(--bg-surface-hover); }
.pr-table-title { font-weight: var(--fw-medium); color: var(--text-primary); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-table-score { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-size: var(--fs-2xs); font-weight: var(--fw-bold); color: #fff; }
.pr-table-status { font-size: var(--fs-2xs); font-weight: var(--fw-semibold); padding: 3px 10px; border-radius: var(--radius-full); }
.pr-table-status.published { background: rgba(34,197,94,0.14); color: var(--success); }
.pr-table-status.draft { background: rgba(245,158,11,0.14); color: var(--warning); }
.pr-table-dist-icons { display: flex; gap: 4px; }
.pr-table-dist-icon { width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; }
.pr-table-actions { display: flex; gap: 4px; }
.pr-act-btn { background: var(--bg-elevated); border: 1px solid var(--border-color); color: var(--text-secondary); width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; }
.pr-act-btn:hover { border-color: var(--border-color-hover); color: var(--text-primary); }

/* Responsive */
@media (max-width: 1300px) {
  .pr-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .pr-main-grid { grid-template-columns: 1fr 1fr; }
  .pr-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }
}
@media (max-width: 900px) {
  .pr-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-main-grid { grid-template-columns: 1fr; }
  .pr-right { grid-template-columns: 1fr; }
  .pr-templates-grid { grid-template-columns: repeat(2, 1fr); }
  .pr-content-settings { grid-template-columns: 1fr; }
}
