/* Saved Equipment Builder families list (/equipmentbuilder and /account) and the saved psych
   charts list (/account). Built by static/js/eb-families.js and static/js/psych-charts-list.js. */

.ebf {
    max-width: 900px;
    margin: 28px auto 0;
    padding: 18px 20px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.ebf[hidden] { display: none; }

.ebf-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 10px;
}

.ebf-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: #2a3d51;
    letter-spacing: -0.01em;
}

.ebf-list {
    display: flex;
    flex-direction: column;
}

.ebf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid #e5e7eb;
}

.ebf-row:first-child { border-top: none; }

.ebf-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ebf-name {
    color: #2a3d51;
    font-weight: 500;
    font-size: 0.94rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The account's free family (fam.free), kept even without a subscription. */
.ebf-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e3f6e8;
    color: #1f7a3d;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: 1px;
}

.ebf-meta {
    color: #555555;
    font-size: 0.8rem;
    margin-top: 2px;
}

.ebf-actions {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.ebf-btn {
    font: inherit;
    font-size: 0.83rem;
    line-height: 1;
    padding: 7px 12px;
    border-radius: 6px;
    border: 1px solid #0a87ed;
    background: #0a87ed;
    color: #ffffff;
    cursor: pointer;
}

.ebf-btn:hover:not(:disabled) { background: #0969bc; border-color: #0969bc; }
.ebf-btn:disabled { opacity: 0.6; cursor: default; }

.ebf-btn.ghost {
    background: #ffffff;
    color: #555555;
    border-color: #e5e7eb;
}

.ebf-btn.ghost:hover:not(:disabled) { color: #2a3d51; border-color: #555555; background: #f7f7f7; }

.ebf-msg {
    margin-top: 10px;
    font-size: 0.83rem;
    color: #b3261e;
}

.ebf-msg[hidden] { display: none; }

@media (max-width: 560px) {
    .ebf { padding: 16px 14px 12px; }
    .ebf-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
    .ebf-name { font-size: 1rem; white-space: normal; overflow-wrap: anywhere; }
    .ebf-meta { font-size: 0.85rem; }
    .ebf-actions { width: 100%; }
    .ebf-btn { flex: 1 1 auto; }
    .ebf-btn.ghost { flex: 0 0 auto; }
    .ebf-msg { font-size: 0.9rem; }
}

/* Recent (static/js/eb-recent.js) reuses the rows above; only the forget button differs. */
.ebf-btn.ebf-x {
    font-size: 1rem;
    line-height: 1;
    padding: 6px 10px;
}

/* finger sized buttons wherever the page stacks (tablets and phones) */
@media (max-width: 900px) {
    .ebf-btn { min-height: 40px; padding: 10px 16px; font-size: 0.95rem; }
    .ebf-btn.ebf-x { min-width: 44px; padding: 10px 14px; }
}

/* Saved psych charts (static/js/psych-charts-list.js) reuse the rows above. */
.ebf-link {
    font-size: 0.83rem;
    color: #0a87ed;
    text-decoration: none;
    white-space: nowrap;
}

.ebf-link:hover { text-decoration: underline; }

a.ebf-name { text-decoration: none; }
a.ebf-name:hover { text-decoration: underline; }

a.ebf-btn { text-decoration: none; display: inline-flex; align-items: center; }

.psc-rename {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.psc-rename-in {
    flex: 1 1 auto;
    min-width: 0;
}

.ebf-btn.ghost.psc-armed {
    color: #b3261e;
    border-color: #b3261e;
}

@media (max-width: 560px) {
    .psc-rename { flex-wrap: wrap; }
    .psc-rename-in { flex-basis: 100%; }
}
