/* Dính menu head ở đầu trang */
@media (min-width: 414px) {
    .headroom-pinned {
        top: 0px !important;
    }
}
/* Hiệu ứng cho icon khi bấm yêu thích */
.animate-heart {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}


/* Danh sách yêu thích */

/* CSS số thứ tự trong danh sách yêu thích */
#asf-fav-list .fav-item-number {
    flex-shrink: 0;
    margin-right: 2px; 
    display: inline-block;
    font-size: 12px;
    font-weight: normal;
    width: 24px;
    line-height: 18px;
    text-align: right;
    vertical-align: middle;
    border: none;
    min-width: 18px;
    flex-shrink: 0;
}
/* End CSS số thứ tự trong danh sách yêu thích */


#asf-fav-list {
	min-height: 30px;
}

#asf-fav-list .asf-notification {
    background: #DCEDC8;
    padding: 10px;
    margin: 6px 0px;
    border-radius: 10px;
    border: 0;
}
#asf-fav-list .asf-notification a {
    color: #1c7006;
}
#asf-fav-list .asf-notification ul,
#asf-fav-list .asf-notification ol {
    margin: 0;
    padding: 0;
    counter-reset: item;
}
#asf-fav-list .asf-notification li {
    display: block !important;
    position: relative;
    padding-left: 25px;
}
#asf-fav-list .asf-notification li:before {
    content: counter(item) ".";
    counter-increment: item;
    position: absolute;
    left: 0;
}

#asf-fav-list ul,
#asf-fav-random-post ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
#asf-fav-list li,
#asf-fav-random-post li {
    padding: 2px 8px;
}
#asf-fav-list li,
#asf-fav-random-post li {
    display: flex;
    align-items: center;
    gap: 2px; /* khoảng cách giữa các phần tử */
    padding: 4px 0;
    overflow: hidden;
    transition: all 0.4s ease;
    max-height: 100px;
    opacity: 1;
}
#asf-fav-list li a,
#asf-fav-random-post li a {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}

#asf-fav-list .button-play,
#asf-fav-random-post .button-play {
    flex-shrink: 0; /* không bị co lại */
}
#asf-fav-list .asf-remove,
#asf-fav-random-post .asf-remove {
    flex-shrink: 0; /* không bị co lại */
    margin-left: auto; /* đẩy nút delete ra ngoài cùng bên phải */
}

/* Bắt đầu hiệu ứng gạch dưới khi rê chuột vào chuyên mục */
#asf-fav-list h3 a {
    position: relative;
    text-decoration: none;
}

#asf-fav-list h3 a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2d41d7;
    transition: all 0.3s ease;
}

#asf-fav-list h3 a:hover::after {
    left: 0;
    width: 100%;
}
/* Kết thúc hiệu ứng gạch dưới khi rê chuột vào chuyên mục */

/* Nút xóa khỏi danh sách yêu thích */

#asf-fav-list .asf-remove,
#asf-fav-list .asf-clear-all {
    background-color: #e3e3e3;
    color: #2F6179;
    font-size: 80%;
    border: none;
    padding: 2px 10px;
    margin-left: 4px;
    border-radius: 15px;
    cursor: pointer;
    }
    
#asf-fav-list .asf-remove:hover,
#asf-fav-list .asf-clear-all:hover {
    color: #fff;
    background-color: #e81e1e;
    }

/* Nút thêm vào yêu thích trong bài viết */


.asf-fav-button {
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2F6179;
    background-color: #e3e3e3;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border: none;
    font-size: 16px !important;
    border-radius: 0.25rem;
    margin: 5px 0px;
    padding: 3px 12px;
    /* width: 268px; */
    width: 292px;
}

.asf-fav-button:hover,
.asf-fav-button .asf-added:hover {
    color: #fff !important;
    background-color: #2d41d7 !important;
    filter: none !important;
}

.asf-fav-button:hover .asf-fav-button-icon {
    filter: none !important;
}


.asf-fav-button.asf-added {
    background-color: #e3e3e3;
    color: rgb(9, 170, 0);
}

.asf-fav-button.asf-added .asf-fav-button-icon  {
    filter: invert(79%) sepia(161%) saturate(134%) hue-rotate(77deg) brightness(166%) contrast(282%) !important;
}

.asf-fav-button-icon {
    filter: invert(79%) sepia(161%) saturate(134%) hue-rotate(506deg) brightness(166%) contrast(282%);
}

/* Nút thêm vào yêu thích ở link bài viết */
.asf-fav-inline-button {
    vertical-align: middle;
    background: #e3e3e3;
    color: #306179;
    border: none;
    padding: 2px 6px;
    font-size: 50%;
    cursor: pointer;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.asf-fav-inline-button.asf-inline-added {
    background-color: #fbd6cb;
    color: #306179;
}

/* Nút icon ở menu */
#asf-fav-count {
    font-size: 10px;
    font-style: normal;
    line-height: 13px;
    font-weight: normal !important;
    font-size: 10px !important;
    color: #fff;
    position: absolute;
    background: #2d3436;
    border-radius: 4px;
    left: 20px;
    top: 2px;
    min-width: 12px;
    min-height: 12px;
    padding-left: 1px;
    padding-right: 1px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #fff;
    z-index:1;
    display: inline-table;
    box-sizing: content-box;
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box;
}

.asf-fav-menu-widget {
    margin-left: 0px;
    position: relative;
}
.asf-fav-menu-button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 2px;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: #f1f1f2;
}

/* Chuyển sang màu đỏ nếu số yêu thích lớn hơn 0 */
.asf-fav-menu-button .has-favorite {
    color: #fff !important;
    background: #da1030 !important;
  }
  
  /* Hiệu ứng "bump" khi số thay đổi */
  #asf-fav-count.animate-bump {
    animation: fav-bump 0.4s ease;
  }
  
  @keyframes fav-bump {
    0% {
      transform: scale(1);
    }
    30% {
      transform: scale(1.4);
    }
    60% {
      transform: scale(0.9);
    }
    100% {
      transform: scale(1);
    }
  }
  
/* CSS cho thông báo cập nhật */
#asf-fav-list .update-notification {
    background: #DCEDC8;
    padding: 10px;
    margin: 6px 0px;
    border-radius: 10px;
    border: 0;
}


#asf-fav-list .update-notification .update-label {
    color: #1c7006;
    font-weight: 700;
    font-size: 85%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* border-bottom: 2px solid #1c7006; */
    padding-bottom: 1px;
    margin-right: 4px;
}

#asf-fav-list .update-notification strong {
    color: #313131;
}