/* ALT TECH Document Manager - Frontend Table Styles */

.atdm-table-wrapper {
    overflow-x: auto;
    margin: 25px 0;
    box-shadow: 0 0 0 1px #d0e0f0;
    border-radius: 4px;
    background: #ffffff;
    padding: 0 !important;
}

/* --- THE BLUE THEME --- */

/* Header Row */
.atdm-doc-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

.atdm-doc-table thead tr {
    background: #2271b1; 
    border-bottom: 2px solid #135e96;
}

.atdm-doc-table thead th {
    text-align: left;
    padding: 16px 20px;
    font-weight: 700;
    color: #ffffff !important;
    text-transform: capitalize;
    font-size: 14px;
}

/* Table Body */
.atdm-doc-table tbody tr {
    border-bottom: 1px solid #e5f0fa;
    transition: background-color 0.2s ease;
}

.atdm-doc-table tbody tr:nth-child(even) {
    background-color: #f4f9ff; 
}

.atdm-doc-table tbody tr:hover {
    background-color: #e1efff;
}

.atdm-doc-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
    color: #3c434a;
}

/* --- TITLE COLUMN --- */
.atdm-title-cell {
    display: flex;
    align-items: center;
    min-width: 280px;
    padding: 12px 20px;
}

.atdm-icon {
    font-size: 22px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #e5f0fa;
    border-radius: 4px;
    color: #d63638;
    flex-shrink: 0;
}

.atdm-title-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.atdm-title-wrap .atdm-title-link {
    color: #1a4b82;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    margin-bottom: 2px;
}

.atdm-title-wrap .atdm-title-link:hover {
    text-decoration: underline;
}

.atdm-meta {
    font-size: 13px;
    color: #787c82;
    display: flex;
    align-items: center;
    gap: 4px;
}

.atdm-meta .count {
    color: #50575e;
    font-weight: 500;
}

/* --- CATEGORY COLUMN --- */
.atdm-cat-cell {
    color: #2271b1;
    font-size: 14px;
}
.atdm-cat-cell a { color: #2271b1; text-decoration: none; }
.atdm-cat-cell a:hover { text-decoration: underline; }

/* --- DATE COLUMN --- */
.atdm-date-cell {
    color: #646970;
    font-size: 14px;
    white-space: nowrap;
}

/* --- DOWNLOAD COLUMN --- */
.atdm-dl-cell {
    text-align: center;
    vertical-align: middle;
    width: 140px;
    padding: 10px 20px;
}

.atdm-btn-download {
    display: inline-block;
    background: #46b450;
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 100px;
}
.atdm-btn-download:hover { background: #3a9443; color: #ffffff !important; }

/* --- SEARCH BAR --- */
.atdm-search-container {
    margin: 20px 20px 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
}

.atdm-search-input {
    padding: 10px 16px;
    border: 1px solid #ccd0d4;
    border-radius: 6px;
    font-size: 14px;
    width: 260px;
    background: #ffffff;
}
.atdm-search-input:focus { outline: none; border-color: #2271b1; }

.atdm-search-btn {
    background: #2271b1;
    color: #ffffff;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.atdm-search-btn:hover { background: #135e96; }

/* Mobile */
@media screen and (max-width: 768px) {
    .atdm-doc-table thead { display: none; }
    .atdm-doc-table tbody tr { display: block; margin-bottom: 15px; border: 1px solid #d0e0f0; border-radius: 4px; }
    .atdm-doc-table tbody td { display: flex; justify-content: space-between; padding: 10px 15px; border-bottom: 1px solid #f0f0f0; }
    .atdm-doc-table tbody td:last-child { border-bottom: none; }
    .atdm-doc-table tbody td::before { content: attr(data-label); font-weight: 600; color: #2271b1; }
    .atdm-title-cell { flex-direction: column; align-items: flex-start; }
    .atdm-icon { margin-bottom: 8px; }
    .atdm-search-container { flex-direction: column; align-items: stretch; }
    .atdm-search-input { width: 100%; }
    .atdm-search-btn { width: 100%; }
}