/* ============================================================
   Sitemap Generator — Page Styles
   File: sitemap-generator.css
   Builds on top of Rankyfy common.css + keyword-research-extension.css
   Only adds styles not already covered by the base sheets.
   ============================================================ */


/* ============================================================
   HERO — Crawl progress + XML preview
   ============================================================ */
.smg-preview {
    display: flex;
    height: 340px;
    background: #f6f7ff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* Left — crawl progress panel */
.smg-crawl-panel {
    width: 55%;
    background: #fff;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.smg-crawl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.smg-crawl-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 700;
    color: #333;
}

.smg-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: smgPulse 1s ease-in-out infinite alternate;
}

@keyframes smgPulse {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0.3; transform: scale(0.7); }
}

.smg-crawl-count {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(255,85,0,0.08);
    padding: 2px 8px;
    border-radius: 20px;
}

.smg-url-stream {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.smg-url-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    font-size: 11px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.smg-url-row span:last-child {
    color: #555;
    font-family: monospace;
    font-size: 11px;
}

.smg-url--done span:last-child  { color: #28a745; }
.smg-url--active span:last-child { color: var(--primary-color); font-weight: 700; }
.smg-url--pending { opacity: 0.35; }

.smg-mini-spinner {
    width: 10px;
    height: 10px;
    border: 1.5px solid rgba(255,85,0,0.25);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: smgSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes smgSpin { to { transform: rotate(360deg); } }

.smg-pending-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #ccc;
    flex-shrink: 0;
    display: inline-block;
}

/* Progress bar at bottom of crawl panel */
.smg-crawl-bar-wrap {
    height: 4px;
    background: #f0f0f0;
    flex-shrink: 0;
}

.smg-crawl-bar {
    height: 100%;
    width: 62%;
    background: linear-gradient(90deg, var(--primary-color), #ff8c55);
    border-radius: 0 2px 2px 0;
    animation: smgBarAnim 3s ease-in-out infinite alternate;
}

@keyframes smgBarAnim {
    from { width: 40%; }
    to   { width: 85%; }
}


/* Right — XML code preview */
.smg-xml-panel {
    flex: 1;
    background: #1e1e2e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.smg-xml-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.smg-xml-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.smg-xml-line {
    font-size: 10px;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    white-space: nowrap;
}

.smg-xml-indent  { padding-left: 14px; }
.smg-xml-indent2 { padding-left: 28px; }

.smg-xml-tag     { color: #569cd6; }
.smg-xml-attr    { color: #9cdcfe; }
.smg-xml-val     { color: #ce9178; }
.smg-xml-content { color: #d4d4d4; }
.smg-xml-comment { color: #6a9955; font-style: italic; padding-left: 14px; }

.smg-xml-footer {
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.smg-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.smg-dl-btn:hover { background: #e04a00; }


/* ============================================================
   SECTION 2 — Settings toggles (inside kre-issue-card)
   ============================================================ */
.smg-settings-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.smg-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.smg-setting-row:last-child { border-bottom: none; }

.smg-setting-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.smg-setting-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    opacity: 1;
}

.smg-setting-desc {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    opacity: 1;
}

/* Toggle switch */
.smg-toggle {
    width: 36px;
    height: 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: background 0.25s;
}

.smg-toggle--on {
    background: var(--primary-color);
}

.smg-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.smg-toggle--on .smg-toggle-knob {
    transform: translateX(16px);
}

.smg-pattern-tag {
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    background: rgba(255,85,0,0.15);
    color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 6px;
    flex-shrink: 0;
    opacity: 1;
}


/* ============================================================
   SECTION 3 — Include/skip badges (in kre-table)
   ============================================================ */
.smg-include-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
}

.smg-inc--yes {
    background: rgba(40,167,69,0.1);
    color: #28a745;
}

.smg-inc--no {
    background: rgba(108,117,125,0.1);
    color: #6c757d;
}


/* ============================================================
   SECTION 4 — Submission checklist (inside kre-serp-card)
   ============================================================ */
.smg-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.smg-check-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.04);
    transition: all 0.2s;
}

.smg-step--done {
    background: rgba(40,167,69,0.07);
    border-color: rgba(40,167,69,0.2);
}

.smg-step--active {
    background: rgba(255,85,0,0.09);
    border-color: rgba(255,85,0,0.3);
}

.smg-step--pending {
    opacity: 0.45;
}

.smg-step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.smg-step-icon--done {
    background: rgba(40,167,69,0.15);
    border-color: rgba(40,167,69,0.3);
}

.smg-step-icon--active {
    border-color: rgba(255,85,0,0.4);
    background: rgba(255,85,0,0.1);
}

.smg-step-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,85,0,0.25);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: smgSpin 0.7s linear infinite;
}

.smg-step-num {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255,255,255,0.3);
}

.smg-step-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.smg-step-body strong {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    display: block;
}

.smg-step-body span {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    opacity: 1;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .smg-preview {
        flex-direction: column;
        height: auto;
    }

    .smg-crawl-panel {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e8eaed;
    }

    .smg-xml-panel {
        max-height: 160px;
    }
}