/* blog/css/list.css - Blue & White Theme */

/* Main Container */
.post-list-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #cce5ff;
    flex-wrap: wrap;
    gap: 15px;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-title {
    font-size: 2.2rem;
    color: #004085;
    margin: 0;
}

/* Create Post Button */
.btn-add-post {
    display: inline-block;
    background-color: #0056b3;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.15);
    transition: all 0.2s ease;
}

.btn-add-post:hover {
    background-color: #004085;
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(0, 86, 179, 0.25);
    transform: translateY(-2px);
}

/* --- Search Bar Styles --- */
.search-form {
    display: flex;
    gap: 8px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #b8daff;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #004085;
    outline: none;
    transition: border-color 0.2s;
    width: 200px;
}

.search-input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.search-btn {
    padding: 8px 16px;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.search-btn:hover {
    background-color: #004085;
}

/* Search Results Info */
.search-results-info {
    margin-bottom: 20px;
    color: #5c7a99;
    font-style: italic;
}

/* Posts List */
.posts-list {
    margin-top: 20px;
}

/* Post Card Styling */
.post-card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.05);
    border: 1px solid #e1eaf2;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.1);
}

/* Card Title */
.post-card-title {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.6rem;
}

.post-card-title a {
    color: #0056b3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card-title a:hover {
    color: #003d82;
    text-decoration: underline;
}

/* Meta info (Author, Date, Likes) */
.post-card-meta {
    font-size: 0.9rem;
    color: #5c7a99;
    margin-bottom: 15px;
}

.author-name {
    font-weight: 600;
    color: #004085;
}

.likes-count {
    margin-left: 15px;
    font-weight: bold;
    color: #0056b3;
}

/* Post excerpt/preview */
.post-card-excerpt {
    color: #2c3e50;
    line-height: 1.6;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* Read More Button */
.btn-read-more {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f8fbff;
    color: #0056b3;
    border: 1px solid #b8daff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-read-more:hover {
    background-color: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

/* Empty State */
.empty-message {
    text-align: center;
    padding: 50px 20px;
    background-color: #ffffff;
    border-radius: 8px;
    border: 2px dashed #b8daff;
    color: #5c7a99;
    font-size: 1.1rem;
}


/* Dark Mode Styles */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .post-card {
    background-color: #16213e;
    border-color: #0f3460;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .post-card-title a {
    color: #4da8da;
}

body.dark-mode .post-card-title a:hover {
    color: #7ec8e3;
}

body.dark-mode .post-card-meta,
body.dark-mode .post-card-excerpt {
    color: #b0b0b0;
}

body.dark-mode .author-name {
    color: #4da8da;
}

body.dark-mode .likes-count {
    color: #4da8da;
}

body.dark-mode .btn-read-more {
    background-color: #0f3460;
    color: #4da8da;
    border-color: #4da8da;
}

body.dark-mode .btn-read-more:hover {
    background-color: #4da8da;
    color: #1a1a2e;
}

body.dark-mode .empty-message {
    background-color: #16213e;
    border-color: #0f3460;
    color: #b0b0b0;
}

body.dark-mode .search-input {
    background-color: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}

body.dark-mode .search-btn {
    background-color: #0f3460;
}

body.dark-mode .search-btn:hover {
    background-color: #4da8da;
}

body.dark-mode .list-header {
    border-bottom-color: #0f3460;
}

body.dark-mode .page-title {
    color: #4da8da;
}

/* Comment count styling */
.comments-count {
    margin-left: 15px;
    font-weight: bold;
    color: #0056b3;
}

/* Dark mode support */
body.dark-mode .likes-count,
body.dark-mode .comments-count {
    color: #4da8da;
}

.controls-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
}


.sort-select {
    padding: 8px 12px;
    border: 1px solid #b8daff;
    border-radius: 5px;
    font-size: 0.95rem;
    color: #004085;
    background-color: #ffffff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sort-select:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

body.dark-mode .sort-select {
    background-color: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}

body.dark-mode .sort-select:focus {
    border-color: #4da8da;
    box-shadow: 0 0 0 3px rgba(77, 168, 218, 0.2);
}

.search-sort-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}


.repost-card {
    border-left: 4px solid #0056b3;
    background-color: #f8fbff;
}

body.dark-mode .repost-card {
    background-color: #1a2a40;
    border-left-color: #22d3ee;
}

.repost-icon {
    margin-right: 5px;
}