/* Məcmuələr səhifəsi CSS-i
   (main.book-main və ul.book-menu qaydaları ümumi CSS-dədir; axtarış və oxuyucu CSS-i bu faylın sonundadır) */

.collection {
    width: 65%;
    display: flex;
    align-items: stretch;          /* eyni sətirdəki kartlar eyni hündürlükdə olsun */
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 5px;
}

.collect {
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 10px;
    margin: 0 20px 10px;
}

.collect img {
    height: 30vh;
    max-width: 100%;
    object-fit: contain;
    border-radius: 5px;
}

/* Kitab adı: düymələr həmişə kartın altında eyni xətdə dursun */
.collect-title {
    flex: 1;
    margin: 10px 0 0;
    min-height: 2.7em;
    text-align: center;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
}

/* Oxu + Yüklə düymələri */
.collect-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.collect-btn {
    padding: 5px 18px;
    border-radius: 5px;
    background-color: var(--box-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 100ms;
}
.collect-btn:hover {
    background-color: var(--btn-hover);
}

p.book-title {
    width: 90%;
}

/* Planşet və telefon: menyu aşağıda/yuxarıda tam enlidir, kolleksiya da tam enli olsun */
@media (max-width: 1024px) {
    .collection {
        width: 100%;
    }
}

/* Telefon: sətirdə 2 kart */
@media (max-width: 600px) {
    p.book-title {
        width: 95%;
    }
    .collect {
        width: calc(50% - 12px);
        margin: 0 6px 14px;
        padding: 4px;
    }
    .collect img {
        width: 100%;
        height: auto;
    }
    .collect-title {
        font-size: .95rem;
    }
    .collect-btn {
        font-size: 1rem;
        padding: 5px 12px;
    }
}

/* =========================================================
   YENİ: AXTARIŞ
   ========================================================= */
ul.book-menu li.book-search,
ul.book-menu li.book-search:hover{
    background-color: transparent;
    list-style: none;
    margin-bottom: 10px;
}
#bookSearch{
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--line-color);
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
    color: #222;
}
#searchStatus{
    font-size: 13px;
    margin: 6px 0;
    opacity: .75;
    text-align: left;
}

/* Status sətrindəki kateqoriya adları: bold, bordersiz, yumşaq görünüş, sola yaslı */
#searchStatus .sr-jump{
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    width: 100% !important;
    margin: 2px 0 !important;
    padding: 6px 10px !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: inherit !important;
    font: inherit !important;
    font-weight: 700 !important;
    text-align: left !important;
    cursor: pointer;
    transition: background-color .15s ease;
}
#searchStatus .sr-jump:hover,
#searchStatus .sr-jump:focus-visible{
    background: rgba(0, 0, 0, .06) !important;
    text-decoration: none !important;
}
#searchStatus .sr-jump:active{
    background: rgba(0, 0, 0, .1) !important;
}

#searchResults{
    max-height: 60vh;
    overflow-y: auto;
    text-align: left;
}

/* Nəticələr siyahısında kateqoriya başlığı */
.sr-cat{
    font-weight: 700;
    font-size: 15px;
    margin: 14px 0 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--line-color);
}
.sr-cat:first-child{
    margin-top: 0;
}

.sr-book{
    font-weight: 600;
    font-size: 14px;
    margin: 10px 0 4px;
}
.sr-item{
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    color: #222;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 6px 8px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
}
.sr-item:hover{
    background: #FFFBE8;
}
.sr-item small{
    display: block;
    color: #999;
}
.sr-item mark{
    background: #ffe066;
    padding: 0;
}

/* =========================================================
   YENİ: TAM EKRAN PDF OXUYUCU (ağ kağız görünüşü)
   ========================================================= */
.pdf-modal{
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #fff;
}
.pdf-modal[hidden]{
    display: none;
}
.pdf-close{
    position: fixed;
    top: 14px;
    right: 28px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.08);
    color: #222;
    font-size: 20px;
    line-height: 40px;
    padding: 0;
    cursor: pointer;
}
.pdf-close:hover{
    background: rgba(0,0,0,.18);
}
.pdf-body{
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
    padding: 64px 0 20px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}
.pdf-page{
    position: relative;
    margin: 0 auto 16px;
    background: #fff;
}
.pdf-page canvas{
    display: block;
}
.pdf-msg{
    color: #333;
    text-align: center;
    padding: 40px;
}
.pdf-modal .textLayer{
    position: absolute;
    inset: 0;
    overflow: hidden;
    line-height: 1;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    user-select: text;
}
.pdf-modal .textLayer span,
.pdf-modal .textLayer br{
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    position: absolute;
    white-space: pre;
    cursor: text;
    transform-origin: 0 0;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: normal !important;
    word-spacing: normal !important;
    text-transform: none !important;
    font-weight: normal !important;
    font-style: normal !important;
    background: transparent;
    border: 0 !important;
    text-shadow: none !important;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}
.pdf-modal .textLayer span.hl{
    background: rgba(255,220,0,.55) !important;
    border-radius: 2px;
}

/* Axtarış nəticələrinin işarələnməsi (canvas-ın üstündə, mətn qatının altında) */
.pdf-page .hlLayer{
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.pdf-page .hl-box{
    position: absolute;
    background: rgba(255, 214, 0, .5);
    mix-blend-mode: multiply;
    border-radius: 2px;
}
.pdf-page .hl-box.cur{
    background: rgba(255, 130, 0, .6);
}

/* Oxuyucu içi minimalist axtarış çubuğu */
.pdf-modal .pdf-find{
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    box-sizing: border-box;
    padding: 0 8px 0 12px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 1px 8px rgba(0,0,0,.22);
    color: #666;
}
.pdf-modal .pdf-find input{
    width: 170px;
    height: 32px;
    box-sizing: border-box;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #222;
    font-size: 16px;
    padding: 0;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
}
.pdf-modal .pdf-find input::-webkit-search-cancel-button{
    -webkit-appearance: none;
}
.pdf-modal .pdf-find #rdNav{
    display: flex;
    align-items: center;
    gap: 2px;
}
.pdf-modal .pdf-find #rdNav[hidden]{
    display: none;
}
.pdf-modal .pdf-find #rdCount{
    font-size: 12px;
    color: #777;
    min-width: 34px;
    text-align: center;
    white-space: nowrap;
}
.pdf-modal .pdf-find button{
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #333;
    font-size: 16px;
    line-height: 28px;
    cursor: pointer;
}
.pdf-modal .pdf-find button:hover:not(:disabled){
    background: rgba(0,0,0,.08);
}
.pdf-modal .pdf-find button:disabled{
    opacity: .35;
    cursor: default;
}
.pdf-modal .textLayer span.cur{
    background: rgba(255,140,0,.6) !important;
    border-radius: 2px;
}
@media (max-width: 600px){
    .pdf-modal .pdf-find{
        left: 10px;
        right: 64px;
        transform: none;
    }
    .pdf-modal .pdf-find input{
        flex: 1;
        width: auto;
        min-width: 0;
    }
    .pdf-close{
        right: 10px;
    }
}