/* Directory Page Styles */

.directory-hero {
    padding-top: 8rem;
    padding-bottom: 3rem;
    text-align: center;
}

.directory-hero__title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.directory-hero__subtitle {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text-muted, #94a3b8);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Notice Banner */
.directory-notice {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #eab308;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-align: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    margin: 0 auto 2rem;
    display: none;
    max-width: fit-content;
}

.directory-notice.visible {
    display: block;
}

/* Filters */
.directory-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
    width: fit-content;
    max-width: 100%;
}

.directory-search,
.directory-filter {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 180px;
}

.directory-search:focus,
.directory-filter:focus {
    border-color: var(--accent, #00e5ff);
    box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.directory-filter option {
    background: #0a0a1a;
    color: #e2e8f0;
}

/* Agent Card Grid */
.directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
    margin: 0 auto;
    width: 100%;
}

/* Agent Card */
.agent-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.agent-card:hover {
    border-color: rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Avatar */
.agent-card__avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.agent-card__avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.agent-card__avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(139, 92, 246, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent, #00e5ff);
}

/* Live Status Dot */
.agent-card__status {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2px solid #0a0a1a;
    background: #6b7280;
}

.agent-card__status--active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.agent-card__status--deployed {
    background: #3b82f6;
}

.agent-card__status--barracked {
    background: #6b7280;
}

.agent-card__status--off_duty {
    background: #4b5563;
}

.agent-card__status--winding_down {
    background: #eab308;
}

.agent-card__status--cooldown {
    background: #a855f7;
}

/* Name / Acronym */
.agent-card__acronym {
    font-family: 'Orbitron', sans-serif;
    color: #00e5ff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 0.15rem;
}

.agent-card__expansion {
    font-style: italic;
    color: #64748b;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.agent-card__name {
    font-family: 'Antonio', sans-serif;
    font-size: 1.1rem;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
}

.agent-card__title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

/* Type Badge */
.agent-card__type {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.agent-card__type--director {
    background: rgba(0, 229, 255, 0.12);
    color: #00e5ff;
    border: 1px solid rgba(0, 229, 255, 0.25);
}

.agent-card__type--staff {
    background: rgba(139, 92, 246, 0.12);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.agent-card__type--human {
    background: rgba(244, 114, 182, 0.12);
    color: #f472b6;
    border: 1px solid rgba(244, 114, 182, 0.25);
}

.agent-card__department {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
}

.agent-card__email {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent, #00e5ff);
    text-decoration: none;
    display: block;
    margin-top: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    word-break: break-all;
}

.agent-card__email:hover {
    opacity: 1;
}

/* ── Agent Profile Modal ── */
.dir-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: dirModalFadeIn 0.2s ease;
}

@keyframes dirModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dir-modal__panel {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.98), rgba(10, 10, 26, 0.98));
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.1), 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: dirPanelSlide 0.25s ease;
}

@keyframes dirPanelSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.dir-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s;
}

.dir-modal__close:hover {
    color: #fff;
}

.dir-modal__avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    overflow: hidden;
    border: 2px solid rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.dir-modal__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dir-modal__avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(139, 92, 246, 0.15));
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00e5ff;
}

.dir-modal__acronym {
    font-family: 'Orbitron', sans-serif;
    color: #00e5ff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0 0 0.25rem;
}

.dir-modal__expansion {
    font-style: italic;
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 1.5rem;
    line-height: 1.4;
}

.dir-modal__name {
    font-family: 'Antonio', sans-serif;
    font-size: 1.5rem;
    color: #e2e8f0;
    margin: 0 0 1.5rem;
}

.dir-modal__info {
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1.25rem;
}

.dir-modal__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dir-modal__label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

.dir-modal__value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #e2e8f0;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
}

.dir-modal__value a {
    text-decoration: none;
}

.dir-modal__value a:hover {
    text-decoration: underline;
}

.dir-modal__status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: capitalize;
}

.dir-modal__status--active {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.dir-modal__status--deployed {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.dir-modal__status--barracked {
    background: rgba(107, 114, 128, 0.15);
    color: #9ca3af;
}

.dir-modal__status--winding_down {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.dir-modal__status--off_duty {
    background: rgba(75, 85, 99, 0.15);
    color: #6b7280;
}

/* Responsive */
@media (max-width: 768px) {
    .directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .directory-filters {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
    }

    .directory-search,
    .directory-filter {
        min-width: unset;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .directory-grid {
        grid-template-columns: 1fr 1fr;
    }

    .agent-card {
        padding: 1.25rem 1rem;
    }

    .agent-card__avatar-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .agent-card__avatar {
        width: 60px;
        height: 60px;
    }
}
