/**
 * KB Product Documents - Frontend Styles
 *
 * @author    Starter
 * @copyright 2024
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

/* General Styles */
.kbpd-documents {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.kbpd-title {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2fb5d2;
    font-size: 1.2rem;
    font-weight: 600;
    color: #232323;
}

/* Grid Layout */
.kbpd-documents-grid .kbpd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.kbpd-grid-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.kbpd-grid-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #2fb5d2;
}

.kbpd-download-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}

.kbpd-file-icon {
    text-align: center;
    margin-bottom: 10px;
}

.kbpd-file-icon i {
    font-size: 2.5rem;
    color: #2fb5d2;
}

.kbpd-file-info {
    text-align: center;
}

.kbpd-filename {
    display: block;
    font-weight: 500;
    color: #232323;
    word-break: break-word;
    margin-bottom: 5px;
}

.kbpd-filesize {
    display: block;
    font-size: 0.85rem;
    color: #7a7a7a;
}

/* Table Layout */
.kbpd-documents-table .kbpd-table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
}

.kbpd-table th,
.kbpd-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.kbpd-table thead th {
    background: #f1f1f1;
    font-weight: 600;
    color: #232323;
}

.kbpd-table tbody tr:hover {
    background: #f8f9fa;
}

.kbpd-th-icon,
.kbpd-td-icon {
    width: 40px;
    text-align: center;
}

.kbpd-td-icon i {
    font-size: 1.5rem;
    color: #2fb5d2;
}

.kbpd-th-size,
.kbpd-td-size {
    width: 100px;
    color: #7a7a7a;
}

.kbpd-th-action,
.kbpd-td-action {
    width: 120px;
    text-align: center;
}

.kbpd-download-btn {
    white-space: nowrap;
}

.kbpd-download-btn i {
    margin-right: 5px;
}

/* Download History Page */
.kbpd-history {
    padding: 15px 0;
}

.kbpd-history-table {
    margin-bottom: 20px;
}

.kbpd-history-file i {
    margin-right: 8px;
    color: #2fb5d2;
}

.kbpd-history-product a {
    color: #2fb5d2;
    text-decoration: none;
}

.kbpd-history-product a:hover {
    text-decoration: underline;
}

.kbpd-history-date {
    color: #7a7a7a;
    font-size: 0.9rem;
}

/* Error Page */
.kbpd-error {
    padding: 20px 0;
}

.kbpd-error .alert i {
    margin-right: 10px;
}

.kbpd-error-actions {
    margin-top: 20px;
}

.kbpd-error-actions .btn {
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 767px) {
    .kbpd-documents-grid .kbpd-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kbpd-table .kbpd-btn-text {
        display: none;
    }

    .kbpd-download-btn i {
        margin-right: 0;
    }

    .kbpd-th-size,
    .kbpd-td-size {
        display: none;
    }
}

@media (max-width: 479px) {
    .kbpd-documents-grid .kbpd-grid {
        grid-template-columns: 1fr;
    }
}
