/* Staff Management Widget Styles */
/* All pagination buttons */
.pagination-wrapper .btn {
    background-color: #f0f0f0; /* Example background */
    color: #000;
}

/* Inactive buttons */
.pagination-wrapper .btn-outline-primary {
    background-color: transparent;
    color: #000000;
    border-color: #e56d0d;
}

/* Active button */
.pagination-wrapper .btn-primary {
    background-color: #e56d0d; /* Your desired active bg */
    color: #fff;
    border-color: #e56d0d;
}

.staff-card {
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-radius: var(--card-border-radius, 8px);
    overflow: hidden;
    text-align: center;
    padding: 1rem;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.staff-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: -1rem auto 1rem;
    border-radius: 50%;
    padding: 5px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.staff-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--image-border-color, #e9ecef);
}

.staff-info {
    padding: 1rem;
    background: #fff;
    border-radius: var(--card-border-radius, 8px);
}

.staff-name {
    font-size: var(--name-font-size, 1.25rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--name-color, #2c3e50);
}

.employee-id {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: normal;
    margin-left: 0.5rem;
}

.staff-designation {
    color: var(--designation-color, #666);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.staff-department {
    color: var(--department-text-color, #495057);
    font-size: 0.85rem;
    padding: 0.25rem 0.75rem;
    background: var(--department-badge-color, #e9ecef);
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1rem;
}

.staff-details {
    text-align: left;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.staff-details:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

.detail-row {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-weight: 600;
    color: #495057;
    margin-right: 0.5rem;
    min-width: 120px;
}

.detail-value {
    color: #6c757d;
    flex: 1;
}

.detail-value.remarks {
    font-style: italic;
}

/* Table View Styles */
.staff-table {
    margin-bottom: 2rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.staff-table th {
    font-weight: 600;
    white-space: nowrap;
    padding: 1rem !important;
    vertical-align: middle !important;
}

.staff-table td {
    padding: 1rem !important;
    vertical-align: middle !important;
}

.staff-table img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Read More Button Styles */
.btn-read-more {
    padding: 5px 10px;
    font-size: 0.875rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-decoration: none !important;
    display: inline-block;
    background-color: #e56d0d;
    color: #fff !important;
    border: none;
    margin: 5px 0;
}

.btn-read-more:hover {
    background-color: #e56d0d;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.staff-btn-read-more {
    display: inline-block;
    padding: 5px 10px;
    background-color: #e56d0d !important;
    color: #ffffff !important;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1.5;
    text-align: center;
}

.staff-btn-read-more:hover {
    background-color: #e56d0d;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #ffffff !important;
}

.staff-grid-item .staff-btn-read-more {
    display: block;
    text-align: center;
    margin: 15px auto 0;
    max-width: 150px;
}

.staff-table-view .staff-btn-read-more {
    margin: 0;
    padding: 6px 15px;
    font-size: 13px;
    white-space: nowrap;
}

/* Table View Button Container */
.staff-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

/* Ensure buttons are visible on darker table backgrounds */
.table-dark .staff-btn-read-more {
    background-color: #ffffff;
    color: var(--e-global-color-primary, #e56d0d) !important;
}

.table-dark .staff-btn-read-more:hover {
    background-color: #f8f9fa;
    color: var(--e-global-color-primary-dark, #e56d0d) !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .staff-card {
        margin-bottom: 1rem;
    }
    
    .staff-photo-wrapper {
        width: 120px;
        height: 120px;
    }
    
    .staff-name {
        font-size: calc(var(--name-font-size, 1.25rem) * 0.9);
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        margin-bottom: 1rem;
        border-radius: var(--card-border-radius, 8px);
        overflow: hidden;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .staff-card {
        background-color: var(--card-bg-dark, #2c3e50);
    }
    
    .staff-info {
        background-color: var(--card-bg-dark, #2c3e50);
    }
    
    .staff-name {
        color: var(--name-color-dark, #fff);
    }
    
    .staff-designation {
        color: var(--designation-color-dark, #cbd5e0);
    }
    
    .detail-label {
        color: #cbd5e0;
    }
    
    .detail-value {
        color: #a0aec0;
    }

    .staff-details {
        border-top-color: rgba(255,255,255,0.1);
    }
}
