/**
 * Technical Library Pro — Frontend Styles
 * Inherits theme fonts and colors where possible
 */

.tlp-library {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    color: inherit;
}

/* Filters & Search */
.tlp-filters {
    margin-bottom: 24px;
}

.tlp-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tlp-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 6px;
    background: rgba(128,128,128,0.06);
    color: inherit;
    font-family: inherit;
    font-size: 14px;
}

.tlp-search-input:focus {
    outline: none;
    border-color: rgba(128,128,128,0.5);
}

.tlp-filter-select {
    padding: 10px 12px;
    border: 1px solid rgba(128,128,128,0.3);
    border-radius: 6px;
    background: rgba(128,128,128,0.06);
    color: inherit;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}

.tlp-search-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #c8372d;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.tlp-search-btn:hover {
    opacity: 0.85;
}

.tlp-clear-filters {
    font-size: 13px;
    opacity: 0.6;
}

.tlp-results-count {
    font-size: 13px;
    opacity: 0.5;
    margin-bottom: 16px;
}

/* File Grid */
.tlp-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.tlp-file-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
    background: rgba(128,128,128,0.06);
    border: 1px solid rgba(128,128,128,0.12);
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.tlp-file-card:hover {
    background: rgba(128,128,128,0.1);
    border-color: rgba(128,128,128,0.25);
}

.tlp-file-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.tlp-file-info {
    flex: 1;
    min-width: 0;
}

.tlp-file-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
}

.tlp-file-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.tlp-file-title a:hover {
    opacity: 0.75;
}

.tlp-file-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.tlp-file-path {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tags */
.tlp-file-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tlp-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.tlp-tag:hover {
    opacity: 0.7;
}

.tlp-tag-chassis {
    background: rgba(200, 55, 45, 0.12);
    color: #c8372d !important;
    border: 1px solid rgba(200, 55, 45, 0.2);
}

.tlp-tag-category {
    background: rgba(34, 113, 177, 0.1);
    color: #2271b1 !important;
    border: 1px solid rgba(34, 113, 177, 0.2);
}

/* Favorite Button */
.tlp-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.3;
    transition: all 0.2s;
    padding: 4px;
    line-height: 1;
    color: inherit;
}

.tlp-fav-btn:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.tlp-fav-btn.is-favorited {
    opacity: 1;
    color: #f0b429;
}

/* Pagination */
.tlp-pagination {
    margin-top: 32px;
    text-align: center;
}

.tlp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 2px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    border: 1px solid rgba(128,128,128,0.2);
}

.tlp-pagination .page-numbers.current {
    background: #c8372d;
    color: #fff;
    border-color: #c8372d;
}

/* No results */
.tlp-no-results,
.tlp-no-favorites,
.tlp-login-notice {
    padding: 40px;
    text-align: center;
    opacity: 0.5;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 640px) {
    .tlp-file-grid {
        grid-template-columns: 1fr;
    }

    .tlp-search-form {
        flex-direction: column;
    }

    .tlp-search-input,
    .tlp-filter-select {
        width: 100%;
    }
}
