/* Employee Manager - Frontend Styles */

/* ──────────────────────────────────────────
   Filter Bar
────────────────────────────────────────── */
.em-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.em-filter-btn {
    padding: 6px 16px;
    border: 2px solid #333;
    background: transparent;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.em-filter-btn:hover,
.em-filter-btn.active {
    background: #333;
    color: #fff;
}

/* ──────────────────────────────────────────
   Grid Layout
────────────────────────────────────────── */
.em-employee-grid {
    display: grid;
    gap: 24px;
}

.em-layout-grid.em-col-1 { grid-template-columns: 1fr; }
.em-layout-grid.em-col-2 { grid-template-columns: repeat(2, 1fr); }
.em-layout-grid.em-col-3 { grid-template-columns: repeat(3, 1fr); }
.em-layout-grid.em-col-4 { grid-template-columns: repeat(4, 1fr); }

/* ──────────────────────────────────────────
   List Layout
────────────────────────────────────────── */
.em-layout-list {
    grid-template-columns: 1fr;
}

.em-layout-list .em-employee-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.em-layout-list .em-employee-photo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
}

/* ──────────────────────────────────────────
   Employee Card
────────────────────────────────────────── */
.em-employee-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.em-employee-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Photo */
.em-employee-photo {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}

.em-employee-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.em-employee-card:hover .em-employee-photo img {
    transform: scale(1.03);
}

/* Initials fallback */
.em-no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
}

.em-initials {
    font-size: 2rem;
    font-weight: 700;
    color: #999;
    letter-spacing: 2px;
}

/* Info */
.em-employee-info {
    padding: 16px;
}

.em-employee-name {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.em-employee-name a {
    text-decoration: none;
    color: inherit;
}

.em-employee-name a:hover {
    text-decoration: underline;
}

.em-field {
    margin: 4px 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.em-field .em-label {
    font-weight: 600;
    color: #333;
}

.em-field a {
    color: inherit;
}

.em-employee-category {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 50px;
    color: #666;
}

.em-read-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.em-read-more:hover {
    opacity: 0.7;
}

/* ──────────────────────────────────────────
   Single Employee
────────────────────────────────────────── */
.em-single-employee {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.em-single-photo {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.em-single-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.em-single-info h1 {
    margin-top: 0;
}

.em-single-fields {
    margin-top: 20px;
}

.em-single-field {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 16px;
}

.em-single-field:last-child {
    border-bottom: none;
}

.em-single-field .em-label {
    font-weight: 600;
    min-width: 150px;
    color: #555;
}

.em-back-link {
    display: inline-block;
    margin-bottom: 24px;
    font-size: 0.9rem;
    text-decoration: none;
    color: #666;
}

.em-back-link:hover {
    color: #333;
}

/* ──────────────────────────────────────────
   Empty state
────────────────────────────────────────── */
.em-no-employees {
    color: #888;
    font-style: italic;
    grid-column: 1 / -1;
}

/* ──────────────────────────────────────────
   Responsive
────────────────────────────────────────── */
@media (max-width: 900px) {
    .em-layout-grid.em-col-4 { grid-template-columns: repeat(2, 1fr); }
    .em-layout-grid.em-col-3 { grid-template-columns: repeat(2, 1fr); }
    .em-single-employee      { grid-template-columns: 1fr; }
    .em-single-photo         { max-width: 300px; }
}

@media (max-width: 600px) {
    .em-layout-grid.em-col-2,
    .em-layout-grid.em-col-3,
    .em-layout-grid.em-col-4 { grid-template-columns: 1fr; }
    .em-layout-list .em-employee-card { flex-direction: column; }
    .em-layout-list .em-employee-photo { width: 100%; height: auto; }
}
