/* Guardados (js/bookmarks.js) */

/* ─── Botón de guardar ───────────────────────────────────────────────────────
   En noticias lleva .meta-badge y toma el formato del "me gusta"; aquí solo su
   color. En páginas va en la barra del título. */

.post-header .bookmark {
    background: rgb(0, 120, 160);
    color: #fff;
}

.post-header .bookmark.is-saved {
    background: rgb(28, 140, 70);
}

.ht-bookmark.is-busy {
    opacity: 0.6;
    pointer-events: none;
}

/* En la barra del título de las páginas: solo el icono, sin etiqueta. */
.ht-bookmark-page {
    float: right;
    margin: 9px 12px 0 0;
    padding: 2px 4px;
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
}

.ht-bookmark-page:hover {
    opacity: 1;
    transform: scale(1.15);
}

.ht-bookmark-page.is-saved,
.ht-bookmark-page.is-saved i {
    opacity: 1;
    color: #ffcb00;
}

.post-header .bookmark:hover {
    filter: brightness(1.1);
}

.ht-bookmark i {
    color: #fff;
}

/* ─── Mis guardados ───────────────────────────────────────────────────────── */

.ht-bm-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.ht-bm-toolbar input,
.ht-bm-toolbar select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid #3fa4c9;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 0.85rem;
}

.ht-bm-search {
    flex: 1 1 200px;
    min-width: 0;
}

.ht-bm-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 120px;
    padding: 8px;
    border: 1px solid #3fa4c9;
    border-radius: 6px;
    background: #bcdadb;
    transition: opacity 0.15s;
}

.ht-bm.is-loading .ht-bm-list {
    opacity: 0.45;
    pointer-events: none;
}

.ht-bm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border: 2px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 73, 96, 0.35);
    background: #fff;
    transition: opacity 0.15s;
}

.ht-bm-item.is-removing {
    opacity: 0.4;
    pointer-events: none;
}

.ht-bm-thumb {
    flex: 0 0 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 10px;
    background: #d4eef5;
    color: #3d6f80;
    font-size: 1.4rem;
}

.ht-bm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ht-bm-info {
    flex: 1;
    min-width: 0;
}

.ht-bm-title {
    display: block;
    overflow: hidden;
    color: #004960;
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ht-bm-title:hover {
    text-decoration: underline;
}

.ht-bm-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    font-size: 0.75rem;
    color: #3d6f80;
}

.ht-bm-chip {
    padding: 1px 7px;
    border-radius: 10px;
    background: #d4eef5;
    color: #004960;
    font-weight: bold;
}

.ht-bm-chip.is-updated {
    background: #e6a100;
    color: #fff;
}

.ht-bm-remove {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0; /* el tema da padding a los botones y descentraba el icono */
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #7f98a3;
    cursor: pointer;
}

.ht-bm-remove:hover {
    background: #fde2e2;
    color: #b00000;
}

.ht-bm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px 10px;
    color: #3d6f80;
}

.ht-bm-empty i {
    font-size: 2.5rem;
    opacity: 0.7;
}

.ht-bm-empty p {
    margin: 0;
    font-weight: bold;
    text-align: center;
}

.ht-bm-pager {
    margin-top: 8px;
}

@media (max-width: 560px) {
    .ht-bm-toolbar select {
        flex: 1 1 45%;
    }
}
