/* ============================================================
   AI Content Checker — Page Styles
   File: ai-content-checker.css
   Builds on top of Rankyfy common.css + keyword-research-extension.css
   Only adds styles not already covered by the base sheets.
   ============================================================ */


/* ============================================================
   HERO — Article panel + detection results panel
   ============================================================ */
.aic-preview {
    display: flex;
    height: 340px;
    background: #f6f7ff;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

/* Left — article being analysed */
.aic-article-panel {
    flex: 1;
    background: #fff;
    border-right: 1px solid #e8eaed;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.aic-article-topbar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: var(--secondary-color);
    flex-shrink: 0;
}

.aic-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aic-article-url {
    font-size: 10px;
    color: rgba(255,255,255,0.35);
    margin-left: 6px;
    background: rgba(255,255,255,0.07);
    padding: 2px 8px;
    border-radius: 4px;
}

.aic-article-body {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}

/* Paragraph blocks with colour-coded left border */
.aic-para {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 10px;
    border-radius: 6px;
    position: relative;
}

.aic-para--ai    { background: rgba(220,53,69,0.05);  border: 1px solid rgba(220,53,69,0.15); }
.aic-para--human { background: rgba(40,167,69,0.05);  border: 1px solid rgba(40,167,69,0.15); }
.aic-para--mixed { background: rgba(255,193,7,0.05);  border: 1px solid rgba(255,193,7,0.15); }

.aic-para-bar {
    width: 3px;
    border-radius: 3px;
    flex-shrink: 0;
    align-self: stretch;
    min-height: 30px;
}

.aic-bar--ai    { background: #dc3545; }
.aic-bar--human { background: #28a745; }
.aic-bar--mixed { background: #ffc107; }

.aic-para-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.aic-line {
    height: 7px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.aic-line--full { width: 100%; }

.aic-para-label {
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: flex-start;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.aic-label--ai    { background: rgba(220,53,69,0.15); color: #dc3545; }
.aic-label--human { background: rgba(40,167,69,0.15);  color: #28a745; }
.aic-label--mixed { background: rgba(255,193,7,0.15);  color: #d4a400; }

/* Right — results panel */
.aic-result-panel {
    width: 180px;
    flex-shrink: 0;
    background: var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    gap: 10px;
    overflow: hidden;
}

.aic-result-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    align-self: flex-start;
}

/* Circular ring score */
.aic-score-ring-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.aic-ring-svg {
    width: 80px;
    height: 80px;
}

.aic-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
}

.aic-ring-label strong {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.aic-ring-label span {
    font-size: 9px;
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 1;
}

/* Verdict pill */
.aic-verdict {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
}

.aic-verdict--likely {
    background: rgba(220,53,69,0.2);
    color: #ff6b7a;
    border: 1px solid rgba(220,53,69,0.3);
}

.aic-verdict--mixed {
    background: rgba(255,193,7,0.15);
    color: #ffc107;
    border: 1px solid rgba(255,193,7,0.25);
}

.aic-verdict--human {
    background: rgba(40,167,69,0.15);
    color: #4ddb78;
    border: 1px solid rgba(40,167,69,0.25);
}

/* Mini breakdown rows */
.aic-mini-breakdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 10px;
}

.aic-mini-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
}

.aic-mini-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.aic-mini-row span:not(.aic-mini-dot) {
    flex: 1;
    color: rgba(255,255,255,0.5);
    opacity: 1;
    font-size: 11px;
    text-align: left;
}

.aic-mini-row strong {
    color: rgba(255,255,255,0.85);
    font-size: 11px;
}


/* ============================================================
   SECTION 2 — Paragraph breakdown (inside kre-issue-card)
   ============================================================ */
.aic-para-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.aic-block {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
}

.aic-block--ai    { background: rgba(220,53,69,0.08);  border-color: rgba(220,53,69,0.2); }
.aic-block--human { background: rgba(40,167,69,0.07);  border-color: rgba(40,167,69,0.18); }
.aic-block--mixed { background: rgba(255,193,7,0.06);  border-color: rgba(255,193,7,0.18); }

.aic-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.aic-block-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.aic-badge--ai    { background: rgba(220,53,69,0.2);  color: #ff6b7a; }
.aic-badge--human { background: rgba(40,167,69,0.2);  color: #4ddb78; }
.aic-badge--mixed { background: rgba(255,193,7,0.15); color: #ffc107; }

.aic-block-chars {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    opacity: 1;
}

.aic-block-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.aic-bl {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.aic-bl--full { width: 100%; }


/* ============================================================
   SECTION 3 — AI score pills (inside kre-table)
   ============================================================ */
.aic-score-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.aic-pill--low  { background: rgba(40,167,69,0.1);  color: #28a745; }
.aic-pill--mid  { background: rgba(255,193,7,0.1);  color: #d4a400; }
.aic-pill--high { background: rgba(220,53,69,0.1);  color: #dc3545; }


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .aic-preview {
        flex-direction: column;
        height: auto;
    }

    .aic-article-panel {
        border-right: none;
        border-bottom: 1px solid #e8eaed;
        max-height: 200px;
    }

    .aic-result-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px;
        gap: 12px;
    }

    .aic-mini-breakdown {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        border-top: none;
        padding-top: 0;
    }
}