/* Frontend Styles for Educational Documents Manager */

/* ============================================
   Container & Layout
   ============================================ */

.edu-docs-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family:Poppins,sans-serif!important;
}
.edu-docs-container a, h3.edu-docs-filter-title, .edu-docs-container a{
    font-family:Poppins,sans-serif!important;
}

/* ============================================
   Search Bar
   ============================================ */

.edu-docs-search-bar {
    margin-bottom: 30px;
}

.edu-docs-search-form {
    display: flex;
    gap: 10px;
    max-width: auto;
}

.edu-docs-search-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 0;
    transition: border-color 0.3s;
}

.edu-docs-search-input:focus {
    outline: none;
    border-color: #f39c27;
}

.edu-docs-search-submit {
    padding: 12px 24px;
    background: #f39c27;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
}

.edu-docs-search-submit:hover {
    background: #d68910;
}

.edu-docs-search-submit .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* ============================================
   Main Layout (Sidebar + Content)
   ============================================ */

.edu-docs-main {
    display: flex;
    gap: 30px;
}

/* ============================================
   Sidebar Filters
   ============================================ */

.edu-docs-sidebar {
    flex: 0 0 320px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 0;
    border: 1px solid #e0e0e0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    font-family:Poppins,sans-serif!important;
}

.edu-docs-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edu-docs-filter-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
    color: #333;
}

.edu-docs-filter-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.edu-docs-filter-group li {
    margin: 8px 0;
}

.edu-docs-filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
    line-height: 20px;
}

.edu-docs-filter-group label:hover {
    color: #f39c27;
}

.edu-docs-filter-group input[type="radio"],
.edu-docs-filter-group input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    accent-color: #f39c27;
}

/* Hierarchical categories */
.edu-docs-category-children,
.edu-docs-category-grandchildren {
    margin-left: 20px;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #e0e0e0;
}

.edu-docs-category-grandchildren {
    margin-left: 15px;
}

/* Reset button */
.edu-docs-reset-filters {
    padding: 10px 15px;
    background: #f39c27;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
    transition: background 0.3s;
}

.edu-docs-reset-filters:hover {
    background: #d68910;
}

/* ============================================
   Content Area
   ============================================ */

.edu-docs-content {
    flex: 1;
    min-width: 0;
}

/* Results info */
.edu-docs-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.edu-docs-count {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.edu-docs-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f39c27;
    font-weight: 600;
}

.edu-docs-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #f39c27;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Document List
   ============================================ */

.edu-docs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: opacity 0.3s;
}

.edu-doc-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}

.edu-doc-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.edu-doc-item-inner {
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* Thumbnail */
.edu-doc-thumbnail {
    flex: 0 0 120px;
}

.edu-doc-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 0;
    object-fit: cover;
}

/* Content */
.edu-doc-content {
    flex: 1;
    min-width: 0;
}

.edu-doc-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.edu-doc-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.2s;
}

.edu-doc-title a:hover {
    color: #d68910;
    text-decoration: underline;
}

/* Categories */
.edu-doc-categories {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.edu-doc-label {
    font-weight: 600;
    color: #333;
}

/* Tags */
.edu-doc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.edu-doc-tag {
    display: inline-block;
    padding: 4px 10px;
    background: #f0f0f1;
    border-radius: 0;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

/* Excerpt */
.edu-doc-excerpt {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Meta (download button and count) */
.edu-doc-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.edu-doc-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: #f39c27;
    color: #fff!important;
    text-decoration: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 12px;
    transition: background 0.3s;
}

.edu-doc-download:hover {
    background: #d68910;
    color: #fff;
}

.edu-doc-download .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.edu-doc-downloads {
    font-size: 13px;
    color: #999;
}

/* No results */
.edu-docs-no-results {
    padding: 40px 20px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 0;
    color: #666;
    font-size: 16px;
}

/* ============================================
   Pagination
   ============================================ */

.edu-docs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.edu-docs-prev,
.edu-docs-next {
    padding: 10px 20px;
    background: #f39c27;
    color: #fff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.edu-docs-prev:hover,
.edu-docs-next:hover {
    background: #d68910;
}

.edu-docs-prev:disabled,
.edu-docs-next:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.edu-docs-page-info {
    font-weight: 600;
    color: #333;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .edu-docs-main {
        flex-direction: column;
    }
    
    .edu-docs-sidebar {
        flex: 1;
        position: static;
        max-height: none;
    }
    
    .edu-docs-filter-title {
        cursor: pointer;
        position: relative;
    }
    
    .edu-docs-filter-title::after {
        content: '▼';
        position: absolute;
        right: 0;
        transition: transform 0.3s;
    }
    
    .edu-docs-filter-title.active::after {
        transform: rotate(180deg);
    }
    
    .edu-doc-item-inner {
        flex-direction: column;
    }
    
    .edu-doc-thumbnail {
        flex: 0 0 auto;
        max-width: 200px;
    }
    
    .edu-docs-search-form {
        flex-direction: column;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .edu-docs-container {
        padding: 10px;
    }
    
    .edu-doc-item-inner {
        padding: 15px;
    }
    
    .edu-doc-title {
        font-size: 18px;
    }
    
    .edu-doc-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   YOOtheme Compatibility
   ============================================ */

.uk-container .edu-docs-container {
    max-width: 100%;
    padding: 0;
}

.uk-section .edu-docs-container {
    padding-top: 0;
    padding-bottom: 0;
}
