/*=====================================================
TIMESNEWSPLUS
LIBRARY CSS V2
PART 1
=====================================================*/

/*=====================================================
LIBRARY
=====================================================*/

.tnp-library{
    display:flex;
    flex-direction:column;
    gap:40px;
    width:100%;
}

/*=====================================================
TOOLBAR
=====================================================*/

.tnp-library-toolbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:24px;
    margin-bottom:35px;
}

/*=====================================================
SEARCH
=====================================================*/

.tnp-library-search{
    display:flex;
    align-items:center;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:999px;
    overflow:hidden;
    box-shadow:0 8px 22px rgba(0,0,0,.05);
}

.tnp-library-search input{
    width:320px;
    border:none;
    outline:none;
    padding:15px 20px;
    font-size:14px;
    background:transparent;
}

.tnp-library-search button{
    width:54px;
    height:50px;
    border:none;
    cursor:pointer;
    background:#0057b8;
    color:#fff;
    transition:.25s;
}

.tnp-library-search button:hover{
    background:#d60000;
}

/*=====================================================
FILTERS
=====================================================*/

.tnp-library-filters{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.tnp-library-filters button{
    border:none;
    cursor:pointer;
    padding:10px 18px;
    border-radius:999px;
    background:#eef2f7;
    color:#374151;
    font-weight:600;
    transition:.25s;
}

.tnp-library-filters button:hover,
.tnp-library-filters button.active{
    background:#0057b8;
    color:#fff;
}

/*=====================================================
ROW
=====================================================*/

.tnp-library-row{
    width:100%;
}

.tnp-library-row-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:25px;
    padding-bottom:12px;
    border-bottom:1px solid #ececec;
}

.tnp-library-row-header h3{
    margin:0;
    font-size:32px;
    color:#111827;
    font-weight:700;
}

.tnp-library-count{
    color:#6b7280;
    font-size:14px;
}

/*=====================================================
GRID
=====================================================*/

.tnp-library-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:30px;
    align-items:start;
}

/*=====================================================
CONTINUE READING
=====================================================*/

.tnp-library-featured{
    display:grid;
    grid-template-columns:320px 1fr;
    gap:35px;
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 15px 40px rgba(0,0,0,.08);
    margin-bottom:45px;
}

.tnp-library-featured-cover img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.tnp-library-featured-content{
    display:flex;
    flex-direction:column;
    justify-content:center;
    padding:38px;
}

.tnp-library-badge{
    display:inline-flex;
    align-self:flex-start;
    background:#eef5ff;
    color:#0057b8;
    padding:8px 16px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    margin-bottom:18px;
}

.tnp-library-featured-content h2{
    margin:0 0 15px;
    font-size:36px;
    color:#111827;
    line-height:1.25;
}

.tnp-library-publication{
    color:#0057b8;
    font-weight:700;
    margin-bottom:18px;
}

.tnp-library-featured-content p{
    color:#6b7280;
    line-height:1.8;
    margin-bottom:22px;
}

.tnp-library-meta{
    color:#6b7280;
    margin-bottom:30px;
}

.tnp-library-featured .tnp-btn{
    width:230px;
    text-align:center;
}

.tnp-empty-state{
    background:#fff;
    padding:60px;
    border-radius:22px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.tnp-empty-state h3{
    margin-bottom:15px;
}

.tnp-empty-state p{
    color:#6b7280;
}


/*=====================================================
EDITION CARD
=====================================================*/

.tnp-library-card{
    background:#fff;
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 12px 35px rgba(0,0,0,.08);
    transition:all .3s ease;

    display:flex;
    flex-direction:column;

    width:320px;
    min-width:320px;
    max-width:320px;

    flex:0 0 320px;

    height:100%;
}
.tnp-library-card:hover{

    transform:translateY(-6px);

    box-shadow:0 18px 40px rgba(0,0,0,.12);

}

.tnp-library-card-link{
    display:flex;
    flex-direction:column;
    height:100%;
    color:inherit;
    text-decoration:none;
}

/* =====================================================
   DASHBOARD EDITION CARD COVER
===================================================== */

.tnp-library-card-cover {
    width: 100%;
    aspect-ratio: 0.72;
    overflow: hidden;
    background: #f5f5f5;
}

.tnp-library-card-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}
.tnp-library-card:hover .tnp-library-card-cover img{
    transform:scale(1.05);
}

/*=====================================================
BADGES
=====================================================*/

.tnp-edition-badges{
    position:absolute;
    top:14px;
    left:14px;
    right:14px;
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
}

.tnp-edition-badge{
    display:inline-flex;
    align-items:center;
    gap:4px;
    padding:4px 10px;
    border-radius:999px;
    background:rgba(17,24,39,.92);
    color:#fff;
    font-size:9px;
    font-weight:700;
    letter-spacing:.4px;
    text-transform:uppercase;
    backdrop-filter:blur(6px);
    box-shadow:0 3px 10px rgba(0,0,0,.20);
}
.tnp-new-badge{
    background:#e60023;
    color:#fff;
    padding:4px 8px;
    border-radius:999px;
    font-size:9px;
    font-weight:700;
    letter-spacing:.4px;
    box-shadow:0 3px 10px rgba(230,0,35,.35);
}

/*=====================================================
CONTENT
=====================================================*/

.tnp-library-card-content{
    display:flex;
    flex-direction:column;
    flex:1;
    padding:16px;
    gap:10px;
}

.tnp-library-card-publication{
    display:inline-flex;
    padding:6px 14px;
    border-radius:999px;
    font-size:11px;
    font-weight:700;
    letter-spacing:.4px;
    text-transform:uppercase;
}

.ghanaian-times{
    background:#eef5ff;
    color:#0057b8;
}

.the-spectator{
    background:#ecfdf3;
    color:#15803d;
}

.timesnewsplus{
    background:#f3f4f6;
    color:#374151;
}

.tnp-library-card-content h4{
    margin:0;
    font-size:17px;
    line-height:1.4;
    font-weight:700;
    color:#111827;
}

.tnp-tagline{
    color:#6b7280;
    font-size:14px;
    line-height:1.6;
    margin-bottom:18px;
}

/*=====================================================
META
=====================================================*/

.tnp-library-card-date,
.tnp-meta-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    font-size:12px;
    color:#6b7280;
}

.tnp-library-card-date{
    margin-bottom:16px;
}

.tnp-meta-row{
    margin-bottom:22px;
}
.tnp-read-today{
    cursor:pointer;
    user-select:none;
}

.tnp-read-today:hover{
    transform:translateY(-2px);
}

/*=====================================================
BUTTON
=====================================================*/

.tnp-read-today{

    margin-top:auto;

    display:flex;
    justify-content:center;
    align-items:center;

    gap:8px;

    height:46px;

    border-radius:12px;

    background:#0057b8;

    color:#fff;

    font-weight:700;

    transition:.25s;
}

.tnp-library-card:hover .tnp-read-today{
    background:#d60000;
}


/*=====================================================
RESPONSIVE
=====================================================*/

@media (max-width:1100px){

    .tnp-library-featured{
        grid-template-columns:1fr;
    }

}

@media (max-width:900px){

    .tnp-library-toolbar{
        flex-direction:column;
        align-items:stretch;
    }

    .tnp-library-search{
        width:100%;
    }

    .tnp-library-search input{
        width:100%;
    }

}

@media (max-width:768px){

    .tnp-library-grid{
        grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    }

    .tnp-library-featured-content{
        padding:28px;
    }

    .tnp-library-featured-content h2{
        font-size:30px;
    }

    .tnp-library-row-header h3{
        font-size:28px;
    }

}

@media (max-width:480px){

    .tnp-library-grid{
        grid-template-columns:1fr;
    }

    .tnp-library-card-content{
        padding:18px;
    }

    .tnp-library-featured{
        border-radius:18px;
    }

}


/*=====================================================
ARCHIVE BROWSER
=====================================================*/

.tnp-archive-box{

    display:grid;

    grid-template-columns:repeat(4,minmax(180px,1fr));

    gap:20px;

    background:#fff;

    border-radius:22px;

    padding:30px;

    margin-bottom:45px;

    box-shadow:0 12px 35px rgba(0,0,0,.08);

}

.tnp-archive-field{

    display:flex;

    flex-direction:column;

    gap:10px;

}

.tnp-archive-field label{

    font-size:13px;

    font-weight:700;

    color:#374151;

}

.tnp-archive-field select{

    height:48px;

    padding:0 16px;

    border:1px solid #dbe2ea;

    border-radius:12px;

    background:#fff;

    font-size:14px;

    outline:none;

    transition:.25s;

}

.tnp-archive-field select:focus{

    border-color:#0057b8;

    box-shadow:0 0 0 3px rgba(0,87,184,.12);

}

.tnp-archive-action{

    display:flex;

    align-items:flex-end;

}

.tnp-archive-btn{

    width:100%;

    height:48px;

    border:none;

    border-radius:12px;

    background:#0057b8;

    color:#fff;

    font-size:15px;

    font-weight:700;

    cursor:pointer;

    transition:.25s;

}

.tnp-archive-btn:hover{

    background:#d60000;

    transform:translateY(-2px);

}

@media(max-width:992px){

    .tnp-archive-box{

        grid-template-columns:repeat(2,1fr);

    }

}

@media(max-width:640px){

    .tnp-archive-box{

        grid-template-columns:1fr;

    }

}



/*=====================================================
FAVORITE BUTTON
=====================================================*/

.tnp-favorite-btn{
    position:absolute;
    top:8px;
    right:8px;
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.95);
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index:20;
    font-size:13px;
    color:#d60000;
    box-shadow:0 4px 10px rgba(0,0,0,.15);
    transition:all .25s ease;
}

.tnp-favorite-btn:hover{
    transform:scale(1.1);
    background:#fff;
}

.tnp-favorite-btn.active{
    background:#ffe8ec;
}
