/* İçerik Kontrol Aracı — sade, premium, mavi-beyaz denge */
:root {
    --ick-primary: #093c5d;
    --ick-primary-soft: rgba(9, 60, 93, 0.08);
    --ick-border: rgba(9, 60, 93, 0.14);
    --ick-good: #1a7d4b;
    --ick-good-bg: rgba(26, 125, 75, 0.12);
    --ick-warn: #b45309;
    --ick-warn-bg: rgba(180, 83, 9, 0.12);
    --ick-bad: #ba1a1a;
    --ick-bad-bg: rgba(186, 26, 26, 0.12);
    --ick-muted: #5f7686;
}

/* ---------- Inputs ---------- */
.ick-input {
    border: 1px solid var(--ick-border);
    border-radius: 0.75rem;
    background: #fff;
    color: #0b2233;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.ick-input:focus {
    border-color: rgba(9, 60, 93, 0.45);
    box-shadow: 0 0 0 3px rgba(9, 60, 93, 0.1);
}

.ick-hint {
    font-size: 12px;
    color: var(--ick-muted);
}

/* ---------- Editör + toolbar ---------- */
.ick-editor-wrap {
    border: 1px solid var(--ick-border);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.ick-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.6rem;
    background: #f6f9fb;
    border-bottom: 1px solid var(--ick-border);
}

.ick-toolbar__sep {
    width: 1px;
    height: 20px;
    background: var(--ick-border);
    margin: 0 0.35rem;
}

.ick-toolbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 32px;
    height: 32px;
    padding: 0 0.55rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: transparent;
    color: #33586e;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ick-toolbtn:hover {
    background: #fff;
    color: var(--ick-primary);
    border-color: var(--ick-border);
}

.ick-toolbtn.is-active {
    background: var(--ick-primary);
    color: #fff;
}

.ick-toolbtn--ghost {
    height: 28px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ick-muted);
    border-radius: 999px;
    padding: 0 0.7rem;
}

.ick-toolbtn--ghost.is-active {
    background: var(--ick-primary-soft);
    color: var(--ick-primary);
}

.ick-editor {
    min-height: 320px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 1.1rem 1.25rem;
    font-size: 15px;
    line-height: 1.75;
    color: #17303f;
    outline: none;
}

.ick-editor:empty::before {
    content: attr(data-placeholder);
    color: #9fb2bd;
    pointer-events: none;
}

.ick-editor h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.3; margin: 0.6em 0 0.35em; color: var(--ick-primary); }
.ick-editor h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.35; margin: 0.7em 0 0.3em; color: #123f5c; }
.ick-editor h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.4; margin: 0.6em 0 0.25em; color: #1b4b68; }
.ick-editor p { margin: 0 0 0.85em; }
.ick-editor ul { margin: 0 0 0.85em 1.25em; list-style: disc; }
.ick-editor a { color: #1d6fb8; text-decoration: underline; }

.ick-source {
    display: none;
    width: 100%;
    min-height: 320px;
    max-height: 60vh;
    padding: 1.1rem 1.25rem;
    border: 0;
    outline: none;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #17303f;
}

.ick-editor-wrap.is-source .ick-editor { display: none; }
.ick-editor-wrap.is-source .ick-source { display: block; }

/* ---------- Link mini form ---------- */
.ick-link-form {
    border: 1px solid var(--ick-border);
    border-radius: 1rem;
    background: #f6f9fb;
    padding: 1rem;
}

/* ---------- Butonlar ---------- */
.ick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ick-btn--sm { padding: 0.5rem 0.85rem; font-size: 13px; }

.ick-btn--primary { background: var(--ick-primary); color: #fff; }
.ick-btn--primary:hover { background: #0b476e; }

.ick-btn--ghost {
    background: #fff;
    color: #33586e;
    border-color: var(--ick-border);
}
.ick-btn--ghost:hover { color: var(--ick-primary); border-color: rgba(9, 60, 93, 0.35); }

.ick-btn--danger { color: var(--ick-bad); }
.ick-btn--danger:hover { color: var(--ick-bad); border-color: rgba(186, 26, 26, 0.35); background: var(--ick-bad-bg); }

/* ---------- Metrik kartları ---------- */
.ick-card {
    border: 1px solid var(--ick-border);
    border-radius: 1.1rem;
    background: #fff;
    padding: 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(9, 60, 93, 0.03);
}

.ick-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.ick-card__title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 13px;
    font-weight: 700;
    color: #12384f;
}

.ick-metric {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ick-primary);
    line-height: 1.1;
}

.ick-metric__unit { font-size: 0.8rem; font-weight: 600; color: var(--ick-muted); }

.ick-subnote { font-size: 12px; color: var(--ick-muted); margin-top: 0.2rem; }

.ick-note {
    font-size: 12.5px;
    line-height: 1.55;
    color: #46647a;
    margin-top: 0.55rem;
}
.ick-note:empty { display: none; }

.ick-notes {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.ick-notes:empty { display: none; }

.ick-notes li {
    position: relative;
    padding-left: 1.25rem;
    font-size: 12.5px;
    line-height: 1.5;
    color: #46647a;
}

.ick-notes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.ick-notes li.is-good { color: var(--ick-good); }
.ick-notes li.is-warn { color: var(--ick-warn); }
.ick-notes li.is-bad { color: var(--ick-bad); }

/* ---------- Durum etiketi ---------- */
.ick-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #eef2f5;
    color: var(--ick-muted);
    white-space: nowrap;
}
.ick-badge--good { background: var(--ick-good-bg); color: var(--ick-good); }
.ick-badge--warn { background: var(--ick-warn-bg); color: var(--ick-warn); }
.ick-badge--bad { background: var(--ick-bad-bg); color: var(--ick-bad); }

/* ---------- Chips ---------- */
.ick-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ick-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.6rem;
    background: var(--ick-primary-soft);
    color: #234f68;
    font-size: 12px;
    font-weight: 600;
}
.ick-chip b { color: var(--ick-primary); font-weight: 800; }

/* ---------- Frekans listeleri ---------- */
.ick-freq { display: flex; flex-direction: column; gap: 0.35rem; }
.ick-freq:empty::after {
    content: 'Analiz için içerik ekleyin.';
    font-size: 12.5px;
    color: var(--ick-muted);
}
.ick-freq li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.6rem;
    font-size: 12.5px;
    color: #33586e;
    padding: 0.3rem 0.5rem;
    border-radius: 0.5rem;
    background: #f7fafc;
}
.ick-freq li .ick-freq__word { font-weight: 600; color: #17303f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ick-freq li .ick-freq__count { font-variant-numeric: tabular-nums; color: var(--ick-primary); font-weight: 700; }
.ick-freq li .ick-freq__pct { font-variant-numeric: tabular-nums; color: var(--ick-muted); min-width: 44px; text-align: right; }

/* ---------- Skor kartı ---------- */
.ick-score-ring {
    --val: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ick-primary);
    background:
        radial-gradient(closest-side, #fff 74%, transparent 75% 100%),
        conic-gradient(var(--ring-color, var(--ick-primary)) calc(var(--val) * 1%), #e6edf1 0);
}

/* ---------- Kopyalama geri bildirimi ---------- */
.ick-btn.is-done {
    color: var(--ick-good) !important;
    border-color: rgba(26, 125, 75, 0.4) !important;
    background: var(--ick-good-bg) !important;
}

/* Dark mode (public tema karanlıkken okunabilir kalsın) */
.dark .ick-card,
.dark .ick-editor-wrap,
.dark .ick-input,
.dark .ick-link-form,
.dark .ick-btn--ghost {
    background: #12222f;
    border-color: rgba(120, 150, 165, 0.28);
    color: #dce8f0;
}
.dark .ick-toolbar { background: #0f1d29; }
.dark .ick-editor,
.dark .ick-source { color: #dce8f0; }
.dark .ick-freq li { background: #162835; }
.dark .ick-metric,
.dark .ick-chip b { color: #6db5e6; }
.dark .ick-card__title { color: #cfe0ea; }
