/* Bookmark button (under the post title) and the account page list (#86). */

.cca-bookmark{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

/*
 * Matches the site's pill buttons: bold text, gray (#eee) fill when off like the category and
 * author pills, and a solid color when on like the like button and edition badges.
 */
.cca-bookmark__button{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 4px 14px;
    box-sizing: border-box;
    border: 0;
    border-radius: 20px;
    background: #eee;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.cca-bookmark__button[hidden]{
    display: none;
}

.cca-bookmark__button:hover{
    background: #ddd;
    color: #333;
}

.cca-bookmark__button:disabled{
    opacity: 0.6;
    cursor: wait;
}

.cca-bookmark__button .far,
.cca-bookmark__button .fas{
    width: 1em;
    color: #555;
    text-align: center;
}

.cca-bookmark__toggle.is-active,
.cca-bookmark__toggle.is-active:hover{
    background: #0e9cf7;
    color: #fff;
}

.cca-bookmark__toggle.is-active .fas{
    color: #fff;
}

.cca-bookmark__notify.is-active,
.cca-bookmark__notify.is-active:hover{
    background: #ff8a00;
    color: #fff;
}

.cca-bookmark__notify.is-active .fas{
    color: #fff;
}

/* Phones: smaller text and padding so the like, bookmark and notification buttons fit on one row. */
@media screen and (max-width: 480px){
    .cca-bookmark{
        gap: 6px;
    }

    .post-info-wrapper .post-info-actions{
        gap: 6px;
    }

    .cca-bookmark__button{
        gap: 4px;
        padding: 4px 10px;
        font-size: 13px;
    }
}

/* Success messages are read out only, so the row does not shift; errors are shown. */
.cca-bookmark__status:not(.is-error){
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.cca-bookmark__status.is-error{
    font-size: 13px;
    color: #c0392b;
}

.cca-setting-section ul.cca-bookmark-list{
    margin: 0;
    padding: 0;
    list-style: none;
}

.cca-setting-section .cca-bookmark-list__item{
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cca-bookmark-list__link{
    display: flex;
    flex: 1 1 260px;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #333;
    text-decoration: none;
}

.cca-bookmark-list__link:hover .cca-bookmark-list__title{
    text-decoration: underline;
}

/* 16:9 like the entry cards; posts without a thumbnail show the theme's "no image". */
.cca-bookmark-list__thumb{
    flex: 0 0 auto;
}

.cca-bookmark-list__thumb img{
    display: block;
    width: 160px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    background: #eee;
}

@media screen and (max-width: 480px){
    .cca-bookmark-list__thumb img{
        width: 120px;
        height: 68px;
    }
}

.cca-bookmark-list__body{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cca-bookmark-list__title{
    font-weight: bold;
    word-break: break-all;
}

.cca-bookmark-list__meta{
    font-size: 13px;
    color: #777;
}

.cca-bookmark-list__actions{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.cca-bookmark-list .cca-bookmark-list__actions .cca-setting-form,
.cca-bookmark-list .cca-bookmark-list__actions .cca-setting-form + .cca-setting-form{
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
}

.cca-bookmark-list__remove{
    min-height: 34px;
    padding: 4px 14px;
    border: 0;
    border-radius: 20px;
    background: #eee;
    color: #b03030;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.cca-bookmark-list__remove:hover{
    background: #ddd;
}

.cca-bookmark-page__empty{
    color: #666;
}
