/**
 * Frontend Styles for Bytulfan Files Library
 */

/* Archive Page Styles */
.bfl-archive-wrapper {
    padding: 2rem 0;
}

.bfl-archive-header {
    text-align: center;
    margin-bottom: 3rem;
}

.bfl-archive-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.bfl-archive-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters */
.bfl-filters-wrapper {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.bfl-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.bfl-filter-field {
    flex: 1;
    min-width: 200px;
}

.bfl-search-field {
    flex: 2;
    min-width: 300px;
}

.bfl-search-input,
.bfl-category-filter,
.bfl-file-type-filter,
.bfl-sort-filter {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 15px;
}

.bfl-filter-submit {
    background: #f49865;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.bfl-filter-submit:hover {
    background: #f49865;
}

.bfl-clear-filters {
    color: #666;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s;
}

.bfl-clear-filters:hover {
    background: #f0f0f0;
    text-decoration: none;
}

/* Results Info */
.bfl-results-info {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Files Grid */
.bfl-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.bfl-file-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.bfl-file-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bfl-file-thumbnail {
    position: relative;
    overflow: hidden;
}

.bfl-file-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
}

.bfl-file-card:hover .bfl-file-thumbnail img {
    transform: scale(1.05);
}

.bfl-file-content {
    padding: 1.5rem;
}

.bfl-file-categories {
    margin-bottom: 1rem;
}

.bfl-category-tag {
    display: inline-block;
    margin: 1px;
    padding: 5px 12px;
    border: 1px solid var(--brdcolor-gray-300);
    text-transform: capitalize;
    font-size: 12px !important;
    border-radius: calc(var(--wd-brd-radius) / 1.5);
}

.bfl-category-tag:hover {
    background: #f49865;
    color: white;
    text-decoration: none;
}

.bfl-file-excerpt {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.bfl-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.bfl-file-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bfl-file-actions {
    text-align: center;
}

/* Pagination */
.bfl-pagination {
    text-align: center;
    margin-top: 3rem;
}

.bfl-pagination .page-numbers {
    display: flex;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    list-style: none;
}

.bfl-pagination .page-numbers li{
    margin-bottom: 0;
}

.bfl-pagination .page-numbers.current {
    background: #f49865;
    color: white;
    border-color: #f49865;
}

/* No Files */
.bfl-no-files {
    text-align: center;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.bfl-browse-all {
    background: #f49865;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

.bfl-browse-all:hover {
    background: #f49865;
    color: white;
    text-decoration: none;
}

/* Single File Page */
.bfl-single-wrapper {
    padding: 2rem 0;
}

.bfl-breadcrumbs {
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.bfl-breadcrumbs a {
    color: #f49865;
    text-decoration: none;
}

.bfl-breadcrumbs a:hover {
    text-decoration: underline;
}

.bfl-separator {
    margin: 0 0.5rem;
    color: #666;
}

.bfl-current {
    color: #666;
}

.bfl-file-header {
    margin-bottom: 3rem;
}


.bfl-file-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.bfl-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
}

.bfl-file-content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.bfl-file-featured-image {
    margin-bottom: 2rem;
}

.bfl-file-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.bfl-file-description {
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* Download Section */
.bfl-download-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
}

.bfl-download-section h3 {
    margin-top: 0;
    color: #333;
}

.bfl-download-info {
    margin-bottom: 2rem;
}

.bfl-download-form {
    max-width: 500px;
}

.bfl-form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.bfl-form-field {
    flex: 1;
}

.bfl-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

.bfl-form-field input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.bfl-form-field input:focus {
    outline: none;
    border-color: #f49865;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.bfl-form-field input.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.bfl-form-field input.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

.bfl-form-actions {
    margin-top: 2rem;
}

.bfl-download-button {
    background: #f49865;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s;
}

.bfl-download-button:hover {
    background: #db885a;
    color: #ffffff;
}

.bfl-download-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.bfl-message {
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.bfl-message.bfl-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bfl-message.bfl-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bfl-download-success {
    text-align: center;
    padding: 2rem;
}

.bfl-success-message h4 {
    color: #f49865;
    margin-bottom: 1rem;
}

.bfl-manual-download-button {
    background: #f49865;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: background-color 0.3s;
}

/* Sidebar */
.bfl-file-sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
}

.bfl-sidebar-widget {
    margin-bottom: 2rem;
}

.bfl-sidebar-widget:last-child {
    margin-bottom: 0;
}

.bfl-sidebar-widget h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #f49865;
    padding-bottom: 0.5rem;
}

.bfl-file-info-list,
.bfl-categories-list,
.bfl-related-files {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bfl-file-info-list li,
.bfl-categories-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.bfl-file-info-list li:last-child,
.bfl-categories-list li:last-child {
    border-bottom: none;
}

.bfl-categories-list a {
    color: #f49865;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bfl-categories-list a:hover {
    text-decoration: underline;
}

.bfl-category-count {
    color: #666;
    font-size: 0.9rem;
}

.bfl-related-files li {
    margin-bottom: 1rem;
}

.bfl-related-file {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
    padding: 0.5rem;
    border-radius: 4px;
}

.bfl-related-file:hover {
    background: white;
    text-decoration: none;
    color: #333;
}

.bfl-related-thumbnail img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.bfl-related-content h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.bfl-related-date {
    font-size: 0.8rem;
    color: #666;
}

.bfl-back-to-library {
    display: inline-block;
    color: #f49865;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border: 1px solid #f49865;
    border-radius: 4px;
    transition: all 0.3s;
}

.bfl-back-to-library:hover,
.bfl-manual-download-button:hover{
    background: #f49865;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bfl-filters-row {
        flex-direction: column;
        align-items: initial;
    }

    .bfl-filter-submit {
        width: 100%;
    }
    
    .bfl-filter-field,
    .bfl-search-field {
        min-width: auto;
    }
    
    .bfl-files-grid {
        grid-template-columns: 1fr;
    }
    
    .bfl-file-content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .bfl-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .bfl-file-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .bfl-archive-wrapper,
    .bfl-single-wrapper {
        padding: 1rem 0;
    }
    
    .bfl-filters-wrapper,
    .bfl-download-section,
    .bfl-file-sidebar {
        padding: 1rem;
    }
}
