/**
 * Styles for Officers archive and single templates
 * 
 * Officer-specific styles for the Nilea plugin
 * Common layout styles are now in nilea-layout.css
 *
 * @package Nilea_Plugin
 */

/* Department Officers Section */
.department-officers {
    margin-top: 0rem;
    margin-bottom: 1rem;
}

.officers-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.officer-details {
    margin: 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.officer-details dl {
    display: grid;
    grid-template-columns: 30% 70%;
    row-gap: 0.75rem;
    margin: 0;
}

.officer-details dl dt {
    font-weight: normal;
    color: #666;
    padding-right: 1rem;
}

.officer-details dl dd {
    font-weight: bold;
    margin: 0;
}

/* Officers Title Section */
.officers-title-section {
    display: flex;
    flex-direction: column;
}

/* Officer Count Display */
.officer-count {
    font-size: 1rem;
    color: #666;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.officer-count .count {
    font-weight: bold;
    color: #0073aa;
}

/* Tabulator controls */
.officers-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f5f7fa;
    border-radius: 8px;
}

.search-filter {
    flex: 1;
    margin-right: 1rem;
}

.officers-search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.department-filter {
    margin-right: 1rem;
}

.department-filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: white;
}

.toggle-view-button {
    padding: 0.6rem 1rem;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.toggle-view-button:hover {
    background-color: #005d8c;
}

/* Tabulator table customizations */
.officers-table-view {
    margin-bottom: 2rem;
}

/* Hide elements when needed */
.hidden {
    display: none !important;
}

/* Tabulator custom styling */
.tabulator {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    font-family: inherit;
}

.tabulator .tabulator-header {
    background-color: #f5f7fa;
    border-bottom: 2px solid #ddd;
}

.tabulator .tabulator-header .tabulator-col {
    background-color: #f5f7fa;
    border-right: 1px solid #ddd;
    padding: 0.8rem;
}

.tabulator .tabulator-header .tabulator-col-content {
    padding: 0.5rem;
}

/* Align sort arrows to the right */
.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-col-sorter {
    justify-content: flex-end;
}

.tabulator .tabulator-header .tabulator-col .tabulator-col-content .tabulator-arrow {
    position: absolute;
    right: 8px;
}

.tabulator .tabulator-row {
    border-bottom: 1px solid #eee;
}

.tabulator .tabulator-row.tabulator-row-even {
    background-color: #f9f9f9;
}

.tabulator .tabulator-row.tabulator-selectable:hover {
    background-color: #edf2f7;
}

.tabulator .tabulator-row .tabulator-cell {
    padding: 0.8rem;
    border-right: 1px solid #eee;
}

/* Officer name link in table */
.officer-name-link {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.officer-name-link:hover {
    color: #005d8c;
    text-decoration: underline;
}

/* Department link in table */
.department-link {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.department-link:hover {
    color: #005d8c;
    text-decoration: underline;
}

/* Email link in table */
.email-link {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.email-link:hover {
    color: #005d8c;
    text-decoration: underline;
}

/* Action buttons in table */
.officer-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.officer-action-button {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.view-button {
    background-color: #0073aa;
    color: white;
}

.view-button:hover {
    background-color: #005d8c;
    color: white;
}

.remove-button {
    background-color: #dc3545;
    color: white;
}

.remove-button:hover {
    background-color: #bd2130;
    color: white;
}

/* Tabulator pagination */
.tabulator-footer {
    background-color: #f5f7fa;
    border-top: 1px solid #ddd;
    padding: 0.5rem;
}

.tabulator-paginator {
    font-size: 0.9rem;
}

.tabulator-page {
    margin: 0 0.2rem;
    padding: 0.4rem 0.8rem;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    transition: all 0.2s ease;
}

.tabulator-page.active {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.tabulator-page:not(.disabled):hover {
    background-color: #eee;
    cursor: pointer;
}

/* Card view styles */
.officers-card-view {
    margin-top: 1.5rem;
}

.officers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Officer card */
.officer-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.officer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.officer-image {
    height: 200px;
    overflow: hidden;
}

.officer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.officer-card:hover .officer-image img {
    transform: scale(1.05);
}

.officer-content {
    padding: 0 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.officer-title {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.officer-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.officer-title a:hover {
    color: #0073aa;
}

.officer-meta {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.officer-position,
.officer-department,
.officer-email {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.meta-label {
    font-weight: 600;
    margin-right: 0.3rem;
    color: #333;
}

.officer-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    align-self: flex-start;
}

.officer-link:hover {
    background-color: #005d8c;
    color: white;
}

/* No results */
.no-results-container {
    text-align: center;
    padding: 3rem 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .officers-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filter,
    .department-filter {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .officers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .officers-grid {
        grid-template-columns: 1fr;
    }
    
    .officer-image {
        height: 180px;
    }
}

/* Officer events section styles */
.officer-events-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

.officer-events-section h3 {
    margin-bottom: 15px;
    font-size: 1.5em;
    color: #333;
}

.officer-events-empty {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    margin-bottom: 20px;
}
