/**
 * Digital Rise Local Rank Tracker — Frontend Styles v2
 */

/* Reset */
.drlrt-wrap { max-width: 960px; margin: 30px auto; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif; color: #1e293b; line-height: 1.6; }
.drlrt-wrap *, .drlrt-wrap *::before, .drlrt-wrap *::after { box-sizing: border-box; }

/* Header */
.drlrt-header { text-align: center; margin-bottom: 28px; }
.drlrt-logo-row { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.drlrt-logo-icon { font-size: 36px; }
.drlrt-title { font-size: 26px; font-weight: 700; margin: 0; color: #0f172a; }
.drlrt-subtitle { margin: 2px 0 0; font-size: 13px; color: #64748b; }
.drlrt-subtitle a { color: #0073e6; text-decoration: none; }
.drlrt-desc { max-width: 620px; margin: 10px auto 0; font-size: 15px; color: #475569; }

/* Form */
.drlrt-form { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 28px 28px 20px; margin-bottom: 30px; }
.drlrt-form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.drlrt-field { flex: 1 1 260px; margin-bottom: 14px; }
.drlrt-field-full { flex: 1 1 100%; }
.drlrt-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; color: #334155; }
.drlrt-req { color: #dc2626; }
.drlrt-opt { font-weight: 400; font-size: 12px; color: #94a3b8; }
.drlrt-field input { width: 100%; padding: 11px 14px; font-size: 15px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; transition: border-color .2s; }
.drlrt-field input:focus { outline: none; border-color: #0073e6; box-shadow: 0 0 0 3px rgba(0,115,230,.12); }
.drlrt-error { color: #dc2626; font-size: 14px; margin-top: 8px; text-align: center; }

/* Buttons */
.drlrt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; font-size: 15px; font-weight: 600; border: none; border-radius: 8px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.drlrt-btn-primary { width: 100%; background: linear-gradient(135deg, #0073e6, #005bb5); color: #fff; }
.drlrt-btn-primary:hover { background: linear-gradient(135deg, #005bb5, #004a99); box-shadow: 0 4px 14px rgba(0,115,230,.3); }
.drlrt-btn-accent { background: #0073e6; color: #fff; }
.drlrt-btn-accent:hover { background: #005bb5; }
.drlrt-btn-outline { background: #fff; color: #0073e6; border: 2px solid #0073e6; }
.drlrt-btn-outline:hover { background: #eff6ff; }
.drlrt-spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: drlrt-spin .7s linear infinite; }
@keyframes drlrt-spin { to { transform: rotate(360deg); } }

/* Export */
.drlrt-export-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

/* Sources bar */
.drlrt-sources-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.drlrt-source-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.drlrt-source-badge.active { background: #dcfce7; color: #166534; }
.drlrt-source-badge.inactive { background: #f1f5f9; color: #94a3b8; }

/* Report */
.drlrt-report { animation: drlrt-fade .5s ease; }
@keyframes drlrt-fade { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.drlrt-section { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 24px; margin-bottom: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.drlrt-section-title { font-size: 19px; font-weight: 700; margin: 0 0 16px; color: #0f172a; }

/* Score */
.drlrt-score-card { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
.drlrt-score-circle { width: 110px; height: 110px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 6px solid #0073e6; flex-shrink: 0; }
.drlrt-score-num { font-size: 32px; font-weight: 800; color: #0073e6; line-height: 1; }
.drlrt-score-grade { font-size: 16px; font-weight: 700; color: #475569; }
.drlrt-score-meta h3 { margin: 0 0 4px; font-size: 20px; }
.drlrt-score-meta p { margin: 0; color: #64748b; font-size: 14px; }
.drlrt-chart-wrap { max-width: 100%; margin-top: 16px; }

/* Audit */
.drlrt-audit-header { margin-bottom: 16px; }
.drlrt-audit-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.drlrt-audit-score-big { font-size: 36px; font-weight: 800; color: #0073e6; }
.drlrt-audit-grade { font-size: 20px; font-weight: 700; color: #475569; }
.drlrt-audit-url { font-size: 13px; color: #64748b; word-break: break-all; }
.drlrt-audit-load, .drlrt-audit-src { font-size: 12px; color: #94a3b8; }
.drlrt-mini-bar { width: 60px; height: 6px; background: #e2e8f0; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: middle; overflow: hidden; }
.drlrt-mini-bar div { height: 100%; border-radius: 3px; }

/* Table */
.drlrt-table-wrap { overflow-x: auto; }
.drlrt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.drlrt-table th { background: #0073e6; color: #fff; padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; }
.drlrt-table th:first-child { border-radius: 8px 0 0 0; }
.drlrt-table th:last-child { border-radius: 0 8px 0 0; }
.drlrt-table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; }
.drlrt-table tbody tr:hover { background: #f0f9ff; }

/* Badges */
.drlrt-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.drlrt-badge-high { background: #dcfce7; color: #166534; }
.drlrt-badge-medium { background: #fef9c3; color: #854d0e; }
.drlrt-badge-low { background: #fee2e2; color: #991b1b; }
.drlrt-badge-critical { background: #fecdd3; color: #881337; }

/* Cards */
.drlrt-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.drlrt-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; }
.drlrt-card h4 { margin: 0 0 8px; font-size: 15px; color: #0f172a; }
.drlrt-card-meta { font-size: 13px; color: #64748b; margin: 3px 0; }
.drlrt-card-meta a { color: #0073e6; text-decoration: none; }
.drlrt-card-weakness { font-size: 12px; color: #dc2626; margin-top: 8px; font-style: italic; }
.drlrt-comp-source { margin-bottom: 14px; }

/* Reviews */
.drlrt-review-card { background: #f8fafc; border-left: 4px solid #0073e6; border-radius: 0 8px 8px 0; padding: 16px 18px; margin-bottom: 14px; }
.drlrt-review-card.positive { border-left-color: #16a34a; }
.drlrt-review-card.neutral { border-left-color: #eab308; }
.drlrt-review-card.negative { border-left-color: #dc2626; }
.drlrt-review-card.fake { border-left-color: #f97316; }
.drlrt-review-label { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.drlrt-review-sample { font-size: 14px; color: #475569; line-height: 1.65; }
.drlrt-review-tips { font-size: 13px; color: #0073e6; margin-top: 10px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }

/* Content & Tips */
.drlrt-content-item, .drlrt-tip-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.drlrt-content-item:last-child, .drlrt-tip-item:last-child { border-bottom: none; }
.drlrt-item-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.drlrt-item-body h4 { margin: 0 0 3px; font-size: 15px; color: #0f172a; }
.drlrt-item-body p { margin: 2px 0; font-size: 13px; color: #64748b; }
.drlrt-item-tag { display: inline-block; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; margin-right: 4px; }

/* Actions */
.drlrt-action-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; margin-bottom: 8px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.drlrt-action-badge { font-size: 20px; flex-shrink: 0; }
.drlrt-action-body { flex: 1; }
.drlrt-action-text { font-size: 14px; display: block; }
.drlrt-action-detail { font-size: 12px; color: #94a3b8; display: block; margin-top: 2px; }

/* Footer */
.drlrt-report-footer { text-align: center; padding: 18px 0 4px; font-size: 13px; color: #94a3b8; border-top: 1px solid #e2e8f0; margin-top: 10px; }
.drlrt-report-footer a { color: #0073e6; text-decoration: none; }

/* Responsive */
@media (max-width: 640px) {
	.drlrt-wrap { margin: 16px 10px; }
	.drlrt-form { padding: 18px 16px 14px; }
	.drlrt-section { padding: 16px; }
	.drlrt-title { font-size: 21px; }
	.drlrt-score-card { flex-direction: column; text-align: center; }
	.drlrt-audit-summary { flex-direction: column; text-align: center; }
}
