/* Family Tree Maker - shared card + graph styling (used by the SPA and the
   public share view). Tailwind is purged at build time so these component
   classes live here rather than as utility classes. */

.ft-graph {
    background:
        radial-gradient(circle at 1px 1px, rgba(148, 163, 184, 0.12) 1px, transparent 0);
    background-size: 24px 24px;
}

.ft-card {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    background: linear-gradient(135deg, #020617, #0f172a);
    border: 1px solid rgba(51, 65, 85, 0.9);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

.ft-card-founder {
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 6px 18px rgba(0, 0, 0, 0.4);
}

.ft-card-portrait {
    flex: 0 0 auto;
    width: 64px;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ft-card-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 1.5rem;
}

.ft-card-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.ft-card-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ft-card-skin {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ft-card-agid {
    font-size: 0.68rem;
    color: #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Tree detail layout: a narrow control rail on the left and the graph canvas
   taking all remaining width. Done in plain CSS (with a media query) because
   the purged output.css can't be relied on for a custom column split. */
.ft-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}
@media (min-width: 1280px) {
    .ft-detail-grid {
        grid-template-columns: 248px minmax(0, 1fr);
    }
}

/* Interactive components built without Tailwind opacity utilities (those get
   stripped by the purged output.css build). Keeps buttons/badges/toasts/panels
   rendering correctly regardless of which utilities survive the purge. */
.ft-toast { border-width: 1px; border-style: solid; }
.ft-toast-success { background: rgba(6, 78, 59, 0.45); color: #6ee7b7; border-color: #065f46; }
.ft-toast-error { background: rgba(127, 29, 29, 0.45); color: #fca5a5; border-color: #991b1b; }

.ft-btn-approve {
    background: rgba(4, 120, 87, 0.55);
    color: #d1fae5;
}
.ft-btn-approve:hover { background: rgba(4, 120, 87, 0.9); }

.ft-btn-reject, .ft-btn-danger {
    background: rgba(127, 29, 29, 0.4);
    color: #fca5a5;
}
.ft-btn-reject:hover, .ft-btn-danger:hover { background: rgba(127, 29, 29, 0.65); }

.ft-badge-pending {
    background: #f59e0b;
    color: #451a03;
    font-weight: 700;
}

.ft-panel-pending {
    border: 1px solid rgba(180, 83, 9, 0.4);
    background: rgba(69, 26, 3, 0.15);
}

.ft-chip-species {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

.ft-tree-card { transition: border-color 0.15s ease; }
.ft-tree-card:hover { border-color: #0f766e; }

/* Connector legend swatches */
.ft-legend-line {
    display: inline-block;
    width: 22px;
    height: 0;
    border-top-width: 2px;
    border-top-style: solid;
    vertical-align: middle;
}
