﻿/* ════════════════════════════════════════════════════════════════════════════
   NEXUS — Matchmaking styles
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Landing ──────────────────────────────────────────────────────────────── */
.mm-landing-card {
    max-width: 640px;
    margin: 2rem auto;
    text-align: center;
}

/* ── Proposal header card ─────────────────────────────────────────────────── */
.mm-header-card {
    border-left: 4px solid #1976D2;
}

.mm-header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #001f3f;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mm-header-meta {
    font-size: 0.87rem;
    color: #444;
    margin-top: 0.15rem;
}

/* ── Estado badges ────────────────────────────────────────────────────────── */
.mm-estado-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.mm-estado-badge-sm {
    padding: 2px 8px;
    font-size: 0.72rem;
}

.mm-estado-badge-xs {
    padding: 1px 6px;
    font-size: 0.68rem;
}

/* ── Three-column cockpit grid ────────────────────────────────────────────── */
.mm-cockpit-grid {
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    gap: 1rem;
    align-items: start;
}

.mm-cockpit-grid--readonly {
    grid-template-columns: 3fr 1fr;
}

@media (max-width: 1280px) {
    .mm-cockpit-grid {
        grid-template-columns: 220px 1fr 220px;
    }
}

@media (max-width: 960px) {
    .mm-cockpit-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Generic panel ────────────────────────────────────────────────────────── */
.mm-panel {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.mm-panel-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #001f3f;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 0.4rem;
}

/* ── Available professor card ─────────────────────────────────────────────── */
.mm-avail-card {
    background: #f9fafb;
    border: 1px solid #e8eaf0;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    transition: box-shadow 0.15s ease;
}

.mm-avail-card:hover {
    box-shadow: 0 2px 8px rgba(0,100,200,0.12);
    border-color: rgba(0,190,255,0.4);
}

.mm-avail-name {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1a1a2e;
}

.mm-avail-meta {
    font-size: 0.78rem;
    color: #666;
}

/* ── Selected professor card ──────────────────────────────────────────────── */
.mm-docente-card {
    border: 1px solid #bbdefb;
    border-radius: 8px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(25,118,210,0.08);
}

.mm-docente-header {
    background: #e3f2fd;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #bbdefb;
}

.mm-ordem-badge {
    background: #000; /*#1976D2;*/
    color: #fff;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Topics inside professor card ─────────────────────────────────────────── */
.mm-temas-section {
    padding: 0.6rem 0.75rem;
}

.mm-tema-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    border-bottom: 1px dashed #f0f0f0;
    flex-wrap: wrap;
}

.mm-tema-titulo {
    flex: 1;
    font-size: 0.83rem;
    color: #222;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-tema-titulo2 {
    flex: 1;
    font-size: 0.83rem;
    color: #222;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: block;
    line-height: 1.3;
}

/* ── Global ranking panel ─────────────────────────────────────────────────── */
.mm-ranking-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.mm-rank-badge {
    background: #1976D2;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Center panel: per-tema global rank circle ────────────────────────────── */
.mm-rank-mini {
    background: #1976D2;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Empty states ─────────────────────────────────────────────────────────── */
.mm-empty-state {
    text-align: center;
    padding: 1.5rem;
    color: #9E9E9E;
}

.mm-empty-hint {
    font-size: 0.82rem;
    color: #aaa;
    margin: 0.25rem 0;
    font-style: italic;
}

/* ── Inline dialog overlay ────────────────────────────────────────────────── */
.mm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding-top: 80px;
    padding-bottom: 40px;
}

.mm-dialog-box {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.22);
    width: 480px;
    max-width: 96vw;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    z-index: 10000;
}

.mm-dialog-box--wide {
    width: 640px;
}

.mm-dialog-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.1rem;
    background: black;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}

.mm-dialog-body {
    padding: 1rem 1.1rem;
    overflow-y: auto;
    flex: 1;
}

.mm-dialog-footer {
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: #fafafa;
}

/* ── Predefined topic picker ──────────────────────────────────────────────── */
.mm-tema-picker-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 280px;
    overflow-y: auto;
}

.mm-tema-picker-item {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #fafafa;
}

.mm-tema-picker-item:hover {
    border-color: #1976D2;
    background: #e3f2fd;
}

.mm-tema-picker-item--selected {
    border-color: #1976D2;
    background: #bbdefb;
}

.mm-tema-picker-titulo {
    font-weight: 600;
    font-size: 0.88rem;
    color: #1a1a2e;
}

.mm-tema-picker-desc {
    font-size: 0.78rem;
    color: #555;
    margin-top: 0.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/*

    DOCENTE TEMAS

*/

/* ── Toolbar ── */
.dt-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.dt-view-toggle {
    display: flex;
    gap: 2px;
}

/* ── Card grid ── */
.dt-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    align-items: start;
}

/* ── Base card ── */
.dt-card {
    border: 1px solid var(--rz-border-disabled-color, #e0e0e0);
    border-left: 4px solid transparent;
    border-radius: 8px;
    padding: 1rem;
    background: var(--rz-panel-background-color, #fff);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: box-shadow 0.15s;
}

    .dt-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.09);
    }

.dt-card--active {
    border-left-color: var(--rz-success, #28a745);
}

.dt-card--inactive {
    border-left-color: #bdbdbd;
    background: #f9f9f9;
    opacity: 0.88;
}

/* ── Meta badges ── */
.dt-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.dt-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.dt-badge--lectivo {
    background: #e3f2fd;
    color: #1565c0;
}

.dt-badge--idioma {
    background: #f3e5f5;
    color: #6a1b9a;
}

.dt-badge--vagas {
    background: #fff8e1;
    color: #f57f17;
}

.dt-badge--ativo {
    background: #e8f5e9;
    color: #2e7d32;
}

.dt-badge--inativo {
    background: #eeeeee;
    color: #757575;
}

/* ── Title ── */
.dt-card-title {
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--rz-text-color);
    line-height: 1.35;
    word-break: break-word;
}

/* ── Description — clamped to 3 lines ── */
.dt-card-desc {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Keywords ── */
.dt-card-keywords {
    font-size: 0.74rem;
    color: var(--rz-text-disabled-color);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Actions — right-aligned, icon-only ── */
.dt-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid var(--rz-border-disabled-color, #f0f0f0);
}

/* ── Confirm dialog ── */
.dt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dt-dialog {
    background: var(--rz-panel-background-color, #fff);
    border-radius: 8px;
    padding: 1.5rem;
    width: min(460px, 90vw);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.dt-dialog-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.dt-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1rem;
}

@@media (max-width: 600px) {
    .dt-card-grid {
        grid-template-columns: 1fr;
    }

    .dt-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}