/* ==========================================================================
   13. ADVANCED FILTER / SERIES PAGE STYLING (Mockup Azure Chronicles)
   ========================================================================== */
.series-search-container {
    max-width: 900px;
    margin: 0 auto 2.5rem auto;
}
.series-search-container .search-input-wrapper {
    position: relative;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}
.series-search-container .search-input-wrapper input {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 15px;
    box-shadow: none;
    transition: all 0.25s ease;
}
.series-search-container .search-input-wrapper input:focus {
    border-color: var(--gdwp-primary, #14b8a6);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.dark-mode .series-search-container .search-input-wrapper input {
    background-color: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

.series-search-container select.form-select {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    transition: all 0.25s ease;
    cursor: pointer;
}
.series-search-container select.form-select:focus {
    border-color: var(--gdwp-primary, #14b8a6);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}
.dark-mode .series-search-container select.form-select {
    background-color: #1f2937;
    border-color: #374151;
    color: #cbd5e1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23cbd5e1' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

/* Highly responsive Series Grid matching 7-column desktop mockup */
.series-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}
@media (min-width: 480px) {
    .series-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    .series-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}
@media (min-width: 992px) {
    .series-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
@media (min-width: 1200px) {
    .series-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (min-width: 1400px) {
    .series-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 20px;
    }
}

/* Card structure matching mockup */
.series-card {
    min-width: 0; /* Prevents grid item from stretching beyond 1fr due to long titles */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.series-card-cover {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 10px;
    background-color: #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dark-mode .series-card-cover {
    background-color: #1f2937;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.series-card:hover .series-card-cover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.dark-mode .series-card:hover .series-card-cover {
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.6);
}
.series-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.series-card:hover .series-card-cover img {
    transform: scale(1.04);
}

/* Semi-translucent badge on cover */
.series-card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
}

/* Card titles and details */
.series-card-title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 10px;
    margin-bottom: 2px;
    color: #1f2937;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}
.dark-mode .series-card-title {
    color: #f3f4f6;
}
.series-card:hover .series-card-title {
    color: var(--gdwp-primary, #14b8a6);
}
.series-card-genres {
    font-size: 11.5px;
    color: #6b7280;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    width: 100%;
}
.dark-mode .series-card-genres {
    color: #9ca3af;
}

/* Custom Follow Button (Novel Updates style in actions row) */
.gdwp-btn-library-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    height: 42px; /* standard height matching other buttons in the row */
}

/* Light Mode: Inactive State */
.gdwp-btn-library-item {
    background-color: #1f2937 !important;
    color: #ffffff !important;
    border: 1px solid #1f2937 !important;
}
.gdwp-btn-library-item:hover {
    background-color: #374151 !important;
    color: #ffffff !important;
    border-color: #374151 !important;
}

/* Light Mode: Active State */
.gdwp-btn-library-item.followed {
    background-color: #fee2e2 !important;
    color: #ef4444 !important;
    border: 1px solid #fca5a5 !important;
}
.gdwp-btn-library-item.followed:hover {
    background-color: #fecaca !important;
    color: #dc2626 !important;
    border-color: #fca5a5 !important;
}

/* Dark Mode Overrides */
.dark-mode .gdwp-btn-library-item {
    background-color: #27272a !important;
    color: #e4e4e7 !important;
    border: 1px solid #3f3f46 !important;
}
.dark-mode .gdwp-btn-library-item:hover {
    background-color: #3f3f46 !important;
    color: #ffffff !important;
    border-color: #52525b !important;
}
.dark-mode .gdwp-btn-library-item.followed {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid #f87171 !important;
}
.dark-mode .gdwp-btn-library-item.followed:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
    border-color: #fca5a5 !important;
}
