/* My Epiphany bookmarks: button, toast, account-panel link and the My bookmarks page
   Sizes are in px on purpose: Bootstrap 3 sets html { font-size: 10px }, which would
   shrink any rem-based sizes to 62.5%. */

/* ---------- Bookmark button ---------- */
.me-bm {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    padding: 6px 14px 6px 10px;
    border: 2px solid #009EE3;
    border-radius: 999px;
    background: #fff;
    color: #009EE3;
    font: 600 14px/1.2 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color .2s, color .2s, transform .1s;
    vertical-align: middle;
}

.me-bm:hover { background: #E6F2F9; }
.me-bm:active { transform: scale(.97); }
.me-bm:focus-visible { outline: 3px solid #19adfd; outline-offset: 2px; }
.me-bm:disabled { cursor: progress; opacity: .7; }

.me-bm__icon {
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    transition: fill .2s;
}

.me-bm[aria-pressed="true"] {
    background: #009EE3;
    color: #fff;
}

.me-bm[aria-pressed="true"]:hover { background: #0A85BB; border-color: #0A85BB; }
.me-bm[aria-pressed="true"] .me-bm__icon { fill: currentColor; }

/* Icon-only version (used on the My bookmarks list) */
.me-bm--icon { padding: 6px; }
.me-bm--icon .me-bm__label {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Toast ---------- */
.me-bm-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 2000;
    max-width: min(480px, calc(100vw - 32px));
    padding: 12px 18px;
    border-radius: 6px;
    background: #222;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    font: 15px/1.4 'Open Sans', system-ui, sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition: opacity .25s, transform .25s, visibility 0s linear .25s;
}

.me-bm-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.me-bm-toast a {
    display: inline;
    margin-left: 6px;
    color: #7fd3ff;
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- "My bookmarks" link in the account pop-up ---------- */
.me-bm-account { margin: 0 0 14px; }

.me-bm-account-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #009EE3;
    font-weight: 700;
}

.me-bm-account-link svg { fill: currentColor; }
.me-bm-account-link:hover { color: #095B7D; }

/* ---------- My bookmarks page ---------- */
.me-bml {
    max-width: 900px;
    margin: 0 auto;
    padding: 120px 16px 70px;      /* clears the fixed header */
    color: #444;
    font-size: 16px;
    line-height: 1.6;
}

.me-bml__title {
    margin: 0 0 6px;
    color: #252525;
    line-height: 1.2;
    font-size: clamp(28px, 2vw + 18px, 36px);
    font-weight: 600;
    text-transform: uppercase;
}

.me-bml__intro { margin: 0 0 30px; }

.me-bml__group { margin: 0 0 40px; }

.me-bml__group h2 {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #009EE3;
    color: #252525;
    font-size: 22px;
    font-weight: 600;
}

.me-bml__count { color: #009EE3; font-size: 16px; font-weight: 600; }

.me-bml__list { margin: 0; padding: 0; list-style: none; }

.me-bml__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 4px;
    border-bottom: 1px solid #e3e3e3;
    transition: opacity .25s;
}

.me-bml__item.is-removed { opacity: .45; }
.me-bml__item.is-removed .me-bml__link { text-decoration: line-through; }

.me-bml__thumb {
    flex: none;
    width: 120px;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background: #ddd;
    object-fit: cover;
}

.me-bml__text { flex: 1; min-width: 0; }

.me-bml__link {
    display: inline;
    color: #252525;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.me-bml__link:hover { color: #009EE3; }

.me-bml__meta {
    margin: 4px 0 0;
    padding: 0;
    color: #777;
    font-size: 14px;
    line-height: 1.4;
}

.me-bml__empty,
.me-bml__signin {
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.me-bml__btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 28px;
    border: 0;
    font-size: 16px;
    border-radius: 4px;
    background: #009EE3;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.me-bml__btn:hover { background: #0A85BB; color: #fff; }

@media (max-width: 560px) {
    .me-bml__thumb { width: 88px; }
    .me-bml__item { gap: 10px; }
}
