/* ==========================================================================
   Sözleşme Merkezi Premium — library.css (Belge kütüphanesi, 1.7.0)
   Üç grup sekmesi → konu kartları → belgeler
   ========================================================================== */

.smp-libx-hero {
	padding-bottom: 0;
	background:
		radial-gradient(800px 380px at 92% 0%, rgba(31, 111, 235, 0.2), transparent 60%),
		radial-gradient(600px 300px at 0% 100%, rgba(184, 153, 88, 0.16), transparent 60%),
		var(--smp-midnight);
}
.smp-libx-hero .smp-lib-hero__lead {
	margin-bottom: 1.75rem;
}
.smp-libx-form {
	max-width: 860px;
}
.smp-libx-form__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.5rem;
	margin-top: 1rem;
}

/* Anahtar (switch) */
.smp-libx-switch {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.95rem;
	cursor: pointer;
	user-select: none;
}
.smp-libx-switch input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.smp-libx-switch__track {
	position: relative;
	width: 42px;
	height: 24px;
	border-radius: 99px;
	background: rgba(255, 255, 255, 0.18);
	transition: background 0.2s;
}
.smp-libx-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s var(--smp-ease);
}
.smp-libx-switch input:checked + .smp-libx-switch__track {
	background: var(--smp-ok);
}
.smp-libx-switch input:checked + .smp-libx-switch__track::after {
	transform: translateX(18px);
}
.smp-libx-switch input:focus-visible + .smp-libx-switch__track {
	box-shadow: 0 0 0 3px var(--smp-gold);
}

/* Grup sekmeleri: girişin alt kenarına oturan kartlar */
.smp-libx-tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin-top: 2.25rem;
	transform: translateY(1px);
}
.smp-libx-tab {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.9rem;
	padding: 1.1rem 1.25rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-bottom: 0;
	border-radius: 16px 16px 0 0;
	background: rgba(255, 255, 255, 0.04);
	color: #fff;
	text-decoration: none;
	transition: background 0.2s, border-color 0.2s;
}
.smp-libx-tab:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.smp-libx-tab:focus-visible {
	outline: 3px solid var(--smp-gold);
	outline-offset: -3px;
}
.smp-libx-tab__icon {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 50px;
	height: 50px;
	border-radius: 14px;
	background: rgba(184, 153, 88, 0.16);
	color: var(--smp-gold);
}
.smp-libx-tab__body {
	display: grid;
	min-width: 0;
}
.smp-libx-tab__label {
	font-family: var(--smp-serif);
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.15;
}
.smp-libx-tab__meta {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}
.smp-libx-tab__ready {
	margin-left: auto;
	padding: 0.2rem 0.6rem;
	border-radius: 99px;
	background: rgba(31, 122, 77, 0.25);
	color: #8ee0b5;
	font-size: 0.75rem;
	font-weight: 700;
	white-space: nowrap;
}
.smp-libx-tab[aria-current] {
	background: #fff;
	border-color: #fff;
	color: var(--smp-ink);
}
.smp-libx-tab[aria-current] .smp-libx-tab__icon {
	background: var(--smp-midnight);
	color: var(--smp-gold);
}
.smp-libx-tab[aria-current] .smp-libx-tab__meta {
	color: var(--smp-muted);
}
.smp-libx-tab[aria-current] .smp-libx-tab__ready {
	background: var(--smp-ok-soft);
	color: var(--smp-ok);
}
.smp-libx-tab[aria-current]::before {
	content: "";
	position: absolute;
	top: 0;
	left: 1.25rem;
	right: 1.25rem;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: var(--smp-gold);
}
@media (max-width: 899px) {
	.smp-libx-tabs {
		display: flex;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: -16px;
		padding-inline: 16px;
	}
	.smp-libx-tabs::-webkit-scrollbar {
		display: none;
	}
	.smp-libx-tab {
		flex: 0 0 auto;
		padding: 0.85rem 1rem;
		gap: 0.65rem;
	}
	.smp-libx-tab__icon {
		width: 40px;
		height: 40px;
	}
	.smp-libx-tab__label {
		font-size: 1.15rem;
	}
	.smp-libx-tab__ready {
		display: none;
	}
}

/* Gövde */
.smp-libx-body {
	padding-top: clamp(2rem, 4vw, 3rem);
	padding-bottom: var(--smp-section);
}
.smp-libx-body .smp-lib-status:empty {
	display: none;
}
/* Gizli paneller araya boşluk sokmaz: hangi sekme açık olursa olsun başlık aynı yükseklikte başlar. */
.smp-libx-panel:not([hidden]) ~ .smp-libx-panel:not([hidden]) {
	margin-top: 3.5rem;
}
.smp-libx-panel__head {
	margin-bottom: 1.75rem;
}
.smp-libx-panel__head h2 {
	margin: 0;
	font-family: var(--smp-serif);
	font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.4rem);
	font-weight: 600;
}
.smp-libx-panel__head p {
	margin: 0.4rem 0 0;
	max-width: none;
	color: var(--smp-muted);
}
.smp-libx-panel__grid {
	display: grid;
	gap: 1.75rem;
}
@media (min-width: 1024px) {
	.smp-libx-panel__grid {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 2.5rem;
		align-items: start;
	}
}

/* Konu listesi (yan sütun) */
.smp-libx-topics__title {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--smp-gold-ink);
}
.smp-libx-topics ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
.smp-libx-topics li[hidden] {
	display: none;
}
.smp-libx-topics a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	color: var(--smp-ink-2);
	font-size: 0.94rem;
	text-decoration: none;
}
.smp-libx-topics a:hover {
	background: var(--smp-ivory-2);
	color: var(--smp-ink);
}
.smp-libx-topics__n {
	flex: none;
	min-width: 1.8rem;
	padding: 0.05rem 0.45rem;
	border-radius: 99px;
	background: var(--smp-ivory-2);
	color: var(--smp-muted);
	font-size: 0.75rem;
	font-weight: 700;
	text-align: center;
}
@media (min-width: 1024px) {
	.smp-libx-topics {
		position: sticky;
		top: calc(var(--smp-header-h) + 20px);
		max-height: calc(100vh - var(--smp-header-h) - 40px);
		overflow-y: auto;
		padding-right: 0.25rem;
		scrollbar-width: thin;
	}
}
@media (max-width: 1023px) {
	.smp-libx-topics__title {
		display: none;
	}
	.smp-libx-topics ul {
		display: flex;
		gap: 0.5rem;
		overflow-x: auto;
		scrollbar-width: none;
		margin-inline: -16px;
		padding: 0 16px 0.25rem;
	}
	.smp-libx-topics ul::-webkit-scrollbar {
		display: none;
	}
	.smp-libx-topics li {
		flex: none;
	}
	.smp-libx-topics a {
		border: 1px solid var(--smp-line-2);
		border-radius: 99px;
		background: #fff;
		white-space: nowrap;
	}
}

/* Konu kartları */
.smp-libx-topics,
.smp-libx-cards {
	min-width: 0;
}
/* Ortak ızgara: masaüstü 3, tablet 2, mobil 1 sütun. Her kart 3 satırlık alt ızgaradır
   (başlık · belge listesi · "Tümünü göster"); aynı sıradaki kartların başlıkları, liste başlangıçları
   ve alt kenarları aynı çizgide durur. */
.smp-libx-cards {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	column-gap: 1.25rem;
	row-gap: 0;
	align-items: stretch;
}
@media (min-width: 640px) {
	.smp-libx-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (min-width: 1100px) {
	.smp-libx-cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
.smp-libx-cards > .smp-libx-card {
	grid-row: span 3;
	grid-template-rows: subgrid;
	row-gap: 0;
	margin-bottom: 1.25rem;
}
@supports not (grid-template-rows: subgrid) {
	.smp-libx-cards > .smp-libx-card {
		grid-template-rows: auto 1fr auto;
	}
}
.smp-libx-card {
	--tone: var(--smp-gold);
	--tone-soft: rgba(184, 153, 88, 0.14);
	position: relative;
	display: grid;
	padding: 1.25rem 1.25rem 0.75rem;
	border: 1px solid var(--smp-line);
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--smp-shadow);
	scroll-margin-top: calc(var(--smp-header-h) + 20px);
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.25s;
}
.smp-libx-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 4px;
	background: var(--tone);
	opacity: 0.85;
}
.smp-libx-card:hover {
	border-color: var(--smp-line-2);
	box-shadow: 0 24px 44px -30px rgba(13, 17, 23, 0.4);
}
.smp-libx-card[hidden] {
	display: none;
}

.smp-libx-card.is-target {
	box-shadow: 0 0 0 3px var(--tone-soft), var(--smp-shadow);
}
.smp-tone--gold { --tone: #b89958; --tone-soft: rgba(184, 153, 88, 0.15); }
.smp-tone--blue { --tone: #1f6feb; --tone-soft: rgba(31, 111, 235, 0.1); }
.smp-tone--rose { --tone: #c2546f; --tone-soft: rgba(194, 84, 111, 0.12); }
.smp-tone--green { --tone: #1f7a4d; --tone-soft: rgba(31, 122, 77, 0.11); }
.smp-tone--amber { --tone: #c47a1c; --tone-soft: rgba(196, 122, 28, 0.13); }
.smp-tone--violet { --tone: #6a4fc7; --tone-soft: rgba(106, 79, 199, 0.11); }
.smp-tone--teal { --tone: #127a7a; --tone-soft: rgba(18, 122, 122, 0.11); }
.smp-tone--navy { --tone: #233a66; --tone-soft: rgba(35, 58, 102, 0.1); }
.smp-libx-card__head {
	display: flex;
	align-items: center;
	align-self: start;
	gap: 0.85rem;
	margin-bottom: 0.85rem;
}
.smp-libx-card__icon {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: var(--tone-soft);
	color: var(--tone);
}
.smp-libx-card__title {
	margin: 0;
	font-family: var(--smp-serif);
	font-size: 1.3rem;
	font-weight: 600;
	line-height: 1.2;
}
.smp-libx-card__meta {
	margin: 0.15rem 0 0;
	font-size: 0.82rem;
	color: var(--smp-muted);
}
.smp-libx-card__meta strong {
	color: var(--smp-ok);
	font-weight: 700;
}

/* Belge satırları */
.smp-libx-docs {
	align-self: start;
	margin: 0;
	padding: 0;
	list-style: none;
}
.smp-libx-doc {
	border-top: 1px solid var(--smp-line);
}
.smp-libx-doc[hidden],
.smp-libx-doc.is-extra {
	display: none;
}
.smp-libx-card.is-open .smp-libx-doc.is-extra:not([hidden]) {
	display: block;
	animation: smp-libx-in 0.3s var(--smp-ease);
}
@keyframes smp-libx-in {
	from { opacity: 0; transform: translateY(-3px); }
	to { opacity: 1; transform: none; }
}
.smp-libx-doc a,
.smp-libx-doc__row {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 44px;
	padding: 0.55rem 0.15rem;
	font-size: 0.95rem;
	line-height: 1.35;
	text-decoration: none;
}
.smp-libx-doc a {
	color: var(--smp-ink);
	font-weight: 600;
}
.smp-libx-doc a:hover {
	color: var(--smp-blue);
}
.smp-libx-doc a:hover .smp-icon {
	transform: translateX(3px);
}
.smp-libx-doc a:focus-visible {
	outline: none;
	box-shadow: var(--smp-focus);
	border-radius: 6px;
}
.smp-libx-doc a .smp-icon {
	flex: none;
	color: var(--tone);
	transition: transform 0.2s var(--smp-ease);
}
.smp-libx-doc__title {
	flex: 1;
	min-width: 0;
}
.smp-libx-doc.is-soon .smp-libx-doc__row {
	color: var(--smp-muted);
}
.smp-libx-badge {
	flex: none;
	padding: 0.12rem 0.5rem;
	border-radius: 99px;
	background: var(--smp-ivory-2);
	color: var(--smp-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.smp-libx-badge--ok {
	background: var(--smp-ok-soft);
	color: var(--smp-ok);
}
.smp-libx-badge--go {
	background: var(--smp-midnight);
	color: var(--smp-gold);
}
.smp-libx-more {
	align-self: end;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	width: calc(100% + 2.5rem);
	margin: 0.5rem -1.25rem -0.75rem;
	padding: 0.75rem;
	border: 0;
	border-top: 1px solid var(--smp-line);
	background: var(--smp-ivory);
	color: var(--smp-ink-2);
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
}
.smp-libx-more[hidden] {
	display: none;
}
.smp-libx-more:hover {
	background: var(--tone-soft);
	color: var(--smp-ink);
}
.smp-libx-more:focus-visible {
	outline: none;
	box-shadow: inset 0 0 0 3px var(--smp-gold);
}
.smp-libx-more .smp-icon {
	transition: transform 0.25s var(--smp-ease);
}
.smp-libx-more__close {
	display: none;
}
.smp-libx-card.is-open .smp-libx-more__open {
	display: none;
}
.smp-libx-card.is-open .smp-libx-more__close {
	display: inline;
}
.smp-libx-card.is-open .smp-libx-more .smp-icon {
	transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
	.smp-libx-card.is-open .smp-libx-doc.is-extra:not([hidden]) {
		animation: none;
	}
}
