.gl-account-page { margin: 0 auto; padding: 20px 0 60px; }
.gl-account-page .page-title h1 { margin-bottom: 20px; }

.gl-notice { padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; font-size: 14px; }
.gl-notice-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e1c3; }
.gl-notice-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }
.gl-notice-warning { background: #fff8e1; color: #8a6d3b; border: 1px solid #f0e0a8; }

.gl-account-form p { margin-bottom: 14px; }
.gl-account-form label { display: block; margin-bottom: 4px; font-weight: 600; font-size: 14px; }
.gl-account-form input[type="text"],
.gl-account-form input[type="email"],
.gl-account-form input[type="password"] {
    width: 100%; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px;
}
.gl-account-form select {
    padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; background: #fff;
}

.gl-btn-primary, .gl-btn-secondary, .gl-btn-danger {
    display: inline-block; padding: 10px 22px; border-radius: 4px; cursor: pointer; font-size: 14px;
    border: 1px solid transparent; text-decoration: none; line-height: 1.4;
}
.gl-btn-primary { background: #1e73be; color: #fff; }
.gl-btn-primary:hover { background: #185a96; color: #fff; }
.gl-btn-secondary { background: #fff; border-color: #ccc; }
.gl-btn-secondary:hover { background: #f5f5f5; }
.gl-btn-danger { background: #fff; border-color: #e0a0a0; color: #c0392b; }
.gl-btn-danger:hover { background: #fdecea; }

.gl-telegram-verify-banner p:first-child { margin: 0 0 10px; }
.gl-telegram-verify-banner p:last-child { margin: 0; }

.gl-hint { color: #777; font-size: 13px; margin: -6px 0 16px; }

/* Left-sidebar account page layout */
.gl-account-layout { display: flex; gap: 28px; align-items: flex-start; }

.gl-account-sidebar { width: 230px; flex-shrink: 0; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
.gl-account-sidebar a, .gl-account-sidebar-btn {
    display: block; width: 100%; padding: 11px 14px; margin-bottom: 2px; border-radius: 6px;
    color: #333; text-decoration: none; font-size: 14px; text-align: left;
    background: none; border: none; cursor: pointer; font-family: inherit;
}
.gl-account-sidebar a:hover, .gl-account-sidebar-btn:hover { background: #f5f7fa; }
.gl-account-sidebar a.active { background: #eaf2fb; color: #1e73be; font-weight: 600; }
.gl-account-sidebar-btn { border-top: 1px solid #eee; margin-top: 10px; padding-top: 14px; border-radius: 0; color: #1e73be; font-weight: 600; }
.gl-account-sidebar a.gl-logout-link { color: #c0392b; }

.gl-account-content { flex: 1; min-width: 0; background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 24px; }

@media (max-width: 767px) {
    .gl-account-layout { flex-direction: column; }
    .gl-account-sidebar { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; }
    .gl-account-sidebar a, .gl-account-sidebar-btn { flex: 1 1 auto; text-align: center; width: auto; }
    .gl-account-sidebar-btn { border-top: none; margin-top: 0; }
}

.gl-account-section { margin-bottom: 36px; }
.gl-account-section:last-child { margin-bottom: 0; }
.gl-account-section h2 { font-size: 16px; margin-bottom: 12px; }

.gl-account-post-list { list-style: none; padding: 0; margin: 0; }
.gl-account-post-list li { padding: 10px 0; border-bottom: 1px solid #eee; }

.gl-account-pagination { display: flex; align-items: center; gap: 14px; margin-top: 16px; font-size: 14px; }

.gl-header-account a { color: #fff; text-decoration: none; padding: 7px 10px; font-weight: bold; text-transform: uppercase; }
.gl-header-account a:hover { color: #fff; opacity: .8; }

.gl-account-empty-state { text-align: center; padding: 40px 20px; color: #666; }
.gl-account-empty-state p { margin-bottom: 16px; }

/* Personalized "Мої новини" feed blocks — reuses front-category card
   markup/classes (see template_part/front-panel-category.php) so it looks
   native to the rest of the site; these two bits are new on top of it. */
.gl-topic-news-block { margin-bottom: 24px; }
.gl-topic-news-block .thumbnail { position: relative; }
.gl-card-meta { display: flex; gap: 10px; font-size: 12px; color: #888; margin-top: 4px; }

.gl-bookmark-btn {
    position: absolute; top: 0; right: 0; width: 36px; height: 36px; border: 1.5px solid #ddd; background: #fff;
    border-radius: 50%; cursor: pointer; color: #888; z-index: 2;
    display: flex; align-items: center; justify-content: center; padding: 0;
}
.gl-bookmark-btn:hover { color: #333; }
.gl-bookmark-btn.is-bookmarked { color: var(--wp-admin-theme-color); border-color: var(--wp-admin-theme-color); }

.gl-bookmark-icon { display: flex; width: 24px; height: 24px; }
.gl-bookmark-icon svg { width: 100%; height: 100%; }
.gl-bookmark-icon-added { display: none; }
.gl-bookmark-btn.is-bookmarked .gl-bookmark-icon-default { display: none; }
.gl-bookmark-btn.is-bookmarked .gl-bookmark-icon-added { display: flex; }

/* Toast feedback ("Додано"/"Видалено") on bookmark toggle */
.gl-bookmark-toast {
    position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(10px);
    background: #2b2b2b; color: #fff; padding: 10px 20px; border-radius: 6px; font-size: 14px;
    z-index: 2000; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.gl-bookmark-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Topic picker pills (settings modal) */
.gl-topics-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.gl-topic-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px;
    background: #f2f2f2; color: #333; font-size: 13px; font-weight: 400; cursor: pointer; width: auto;
    border: 1px solid transparent; user-select: none; transition: all 0.3s;
}
.gl-topic-pill:hover { background: #7c7c7c; }
.gl-topic-pill.is-selected { background: #2b2b2b; color: #fff; }
.gl-topic-pill-icon { font-size: 14px; }

/* Мої добірки: static (non-toggleable) topic pills + day-grouped feed */
.gl-digest-title { font-size: 26px; margin-bottom: 4px; }

.gl-digest-topics { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 28px; }
.gl-topic-pill-static { background: #2b2b2b; color: #fff; cursor: default; }
.gl-topic-pill-add {
    width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid #ddd;
    font-size: 18px; line-height: 1; padding: 0; display: inline-flex; align-items: center; justify-content: center;
}
.gl-topic-pill-add:hover { background: #f5f5f5; }

.gl-digest-day { margin-bottom: 32px; }
.gl-digest-day .thumbnail { position: relative; }
/* Unlike "Мої новини" (gl-topic-news-block also carries the homepage's
   .front-category class, so css/main.css's ".front-category .thumbnail img"
   rule already stretches it), these cards aren't wrapped in .front-category
   — without this, the image sits at its native size instead of filling
   the card. */
.gl-digest-day .thumbnail img {
    width: 100%; height: 120px; object-fit: cover; object-position: center; display: block;
}
.gl-digest-day-badge {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    width: 114px; height: 58px; background: var(--wp-admin-theme-color); color: #fff; border-radius: 10px; margin-bottom: 16px;
    text-transform: uppercase; line-height: 1.15;
}
.gl-digest-day-number { font-size: 20px; font-weight: 700; }
.gl-digest-day-month, .gl-digest-day-weekday { font-size: 9px; }

.gl-digest-flag {
    position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.9); color: #333;
    font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 4px; z-index: 2;
}

/* "Послухати" narration control (near article titles, single.php + endless-feed.php) */
.gl-narration { margin: 8px 0 16px; }
.gl-narration-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 20px;
    background: #f2f2f2; border: 1px solid transparent; color: #333; font-size: 13px; cursor: pointer;
}
.gl-narration-btn:hover { background: #e8e8e8; }
.gl-narration-btn:disabled { opacity: .7; cursor: default; }
.gl-narration-icon { font-size: 14px; }
.gl-narration-audio { display: block; width: 100%; max-width: 420px; height: 36px; }
.gl-narration-error { color: #c0392b; font-size: 13px; margin: 6px 0 0; }

/* Connected accounts (Захист і вхід tab) */
.gl-connected-accounts { border: 1px solid #eee; border-radius: 6px; }
.gl-connected-account { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 14px; }
.gl-connected-account + .gl-connected-account { border-top: 1px solid #eee; }
.gl-connected-badge { color: #1e7e34; font-weight: 600; font-size: 13px; }

/* Settings modal (Bootstrap 3) */
#gl-settings-modal .modal-dialog { width: 1024px; max-width: 95vw; }
#gl-settings-modal .modal-body { padding: 0; }
.gl-modal-layout { display: flex; align-items: stretch; min-height: 420px; }

.gl-modal-tabs { width: 230px; flex-shrink: 0; border-right: 1px solid #eee; padding: 16px 10px; margin: 0; }
.gl-modal-tabs > li { list-style: none; }
.gl-modal-tabs > li > a {
    display: block; padding: 11px 14px; margin-bottom: 2px; border-radius: 6px;
    color: #333; text-decoration: none; font-size: 14px;
}
.gl-modal-tabs > li > a:hover { background: #f5f7fa; }
.gl-modal-tabs > li.active > a { background: #eaf2fb; color: #1e73be; font-weight: 600; }

.gl-modal-content { flex: 1; min-width: 0; padding: 24px; }
.gl-modal-content .tab-pane h2:first-child { margin-top: 0; }

/* Bootstrap's tab.js only toggles the .active class via JS — the actual
   show/hide of inactive panes normally comes from bootstrap.min.css, which
   this theme deliberately doesn't load (only bootstrap.min.js is enqueued
   in inc/scripts.php). Without these two rules every .tab-pane stays
   visible at once regardless of which tab is "active". */
.gl-modal-content .tab-pane { display: none; }
.gl-modal-content .tab-pane.active { display: block; }

@media (max-width: 767px) {
    .gl-modal-layout { flex-direction: column; }
    .gl-modal-tabs { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; border-right: none; border-bottom: 1px solid #eee; }
}
