/* =====================================================================
   FullRack Server Builder
   Extends the main design system with a two-column, score-driven UI
   ===================================================================== */

.fr-sb {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 372px;
	gap: 1.75rem;
	align-items: start;
}

@media (max-width: 1100px) {
	.fr-sb { grid-template-columns: 1fr; }
	.fr-sb__side { order: -1; }
	.fr-sb-sticky { position: static !important; }
}

/* ---------- Cards ---------- */
.fr-sb-card {
	background: var(--wp--color-slab, #141a21);
	border: 1px solid var(--wp--color-seam, #263140);
	border-radius: 0.3125rem;
	overflow: hidden;
}
.fr-sb-card + .fr-sb-card { margin-top: 1.25rem; }

.fr-sb-card__hd {
	padding: 1.25rem 1.4rem;
	border-bottom: 1px solid var(--wp--color-seam, #263140);
	background: linear-gradient(180deg, rgba(255,255,255,.022), transparent);
}
.fr-sb-step {
	font-family: ui-monospace, Menlo, monospace;
	font-size: .6875rem;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #3ddc84;
	display: block;
	margin-bottom: .4rem;
}
.fr-sb-card__hd h2 {
	font-size: 1.375rem;
	margin: 0 0 .3rem;
	letter-spacing: -.02em;
	font-weight: 700;
}
.fr-sb-card__hd p {
	margin: 0;
	font-size: .8125rem;
	color: #98a5b4;
}

/* ---------- Needs assessment ---------- */
.fr-sb-need { padding: 1.4rem; display: flex; flex-direction: column; gap: 1.5rem; }
.fr-sb-field { display: flex; flex-direction: column; gap: .55rem; }
.fr-sb-label {
	font-size: .78rem;
	font-weight: 600;
	color: #98a5b4;
	letter-spacing: .01em;
}
.fr-sb-grid-3 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: .9rem;
}

.fr-sb-input {
	width: 100%;
	background: #0d1116;
	border: 1px solid #263140;
	border-radius: .3125rem;
	color: #e8edf3;
	padding: .65rem .8rem;
	font-family: inherit;
	font-size: .9rem;
	transition: border-color .15s;
}
.fr-sb-input:focus { outline: none; border-color: #3ddc84; }
.fr-sb-input::placeholder { color: #37465a; }

/* chips */
.fr-sb-chips {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
	gap: .5rem;
}
.fr-sb-chip {
	text-align: start;
	background: #0d1116;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: .7rem .85rem;
	color: #e8edf3;
	transition: all .18s cubic-bezier(.2,0,0,1);
	display: flex;
	flex-direction: column;
	gap: .1rem;
}
.fr-sb-chip:hover { border-color: #3d4c60; background: #141a21; }
.fr-sb-chip strong { font-size: .875rem; font-weight: 700; }
.fr-sb-chip em { font-style: normal; font-size: .7rem; color: #98a5b4; line-height: 1.5; }
.fr-sb-chip.is-active {
	border-color: #3ddc84;
	background: rgba(61, 220, 132, .08);
	box-shadow: inset 0 0 0 1px rgba(61, 220, 132, .3);
}
.fr-sb-chip.is-active strong { color: #3ddc84; }

/* segmented */
.fr-sb-seg {
	display: inline-flex;
	border: 1px solid #263140;
	border-radius: .3125rem;
	overflow: hidden;
	background: #0d1116;
}
.fr-sb-seg__item {
	background: transparent;
	border: 0;
	padding: .55rem 1.4rem;
	color: #98a5b4;
	font-family: inherit;
	font-size: .85rem;
	font-weight: 600;
	transition: all .15s;
}
.fr-sb-seg__item + .fr-sb-seg__item { border-inline-start: 1px solid #263140; }
.fr-sb-seg__item:hover { color: #e8edf3; background: #141a21; }
.fr-sb-seg__item.is-active { background: #3ddc84; color: #07090c; }

/* actions */
.fr-sb-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.fr-sb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .3125rem;
	color: #e8edf3;
	padding: .68rem 1.2rem;
	font-family: inherit;
	font-size: .875rem;
	font-weight: 700;
	cursor: pointer;
	transition: all .18s cubic-bezier(.2,0,0,1);
	text-decoration: none;
}
.fr-sb-btn:hover { border-color: #3ddc84; color: #3ddc84; transform: translateY(-1px); }
.fr-sb-btn--primary { background: #3ddc84; border-color: #3ddc84; color: #07090c; }
.fr-sb-btn--primary:hover { background: #7dffb4; border-color: #7dffb4; color: #07090c; }
.fr-sb-btn--primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.fr-sb-btn--block { width: 100%; }
.fr-sb-btn--ghost { background: transparent; }

/* reasons */
.fr-sb-reasons {
	background: #0d1116;
	border: 1px solid #263140;
	border-inline-start: 2px solid #3ddc84;
	border-radius: .3125rem;
	padding: .9rem 1.1rem;
	animation: fr-rise .35s cubic-bezier(.2,0,0,1) both;
}
.fr-sb-reasons[hidden] { display: none; }
.fr-sb-reasons h4 {
	font-size: .78rem;
	margin: 0 0 .6rem;
	color: #98a5b4;
	font-weight: 600;
}
.fr-sb-reasons ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.fr-sb-reasons li { font-size: .78rem; display: flex; gap: .5rem; }
.fr-sb-reasons li span:first-child { color: #3ddc84; flex-shrink: 0; }
.fr-sb-reasons li span:last-child { color: #98a5b4; }

@keyframes fr-rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Steps ---------- */
.fr-sb-steps { display: flex; flex-direction: column; }

.fr-sb-step-row { border-bottom: 1px solid var(--wp--color-seam, #263140); }
.fr-sb-step-row:last-child { border-bottom: 0; }

.fr-sb-step-hd {
	width: 100%;
	display: flex;
	align-items: center;
	gap: .8rem;
	padding: 1rem 1.4rem;
	background: transparent;
	border: 0;
	color: #e8edf3;
	font-family: inherit;
	text-align: start;
	cursor: pointer;
	transition: background .15s;
}
.fr-sb-step-hd:hover { background: rgba(255,255,255,.02); }
.fr-sb-step-n {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	flex-shrink: 0;
	border-radius: 50%;
	border: 1px solid #263140;
	font-family: ui-monospace, Menlo, monospace;
	font-size: .75rem;
	color: #98a5b4;
	transition: all .2s;
}
.fr-sb-step-row.has-pick .fr-sb-step-n { background: #3ddc84; border-color: #3ddc84; color: #07090c; font-weight: 700; }
.fr-sb-step-row.has-pick .fr-sb-step-n::after { content: '✓'; }
.fr-sb-step-row.has-pick .fr-sb-step-n span { display: none; }

.fr-sb-step-txt { flex: 1; min-width: 0; }
.fr-sb-step-txt strong { display: block; font-size: .9rem; font-weight: 700; }
.fr-sb-step-txt em { font-style: normal; font-size: .75rem; color: #98a5b4; }
.fr-sb-step-picked {
	font-size: .75rem;
	color: #3ddc84;
	background: rgba(61,220,132,.1);
	border: 1px solid rgba(61,220,132,.25);
	padding: .2rem .55rem;
	border-radius: .3125rem;
	max-width: 45%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex-shrink: 0;
}
.fr-sb-step-caret { color: #37465a; transition: transform .2s; flex-shrink: 0; }
.fr-sb-step-row.is-open .fr-sb-step-caret { transform: rotate(90deg); }

.fr-sb-step-body { display: none; padding: 0 1.4rem 1.3rem; }
.fr-sb-step-row.is-open .fr-sb-step-body { display: block; animation: fr-rise .25s both; }

.fr-sb-options { display: grid; gap: .5rem; }
.fr-sb-opt {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .3rem 1rem;
	align-items: center;
	background: #0d1116;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: .75rem .9rem;
	cursor: pointer;
	transition: all .16s;
	text-align: start;
	color: #e8edf3;
	font-family: inherit;
	width: 100%;
}
.fr-sb-opt:hover { border-color: #3d4c60; background: #141a21; }
.fr-sb-opt.is-active { border-color: #3ddc84; background: rgba(61,220,132,.07); box-shadow: inset 0 0 0 1px rgba(61,220,132,.28); }
.fr-sb-opt.is-blocked { opacity: .45; cursor: not-allowed; }
.fr-sb-opt__name { font-size: .85rem; font-weight: 600; }
.fr-sb-opt__price {
	font-family: ui-monospace, Menlo, monospace;
	font-size: .82rem;
	font-weight: 700;
	color: #3ddc84;
	white-space: nowrap;
}
.fr-sb-opt__specs { grid-column: 1 / -1; font-size: .72rem; color: #98a5b4; display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.fr-sb-opt__specs span::before { content: '·'; margin-inline-end: .35rem; color: #37465a; }
.fr-sb-opt__specs span:first-child::before { content: none; }
.fr-sb-opt__tag {
	font-size: .62rem;
	font-family: ui-monospace, Menlo, monospace;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: .1rem .4rem;
	border-radius: 2px;
	border: 1px solid;
}
.fr-sb-opt__tag.is-new { color: #3ddc84; border-color: rgba(61,220,132,.4); }
.fr-sb-opt__tag.is-out { color: #98a5b4; border-color: #263140; }

.fr-sb-skip {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	margin-top: .7rem;
	background: none;
	border: 0;
	color: #37465a;
	font-family: inherit;
	font-size: .75rem;
	cursor: pointer;
}
.fr-sb-skip:hover { color: #98a5b4; }

.fr-sb-none { font-size: .78rem; color: #98a5b4; padding: .6rem 0; }

/* ---------- Sidebar ---------- */
.fr-sb-sticky { position: sticky; top: 92px; display: flex; flex-direction: column; gap: .85rem; }

.fr-sb-scores {
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: 1.1rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: .8rem;
}
.fr-sb-score__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .35rem; }
.fr-sb-score__top span { font-size: .75rem; color: #98a5b4; }
.fr-sb-score__top b { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; color: #3ddc84; }
.fr-sb-score__bar { height: 4px; background: #1b232d; border-radius: 99px; overflow: hidden; }
.fr-sb-score__bar i {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #3ddc84, #7dffb4);
	border-radius: 99px;
	transition: width .5s cubic-bezier(.4,0,.2,1);
}
.fr-sb-score.is-warn .fr-sb-score__top b { color: #f2b134; }
.fr-sb-score.is-warn .fr-sb-score__bar i { background: linear-gradient(90deg, #f2b134, #ffd27a); }
.fr-sb-score.is-bad .fr-sb-score__top b { color: #ff6b5e; }
.fr-sb-score.is-bad .fr-sb-score__bar i { background: linear-gradient(90deg, #ff6b5e, #ff9c93); }

.fr-sb-summary {
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: 1.1rem 1.2rem;
}
.fr-sb-h3 {
	font-size: .72rem;
	font-family: ui-monospace, Menlo, monospace;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #98a5b4;
	margin: 0 0 .8rem;
	font-weight: 600;
}
.fr-sb-item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: .8rem;
	padding: .45rem 0;
	border-bottom: 1px dashed rgba(38,49,64,.8);
	font-size: .8rem;
}
.fr-sb-item:last-child { border-bottom: 0; }
.fr-sb-item__k { color: #98a5b4; flex-shrink: 0; }
.fr-sb-item__v { color: #e8edf3; text-align: end; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-sb-item__v a { color: #e8edf3; }
.fr-sb-item__v a:hover { color: #3ddc84; }

.fr-sb-empty { font-size: .8rem; color: #37465a; padding: .8rem 0; text-align: center; }

.fr-sb-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: .8rem;
	padding: .8rem .9rem;
	background: rgba(61,220,132,.07);
	border: 1px solid rgba(61,220,132,.25);
	border-radius: .3125rem;
}
.fr-sb-total span { font-size: .78rem; color: #98a5b4; }
.fr-sb-total b { font-size: 1rem; font-weight: 800; color: #3ddc84; }

.fr-sb-issues {
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: .9rem 1rem;
	display: flex;
	flex-direction: column;
	gap: .55rem;
}
.fr-sb-issues[hidden] { display: none; }
.fr-sb-issue { display: flex; gap: .55rem; font-size: .78rem; line-height: 1.6; }
.fr-sb-issue::before { font-family: ui-monospace, monospace; flex-shrink: 0; }
.fr-sb-issue.is-error { color: #ff9c93; }
.fr-sb-issue.is-error::before { content: '✕'; color: #ff6b5e; }
.fr-sb-issue.is-warn { color: #f7cd7a; }
.fr-sb-issue.is-warn::before { content: '!'; color: #f2b134; }
.fr-sb-issue.is-info { color: #98a5b4; }
.fr-sb-issue.is-info::before { content: 'i'; color: #37465a; }

.fr-sb-foot { display: flex; flex-direction: column; gap: .45rem; }
.fr-sb-note { font-size: .7rem; color: #37465a; margin: .4rem 0 0; text-align: center; }

/* ---------- Modal ---------- */
.fr-sb-modal {
	position: fixed;
	inset: 0;
	z-index: 300;
	background: rgba(7,9,12,.82);
	backdrop-filter: blur(6px);
	display: grid;
	place-items: center;
	padding: 1.5rem;
	animation: fr-fade .2s both;
}
.fr-sb-modal[hidden] { display: none; }
@keyframes fr-fade { from { opacity: 0; } }

.fr-sb-modal__box {
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .5rem;
	padding: 1.75rem;
	max-width: 400px;
	width: 100%;
	position: relative;
	animation: fr-rise .28s cubic-bezier(.2,0,0,1) both;
}
.fr-sb-modal__box h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.fr-sb-modal__box p { font-size: .82rem; color: #98a5b4; margin-bottom: 1.1rem; }
.fr-sb-modal__x {
	position: absolute;
	top: .6rem;
	inset-inline-end: .8rem;
	background: none;
	border: 0;
	color: #98a5b4;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.fr-sb-modal__x:hover { color: #e8edf3; }
.fr-sb-quote-form { display: flex; flex-direction: column; gap: .6rem; }
.fr-sb-quote-msg { font-size: .8rem; margin: .8rem 0 0; min-height: 1.2em; }
.fr-sb-quote-msg.is-ok { color: #3ddc84; }
.fr-sb-quote-msg.is-err { color: #ff6b5e; }

/* ---------- Saved build sheet ---------- */
.fr-sb-sheet {
	background: #141a21;
	border: 1px solid #263140;
	border-radius: .5rem;
	padding: 1.75rem;
	margin-top: 2rem;
}
.fr-sb-sheet header { margin-bottom: 1.4rem; }
.fr-sb-sheet h2 { font-size: 1.35rem; margin: .3rem 0 0; }
.fr-sb-sheet__scores {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: .6rem;
	margin-bottom: 1.4rem;
}
.fr-sb-sheet__scores div {
	background: #0d1116;
	border: 1px solid #263140;
	border-radius: .3125rem;
	padding: .6rem .8rem;
}
.fr-sb-sheet__scores span {
	display: block;
	font-size: .68rem;
	color: #98a5b4;
	font-family: ui-monospace, monospace;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.fr-sb-sheet__scores b { font-size: 1.1rem; color: #3ddc84; font-family: ui-monospace, monospace; }

.fr-sb-sheet__table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.fr-sb-sheet__table th,
.fr-sb-sheet__table td { text-align: start; padding: .7rem .5rem; border-bottom: 1px solid #263140; }
.fr-sb-sheet__table th { color: #98a5b4; font-weight: 600; width: 130px; }
.fr-sb-sheet__table td:last-child { color: #3ddc84; font-family: ui-monospace, monospace; white-space: nowrap; }
.fr-sb-sheet__table tfoot th,
.fr-sb-sheet__table tfoot td { font-weight: 800; border-bottom: 0; padding-top: 1rem; }
.fr-sb-sheet__table tfoot td { color: #3ddc84; font-size: 1.05rem; }

.fr-sb-sheet__issues { margin-top: 1.4rem; }
.fr-sb-sheet__issues p { font-size: .8rem; margin-bottom: .4rem; }
.fr-sb-sheet__issues .is-error { color: #ff9c93; }
.fr-sb-sheet__issues .is-warn { color: #f7cd7a; }
.fr-sb-sheet__issues .is-info { color: #98a5b4; }

.fr-sb-sheet__foot { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.6rem; }