/* ==========================================================================
   NOTIFORGE — BİLEŞENLER
   Eskiden HTML/JS içinde satır içi (style="...") duran stiller burada.
   Yalnızca theme.css token'larını kullanır; sabit renk yazılmaz.
   ========================================================================== */

/* ---------- İkonlar (js/utils/icons.js) ---------- */
.icon {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: -0.2em;
}
.icon-inline { width: 1em; height: 1em; vertical-align: -0.15em; }
.text-accent { color: var(--accent-text); }

.file-preview-icon {
    display: inline-grid;
    place-items: center;
    color: var(--accent-text);
    font-size: 1.15rem;
}

/* ---------- Ortak düğmeler ---------- */
.btn-primary { color: var(--on-accent); }
.tab-btn.active { color: var(--on-accent); }
.card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border: none;
    font-weight: 700;
    cursor: pointer;
}
.btn-danger:hover { filter: brightness(0.95); }

/* ---------- Üst bar & misafir bandı ---------- */
.header-brand { cursor: pointer; }
.brand-logo-mark { color: var(--accent-text); }
.brand-logo-mark .icon { width: 1.35rem; height: 1.35rem; }

.guest-banner {
    background: var(--accent);
    color: var(--on-accent);
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
    justify-content: center;
    align-items: center;
    gap: var(--sp-3);
    box-shadow: var(--shadow-sm);
}
.guest-banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    color: var(--accent-ink);
    border: none;
    border-radius: var(--r-pill);
    padding: 4px 14px;
    font-size: var(--fs-xs);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}
.guest-banner-btn:hover { transform: translateY(-1px); }

/* ---------- Ana sayfa ---------- */
.home-feed-container {
    max-width: 680px;
    margin: 0 auto;
    padding-bottom: 5rem;
}
.home-next-review-card { cursor: pointer; }

.recording-left,
.recording-actions { display: flex; align-items: center; gap: var(--sp-2); }
.recording-actions { gap: 6px; }
.recording-label { font-size: var(--fs-xs); color: var(--text-muted); }
.recording-btn-stop { display: inline-flex; align-items: center; gap: 6px; }
.recording-btn-cancel,
.thought-remove-btn,
.thought-close-btn { display: inline-grid; place-items: center; }

.thought-status-spinner {
    display: inline-grid;
    place-items: center;
    color: var(--accent-text);
    animation: spinSlow 2s linear infinite;
}
.thought-result-badge-icon { display: inline-grid; place-items: center; color: var(--success); }
.thought-result-icon { display: inline-grid; place-items: center; color: var(--accent-text); }
.thought-result-inspect-btn .icon { width: 0.9em; height: 0.9em; }

.mini-result-answer { flex-direction: column; gap: 6px; margin-top: var(--sp-2); }
.mini-result-ref-list { flex-direction: column; gap: 6px; }
.mini-ref-title { font-weight: 600; font-size: var(--fs-sm); color: var(--text); }
.mini-ref-sub { font-size: var(--fs-xs); color: var(--text-muted); }

.skeleton-feed { height: 76px; border-radius: var(--r-lg); }
.skeleton-lib { height: 110px; border-radius: var(--r-lg); margin-bottom: 10px; }

.feed-avatar-circle .icon { width: 16px; height: 16px; }
.feed-avatar-counter { font-size: 0.75rem; font-weight: 800; }

/* Aylık takvim modalı */
.cal-modal { z-index: 10000; padding: var(--sp-4); }
.cal-card {
    background: var(--surface);
    max-width: 420px;
    border-radius: var(--r-xl);
    padding: var(--sp-5);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.cal-head { display: flex; justify-content: space-between; align-items: center; }
.cal-head-titles { text-align: center; }
.cal-month-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}
.cal-month-sub { font-size: var(--fs-2xs); color: var(--text-muted); font-weight: 700; }
.cal-nav-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
    color: var(--text);
}
.cal-nav-btn:hover { background: var(--surface-3); }
.cal-weekdays,
.cal-days-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--sp-1); }
.cal-weekdays { text-align: center; font-size: var(--fs-2xs); font-weight: 800; color: var(--text-muted); }
.cal-weekend { color: var(--danger); }
.cal-legend {
    display: flex;
    justify-content: center;
    gap: var(--sp-3);
    font-size: var(--fs-2xs);
    font-weight: 700;
    color: var(--text-muted);
    padding: 6px var(--sp-2);
    border-radius: var(--r-sm);
    border: 1px solid var(--border);
}
.cal-legend > span { display: flex; align-items: center; gap: var(--sp-1); }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.cal-dot-review { background: var(--info); }
.cal-dot-done { background: var(--success); }
.cal-dot-task { background: var(--warning); }
.cal-day-details {
    background: var(--bg-primary);
    border-radius: var(--r-md);
    padding: 10px var(--sp-3);
    border: 1px solid var(--border-strong);
    font-size: var(--fs-sm);
}
.cal-close-btn {
    width: 100%;
    background: var(--accent);
    color: var(--on-accent);
    border: none;
    padding: 10px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: var(--fs-sm);
    cursor: pointer;
}
.cal-close-btn:hover { background: var(--accent-hover); }

/* ---------- Kütüphane ---------- */
.lib-header-actions { display: flex; gap: 6px; }
.lib-search-icon { display: grid; place-items: center; }
.lib-search-btn-clear { display: grid; place-items: center; }
.lib-tab-label { display: inline-flex; align-items: center; gap: 6px; }
.lib-synthesis-icon-box { color: var(--accent-text); }
.lib-search-pill:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

/* ---------- Tekrar ---------- */
.review-container { max-width: 550px; margin: 0 auto; padding-bottom: 3rem; }

.review-analytics { padding: 14px var(--sp-4); margin-bottom: 14px; }
.review-analytics-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-2);
    margin-bottom: 10px;
}
.review-analytics-title {
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    color: var(--text);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin: 0;
}
.review-analytics-title .icon { color: var(--accent-text); }
.retention-badge {
    background: var(--success-soft);
    color: var(--success);
    font-weight: 700;
    font-size: var(--fs-xs);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

.maturity-box {
    background: var(--surface-2);
    padding: 10px var(--sp-3);
    border-radius: var(--r-md);
}
.maturity-head {
    font-size: var(--fs-2xs);
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    gap: var(--sp-2);
    margin-bottom: 6px;
}
.maturity-counts { display: inline-flex; gap: 10px; }
.mat-count { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.mat-count::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.maturity-bar {
    display: flex;
    height: 8px;
    border-radius: var(--r-xs);
    overflow: hidden;
    background: var(--surface-3);
}
.maturity-seg { transition: width 0.5s ease; }
.maturity-legend {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px var(--sp-2);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 600;
}
.maturity-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.maturity-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
/* renk: arka planlı bar parçası + yazı rengi aynı token'dan */
.seg-learning  { --seg: var(--danger); }
.seg-reviewing { --seg: var(--warning); }
.seg-mastered  { --seg: var(--success); }
.maturity-seg, .maturity-dot { background: var(--seg); }
.mat-count { color: var(--seg); }

.review-tabs {
    background: var(--surface-3);
    padding: 4px;
    border-radius: var(--r-md);
    margin-bottom: 14px;
    gap: 4px;
}
.review-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--sp-2) 2px;
    border: none;
    border-radius: var(--r-sm);
    font-weight: 700;
    font-size: var(--fs-xs);
    cursor: pointer;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
}
.review-tab-btn:hover { color: var(--text); }
.review-tab-btn.active { background: var(--accent); color: var(--on-accent); }
.review-tab-btn .icon { width: 14px; height: 14px; }
.review-tab-count { opacity: 0.85; font-size: var(--fs-2xs); }
@media (max-width: 420px) {
    .review-tab-btn .icon { display: none; }
}

.review-skeleton { padding: var(--sp-6); min-height: 220px; }
.review-skeleton .sk-pill { width: 110px; height: 20px; border-radius: var(--r-md); margin-bottom: var(--sp-3); }
.review-skeleton .sk-title { width: 90%; height: 26px; border-radius: var(--r-sm); margin-bottom: 10px; }
.review-skeleton .sk-line { width: 70%; height: 18px; border-radius: var(--r-xs); margin-bottom: var(--sp-5); }
.review-skeleton .sk-button { width: 100%; height: 46px; border-radius: var(--r-md); }

/* ---------- Profil ---------- */
.profile-container { max-width: 560px; margin: 0 auto; }
.profile-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-3);
    padding: var(--sp-5) var(--sp-4);
    background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg-secondary) 85%);
}
.profile-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border: 3px solid var(--surface);
    box-shadow: 0 0 0 2px var(--accent), var(--shadow-md);
    flex-shrink: 0;
}
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-initial { font-size: 1.6rem; font-weight: 700; color: var(--accent-text); }
.profile-user-meta { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.profile-name { font-size: 1.15rem; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.profile-email { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; overflow-wrap: anywhere; }
.profile-chip {
    margin-top: var(--sp-2);
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-size: var(--fs-xs);
    font-weight: 700;
}
.profile-chip[hidden] { display: none; }

.profile-section { margin-top: var(--sp-4); }
.profile-section-title {
    font-size: var(--fs-base);
    color: var(--text);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.profile-section-title .icon { color: var(--accent-text); }
.profile-section-desc {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: var(--sp-4);
}

/* Küçük, büyük harfli grup etiketleri */
.profile-group-label {
    margin: var(--sp-5) var(--sp-2) var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.profile-group-danger { color: var(--danger); }

/* Tercihler kartı: ayırıcılı satırlar */
.profile-prefs { padding: 0; }
.profile-row { padding: var(--sp-3) var(--sp-4); display: flex; flex-direction: column; gap: 10px; }
.profile-row + .profile-row { border-top: 1px solid var(--border); }
.profile-row-label {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: .92rem;
    font-weight: 700;
    color: var(--text);
}
.profile-row-label .icon { color: var(--accent-text); }
.profile-section .profile-row-label { margin-bottom: .4rem; }

/* Dil seçici: segmentli kontrol */
.profile-lang-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }

.profile-upgrade-card { border: 1px solid rgba(var(--accent-rgb), 0.3); background: var(--accent-soft); }
.profile-upgrade-card .profile-section-title { color: var(--accent-ink); }
.profile-upgrade-btn {
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: var(--r-md);
    padding: var(--sp-3);
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.profile-upgrade-btn:hover { background: var(--accent-hover); }
.profile-upgrade-btn:disabled { opacity: .6; cursor: default; }

/* Takvim butonu: marka mavisi yerine tema vurgusu (4.5:1 kontrast) */
.btn-google {
    background: var(--accent);
    color: var(--on-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    width: 100%;
    min-height: 48px;
}
.btn-google:hover { background: var(--accent-hover); }
.btn-google-logo { width: 20px; height: 20px; background: #fff; border-radius: 50%; padding: 2px; }

/* Çıkış: yıkıcı değil, nötr çerçeveli */
.profile-logout-btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: transparent;
    border: 1.5px solid var(--border-strong);
    color: var(--text);
    border-radius: var(--r-md);
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--sp-6);
    transition: background .2s ease, border-color .2s ease;
}
.profile-logout-btn:hover { background: var(--surface-2); }

/* Tehlikeli bölge */
.profile-delete-wrap { margin-bottom: var(--sp-6); }
.profile-delete-btn {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3);
    background: transparent;
    border: 1.5px solid rgba(var(--danger-rgb), 0.45);
    border-radius: var(--r-md);
    color: var(--danger);
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}
.profile-delete-btn:hover { background: var(--danger-soft); }
.profile-delete-btn:disabled { opacity: .6; cursor: default; }

/* ---------- Sohbet ---------- */
.chat-view-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    position: relative;
}
.popover-icon,
.tip-icon { display: inline-grid; place-items: center; color: var(--accent-text); }
.voice-cancel-action-btn { display: inline-flex; align-items: center; gap: 4px; }

/* Küçük onay pencereleri (yeniden adlandır / sil) */
.chat-dialog { z-index: 1100; }
.dialog-card { max-width: 400px; padding: var(--sp-5); border-radius: var(--r-lg); }
.dialog-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.dialog-title-danger { color: var(--danger); }
.dialog-text { font-size: var(--fs-sm); color: var(--text); margin-bottom: 6px; }
.dialog-desc { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-4); }
.dialog-input { width: 100%; box-sizing: border-box; margin-bottom: var(--sp-4); }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--sp-2); }
.dialog-btn { width: auto; padding: 7px var(--sp-4); font-size: var(--fs-sm); border-radius: var(--r-sm); }

/* Eskiden tanımsızdı; işlem durumu ikonunun dönmesi için */
@keyframes spinSlow { to { transform: rotate(360deg); } }

.profile-connected-badge {
    display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
    background: rgba(var(--success-rgb), 0.15);
    border: 1px solid var(--success);
    color: var(--success);
    padding: 10px 14px;
    border-radius: var(--r-md);
    font-weight: 700;
    font-size: var(--fs-sm);
}
.profile-avatar-initial .icon { width: 30px; height: 30px; }

/* Takvim durumu: rozet + bağlantıyı kes */
.profile-calendar-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.profile-calendar-status .profile-connected-badge { flex: 1 1 auto; justify-content: flex-start; min-height: 44px; }
.profile-disconnect-btn {
    min-height: 44px;
    padding: 0 var(--sp-4);
    background: transparent;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}
.profile-disconnect-btn:hover { background: var(--surface-2); }
.profile-disconnect-btn:disabled { opacity: .6; cursor: default; }
