/* ============================================================
   ATS RESUME SCANNER — TOOL-SPECIFIC STYLES
   All variables (--bg-base, --accent, etc.) are inherited
   from the shared :root defined in base.html
   ============================================================ */

.rs-dashboard {
  padding: 10px 0 80px;
}

/* ── CARD ── */
.rs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.rs-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.rs-card-heading h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rs-step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── DROPZONE ── */
.rs-dropzone {
  position: relative;
  border: 1.5px dashed var(--border-strong);
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(0, 229, 255, 0.02);
}

.rs-dropzone:hover,
.rs-dropzone:focus-visible {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.05);
  outline: none;
}

.rs-dropzone.rs-dragover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
}

.rs-dropzone.rs-has-file {
  border-style: solid;
  border-color: var(--border-strong);
  padding: 18px 20px;
}

.rs-dropzone-icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}

.rs-dropzone-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rs-dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.rs-file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
}

.rs-file-chip i.fa-file-pdf {
  color: var(--accent3);
  font-size: 1.3rem;
}

.rs-file-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.rs-file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
}

.rs-file-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.rs-file-remove:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
}

/* ── TEXTAREA ── */
.rs-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 14px 16px;
  resize: vertical;
  min-height: 180px;
  transition: border-color 0.2s;
}

.rs-textarea::placeholder {
  color: var(--text-muted);
}

.rs-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.rs-textarea-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.rs-textarea-footer span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
}

/* ── ERROR TEXT ── */
.rs-error {
  color: #ff6b6b;
  font-size: 0.8rem;
  margin-top: 8px;
  min-height: 1em;
}

/* ── SCAN BUTTON ── */
.rs-scan-btn {
  width: 100%;
  margin-top: 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  color: #04101a;
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.rs-scan-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 229, 255, 0.25);
}

.rs-scan-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── RESULTS CARD ── */
.rs-results-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.rs-empty-state,
.rs-loading-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 14px;
}

.rs-empty-icon {
  font-size: 2.6rem;
  color: var(--border-strong);
}

.rs-empty-state p,
.rs-loading-state p {
  font-size: 0.88rem;
  max-width: 280px;
  line-height: 1.6;
}

.rs-spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3px solid rgba(0, 229, 255, 0.15);
  border-top-color: var(--accent);
  animation: rs-spin 0.8s linear infinite;
}

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

/* ── SCORE BLOCK ── */
.rs-score-block {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.rs-score-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
}

.rs-score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.rs-score-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 10;
}

.rs-score-ring-fg {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}

.rs-score-number {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--text-primary);
}

.rs-score-percent {
  font-size: 1rem;
  color: var(--text-muted);
  margin-left: 2px;
}

.rs-score-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  margin-bottom: 6px;
}

.rs-score-verdict {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ── KEYWORD SECTIONS ── */
.rs-keyword-section {
  margin-bottom: 22px;
}

.rs-keyword-section h3 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.rs-icon-match { color: #2ee6a8; }
.rs-icon-missing { color: #ff6b6b; }

.rs-count-badge {
  background: rgba(46, 230, 168, 0.12);
  color: #2ee6a8;
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 0.72rem;
  font-family: 'Space Mono', monospace;
  margin-left: auto;
}

.rs-count-badge-missing {
  background: rgba(255, 107, 107, 0.12);
  color: #ff6b6b;
}

.rs-keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rs-keyword-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.rs-keyword-pill.rs-pill-match {
  border-color: rgba(46, 230, 168, 0.35);
  background: rgba(46, 230, 168, 0.08);
  color: #2ee6a8;
}

.rs-keyword-pill.rs-pill-missing {
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.07);
  color: #ff9a9a;
}

.rs-keyword-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── STATS ROW ── */
.rs-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 10px;
  margin-bottom: 20px;
}

.rs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rs-stat-value {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.rs-stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* ── RESCAN BUTTON ── */
.rs-rescan-btn {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--border-strong);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.rs-rescan-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── INFO STRIP ── */
.rs-info-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.rs-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
}

.rs-info-item i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 2px;
}

.rs-info-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
  .rs-info-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .rs-card {
    padding: 20px;
  }
  .rs-score-block {
    flex-direction: column;
    text-align: center;
  }
  .rs-stats-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}
