/*
Theme Name: TruyenQQ
Theme URI: https://truyenqqgo.com
Author: TruyenQQ Team
Author URI: https://truyenqqgo.com
Description: Theme WordPress đọc truyện tranh online - Chuyển đổi từ truyenqq với đầy đủ chức năng
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: truyenqq
Tags: comic, manga, manhwa, reading, entertainment
*/

/* 
 * CSS chính được load từ CDN trong functions.php:
 * - style.css từ st.truyenqqgo.com (giao diện chính)
 * - dark_style.css từ st.truyenqqgo.com (dark mode)
 * - Các CSS local được enqueue trong functions.php
 */

/* Pagination Styles */
.page_redirect {
    text-align: center;
    margin: 20px 0;
    padding: 10px 0;
}
.page_redirect a {
    display: inline-block;
    margin: 0 5px;
    text-decoration: none;
    color: #333;
}
.page_redirect a p {
    display: inline-block;
    padding: 0;
    margin: 0 4px;
    border: none;
    border-radius: 50%;
    background-color: #e8ecef;
    color: #495057;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    transition: all 0.3s ease;
}
.page_redirect a:hover p {
    background-color: #dee2e6;
    color: #212529;
}
.page_redirect a p.active {
    background-color: #e8ecef;
    color: #495057;
    font-weight: normal;
}
.page_redirect a p span {
    font-size: 18px;
    font-weight: bold;
}

/* WordPress Core Styles */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
}

.sticky {
    position: relative;
}

.bypostauthor {
    display: block;
}

/* Search Suggestions Styles */
.suggestsearch {
    display: none;
    position: absolute;
    background: #fff;
    width: 100%;
    max-width: 400px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 5px;
}

.suggestsearch.show {
    display: block;
}

.suggestsearch ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestsearch li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.suggestsearch li:last-child {
    border-bottom: none;
}

.suggestsearch li a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.suggestsearch li a:hover {
    background-color: #f5f5f5;
}

.search_avatar {
    width: 50px;
    height: 65px;
    margin-right: 10px;
    flex-shrink: 0;
}

.search_avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.search_info {
    flex: 1;
    min-width: 0;
}

.search_info .name {
    font-weight: bold;
    font-size: 14px;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search_info .name_other {
    font-size: 12px;
    color: #666;
    margin: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search_info p:last-child {
    font-size: 12px;
    color: #888;
    margin: 2px 0 0 0;
}

/* Responsive */
@media (max-width: 767px) {
    .suggestsearch {
        max-width: 100%;
        left: 0;
        right: 0;
    }
}

/* Override và bổ sung styles */
.content {
    min-height: 400px;
}

.main_content {
    padding: 20px 0;
}

/* Đảm bảo body có class đúng */
body.hompage {
    font-family: 'Quicksand', sans-serif;
}

body.light {
    background-color: #f5f5f5;
}

/* Fix cho các element cần thiết */
.div_middle {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.clear {
    clear: both;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 20px;
}

/* Error messages */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

