/** {
    spellcheck: false;
}*/

@import url('https://fonts.googleapis.com/css2?family=Amatic+SC&family=Arvo&family=Bangers&family=Fredoka+One&family=Oswald&family=Orbitron&family=Playfair+Display&family=Staatliches&family=Pacifico&display=swap');

input,
textarea {
    spellcheck: false;
    -webkit-user-modify: read-write-plaintext-only; /* Loại bỏ gợn sóng trên Webkit (Chrome, Safari) */
}


body {
  margin: 0;
  padding: 0;
  background-color: var(--body-color);
  font-size: 14px;
  
}
.hidden {
    display: none;
}

a {
    text-decoration: none;
}


:root{
    --body-color: #E4E9F7;
    --nav-color: #4070F4;
    --side-nav: #010718;
    --text-color: #FFF;
    --search-bar: #F2F2F2;
    --search-text: #010718;
}

    /* Dark mode */
    body.dark {
    --body-color: #18191A;
    --nav-color: #242526;
    --side-nav: #242526;
    --text-color: #000;
    --search-bar: #242526;
}


.no-spellcheck {
    -webkit-text-decoration-skip: none;
    text-decoration: none;
}
[contenteditable] {
    outline: 0px solid transparent;
}

.flex { 
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-content {margin-top: 80px;} 


.container {
    max-width: 2560px;
    width: 90%;    
    margin: 0 auto;
    @media screen and (min-width: 600px) {     
    }
}

@media (min-width: 1260px) {
    .container {
        max-width: 1440px;
    }
}


button { 
  cursor:pointer;
}

.header {
    margin-bottom: 30px;
    position: relative;
    background: #0082e6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header-right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    padding: 0 14px;
}



/* CSS TOOL FONT */

.tester-text-tool {
        display: flex;
    flex-direction: row;
    -webkit-box-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    align-items: stretch;
    border-bottom: 1px solid var(--c-spirits-200);
}
.tester-text-setting {
    padding: 0px 24px;
    display: flex;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    gap: 24px;
    height: 56px;
    width: 100%; 
    

}

#customText {
    border: none;
}
#customText:focus { 
    outline: none;
}
.tester-text-setting-col {
     display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 20px;
}



.tester-text-setting-col .tester-text__custom-pingram{
   display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 20px;
}
/* CSS cho Reset*/
.tester-text-tool-reset {
    padding: 8px;
    font-size: 13px;
    line-height: 10px;
    font-family: var(--ff-h-mt-text-md);
    background: var(--c-transparent);
    border: none;
    width: auto;
    height: auto;
    display: flex
;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
}




/* CSS cho Nhập nội dung */
.tester-text {
    width: 100%;
    position: relative;
}


/* Tạo kiểu cho div thay thế button */
.toggle-button {
    display: inline-flex;
    align-items: center;
    padding: 10px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    user-select: none;
    width: auto;
    justify-content: space-between;
}

/* Hover effect */
.toggle-button:hover {
    background-color: #2980b9;
}

/* Định dạng icon */
.tester-text__icon-arrow {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

/* Khi mở danh sách, thay đổi class riêng */
.icon-rotated {
    transform: rotate(180deg);
}

/* Định dạng danh sách pangram */
#ff_font_pangrams.visible {
    
    position: absolute;
    top: 50px; /* Điều chỉnh để phù hợp với vị trí div */
    left: 0;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    width: 250px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

/* Ẩn/hiện danh sách */
.hidden {
    display: none;
}

.visible {
    display: block;
}



/* CSS cho nút switch */
    .switch {
        position: relative;
        display: inline-block;
        width: 50px;
        height: 25px;
    }
    
    .switch input { display: none; }
    
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        transition: .4s;
        border-radius: 25px;
    }
    
    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 4px;
        bottom: 3.5px;
        background-color: white;
        transition: .4s;
        border-radius: 50%;
    }
    
    input:checked + .slider {
        background-color: #000;
    }
    
    input:checked + .slider:before {
        transform: translateX(25px);
    }


/* End CSS cho nút switch */


/*Layout*/

#fontContainer.grid-view {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.font-cover { 
    overflow: hidden;
    text-align: center;
 }


.font-cover .text h1 {
    font-size: 2em;
    display: inline-block;
    width: 100%;
    text-align: center;
    /* font-weight: 400; */
}


.catItemfont-header {
    display: flex;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    color: var(--c-spirits-700);
/*    width: calc(100% - 100px);*/
    
/*    margin: 0px 0px 16px;*/
    white-space: nowrap;
    padding: 0 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ItemTitleFont {
    width: calc(100% - 30px);
    margin: 0; 
    
}
.ItemTitleFont h2{
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    margin:  0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.itemContainerFont {   
    border-radius:10px; 
}
.itemContainerFont h2 a{        
    color:#0082e6;
    padding: 10px 0px;
    display: block ;
}

/*grid-view*/

#fontContainer.grid-view .font-item {
    width: calc((100% - 60px) / 4); /* 4 cột, 3 khoảng cách 20px */
    box-sizing: border-box;
    background: #FFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

@media screen and (max-width: 1200px) {
    #fontContainer.grid-view .font-item {
        width: calc((100% - 40px) / 3); /* 3 cột, 2 khoảng cách 20px */
    }
}

@media screen and (max-width: 940px) {
    #fontContainer.grid-view .font-item {
        width: calc((100% - 20px) / 2); /* 2 cột, 1 khoảng cách 20px */
    }
}

@media screen and (max-width: 480px) {
    #fontContainer.grid-view .font-item {
        width: 100%; /* 1 cột */
    }
}



#fontContainer.grid-view .font-item .catItemfont-header, #fontContainer.grid-view .font-item .font-preview, #fontContainer.grid-view .font-item .item-size {
   
}

#fontContainer.grid-view .font-item .catItemfont-header, #fontContainer.grid-view .font-item .font-cover .font-preview {
 

}
#fontContainer.grid-view .font-item .catItemfont-header {   
}

#fontContainer.grid-view .font-item .font-cover .font-preview {
    color: rgb(0, 0, 0);
    height: 160px;
    line-height: 1em;
    text-align: left;
    overflow-wrap: break-word;
    overflow: hidden;
    white-space: normal;
}
.font-preview, .font-preview-relate { 
    padding:20px; 
    white-space: pre-wrap;
    font-size: 42px;
    letter-spacing: 1px;
    line-height: 1;
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    text-align: left;
    text-transform: none;
    margin: 0;
}

#fontContainer.grid-view .font-item .itemContainerFont {
     padding: 0 0 15px 0;
     display: flex;
    flex-direction: column;
    height: 100%;
   
}

#fontContainer.grid-view .font-item .font-preview {

    max-height: 400px;
    overflow: hidden;
    margin-bottom: 20px;
}


/*list-view*/
#fontContainer.list-view {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#fontContainer.list-view .font-item {
    width: 100%;        
    
}

#fontContainer.list-view .font-item .font-preview {
    padding: 30px;
    max-height: 250px;
    overflow: hidden;
}

#fontContainer.list-view .font-item .itemContainerFont {
    background: #FFF;
    padding: 0 0 15px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.font-cover {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#fontContainer.list-view .font-cover {
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}





/*List*/



div.catItemTagsBlock { 
    padding:0 20px;
    margin-top: 20px ; 
    font-size: 12px;
    margin-top: auto;
}
div.catItemTagsBlock span {
    font-weight: bold;
    padding: 0 4px 0 0;
}
div.catItemTagsBlock ul.catItemTags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline;
}

div.catItemTagsBlock ul.catItemTags li {
    display: inline;
    list-style: none;
    padding: 0 4px 0 0;
    margin: 0;
    text-align: center;
}

div.catItemTagsBlock ul.catItemTags li a:before {
    content: "#";
}
.catItemTags a, .tagItemTags a { 
    color:#555;     
}


.item-size {
    display: flex;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    white-space: nowrap;
    font-size: 12px;
    color: #333;
    gap: 3px;
   
}
.list-view .item-size-grid-view {
    display: none;
}

.item-size-grid-view {
    display: flex;
    flex-direction: row;
    /* -webkit-box-align: end; */
    align-items: center;
    white-space: nowrap;
    font-size: 12px;
    color: #333;
    gap: 3px;
    margin-top: 20px;
}
   




/*ITEM*/
.item-top-font {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin-bottom: 0.5rem; 


}

.cover-custom-font {       
    height: 100%;
    background-color: #222222;
    /* background-color: #1a1a1a; */
    color: #fff;
    background-position: center center;
    background-size: cover;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* background: #000 !important;*/
    min-height: 400px;
}

.cover-custom-font-download {       
    background-color: #222222;
    /* background-color: #1a1a1a; */
    color: #fff;
    background-position: center center;
    background-size: cover;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* background: #000 !important;*/
    min-height: 520px;
}


.cover-custom-font .shadow, .cover-custom-font-download .shadow{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));

}

.cover-custom-font:hover .shadow2 {
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.85));
}


/* Bóng đổ nhẹ cho tất cả chữ */
.cover-custom-font .text p,
.cover-custom-font .text h1,
.cover-custom-font-download .text p,
.cover-custom-font-download .text h1 {
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
    color: #fff;
}

/* Nếu muốn h1 nổi bật hơn */
.cover-custom-font .text h1 {
    font-weight: normal;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.image-font { width:100%; }

.cover-custom-font .text p, .cover-custom-font-download .text p{   
    padding: 0;
    margin: 0;
    font-size: clamp(1rem, 2vw, 1.5rem); /* Nhỏ nhất 1rem, tối đa 1.25rem */
}

.cover-custom-font .text h1, .cover-custom-font-download .text h1{
    display: inline-block;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0; 
    font-size: clamp(2rem, 5vw, 5rem); /* Nhỏ nhất 2rem, tối đa 3.5rem */
}

.custom-font-info {
    justify-content: space-around;
    background: #FFF;
    margin: 0 0 15px 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
    transition: all 0.5s ease-out;
    width:100%;
    padding: 40px;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
.custom-font-info a {
    font-weight: 600;
    color:#000;
}
.custom-font-info p {
    padding: 10px 0;
}
.custom-font-info ul {
    margin-left: 30px;
}
.custom-font-info li {
    margin-top: 0;
    margin-bottom: 1rem;
}
.Itemfont {
    background: #FFF;
    padding: 0 0 15px 0;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
.font-info {
    display: flex;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    width: 100%;
    padding: 5px 20px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom:0 ;
}


.Itemfont-header {
    display: flex;
    flex-direction: row;
    -webkit-box-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    align-items: center;
    color: var(--c-spirits-700);
    /* width: calc(100% - 100px); */
    padding: 10px 20px 10px 20px;
    /* margin: 0px 0px 16px; */
    white-space: nowrap;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.download-btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: #45a049;
}


.cover-custom-font .text, .cover-custom-font-download .text{
    position: relative;
    z-index: 10;
    padding: 40px;
    display: block;
    width: auto; 
    -webkit-animation: trim2 1s ease forwards;
    animation: trim2 1s ease forwards;
}



.charset-table {
    background: #FFF;    
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.charset-header {
    padding: 20px; 
    font-size: 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0;
}
.charset-body {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    padding: 10px;     
    overflow-y: auto;
/*    max-height: calc(90vh - 120px);*/
}
.glyph-item {
    border:1px solid #ececec; 
    padding:6px 10px; 
    font-size:25px; 
    display:inline-block; 
    min-width:28px; 
    text-align:center;
}



#downloadBtn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

    #downloadBtn:disabled {
      background-color: #aaa;
      cursor: not-allowed;
    }




.col-12 {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-7 {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 58.33333333%;
        flex: 0 0 58.33333333%;
        max-width: 58.33333333%;
    }
    .col-md-5 {
        -webkit-box-flex: 0;
        -ms-flex: 0 0 41.66666667%;
        flex: 0 0 41.66666667%;
        max-width: 41.66666667%;
    }
}


.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col, .col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm, .col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md, .col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg, .col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl, .col-xl-auto {
    position: relative;
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
}


/*Module ItemsRelatedList*/
.ItemsRelatedList { margin-top:30px; }

/*Pagination-list*/

.PaginationLinks {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
}

ul.pagination, .PaginationCounter{
       margin: 0px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    list-style-type: none;
    padding: 0px;
    gap: 16px;
}


ul.pagination li  {   
    margin: 32px 0px;    
}
ul.pagination li a { 
    border: 1px solid #dbdfe5;
    border-radius: 8px;
    color: #1e242c; 
    background: #fff; 
    width: 32px;
    height: 32px;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;   
}
ul.pagination li a:hover {
    background: #fdfdfd;
}

ul.pagination li a.current {
    color: #fff;
    background: #222;
}


/*Module*/
.moduletable {

    margin-bottom: 15px;
}

#moduletablefontContainer.grid-view {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#moduletablefontContainer.grid-view .font-item {
    width: calc((100% - 60px) / 4);
    box-sizing: border-box;
    padding: 15px;
    background: #FFF;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

@media (max-width: 1200px) {
    #moduletablefontContainer.grid-view .font-item {
        width: calc((100% - 40px) / 3);
    }
}

@media (max-width: 900px) {
    #moduletablefontContainer.grid-view .font-item {
        width: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    #moduletablefontContainer.grid-view .font-item {
        width: 100%;
    }
}

.font-preview-module {
    position: relative;
    height: 180px;
    background-color: #EC3B3B;
    background-color: #1a1a1a;
    color: #fff;
    background-position: center center;
    background-size: cover;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* background: #000 !important; */
}

.font-preview-module .shadow{
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
}

.font-preview-module .text {
   z-index: 10;
}
.font-preview-module h1 {
    display: ruby-text;
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    font-size: clamp(1rem, 10vw, 1.8rem);
    font-weight: normal;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.font-preview-module p {
    margin: 0;
}



/* add-to-favorites */
.add-to-favorites, .remove-from-favorites { 
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    border: 0;
    background: none;
}



 a.trigger_popup_fricc {
    color: #fff;
    display: flex;
    cursor: pointer;
    padding: 8px 12px 8px 8px;
    border-radius: 6px;
    align-items: center;
    white-space: nowrap;
    background: #4A98F7;
    transition: all 0.2s ease;
    gap:5px;
}    

.hover_bkgr_fricc{
    background:rgba(0,0,0,.4);
    cursor:pointer;
    display:none;
    height:100%;
    position:fixed;
    text-align:center;
    top:0;
    left: 0;
    width:100%;
    z-index:10000; 
     /* Thêm Flexbox để căn giữa */
    align-items: center;
    justify-content: center;
}

.hover_bkgr_fricc > div {
    background-color: #fff;
    box-shadow: 10px 10px 60px #555;
    display: inline-block;
    height: auto;
    max-width: 60%;
    min-height: 100px;
    vertical-align: middle;
    width: 60%;
    position: relative;
    border-radius: 8px;
    padding: 15px;
}
.popupCloseButton {
    background-color: #fff;
    border: 3px solid #999;
    border-radius: 50px;
    cursor: pointer;
    display: inline-block;
    font-family: arial;
    font-weight: bold;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 25px;
    line-height: 30px;
    width: 30px;
    height: 30px;
    text-align: center;
    z-index: 9999;
}
.popupCloseButton:hover {
    background-color: #ccc;
}




.serif        { font-family: 'Playfair Display', serif; }
.sans         { font-family: 'Oswald', sans-serif; }
.slab         { font-family: 'Arvo', serif; }
.script       { font-family: 'Pacifico', cursive; }
.handwritten  { font-family: 'Amatic SC', cursive; }
.display {
  font-family: 'Bangers', cursive;
  /* hoặc */
  font-family: 'Fredoka One', cursive;
  /* hoặc */
  font-family: 'Black Ops One', cursive;
  /* hoặc */
  font-family: 'Orbitron', sans-serif;
  /* hoặc */
  font-family: 'Staatliches', sans-serif;
}

#fontContainer.grid-view .font-item-image { display:none }