/**
 * File Library by theme.tr - Uygulama Stilleri
 *
 * Wix File Manager arayüzünden esinlenilmiş, sade ve modern bir tasarım.
 */

.tfl-app {
	--tfl-border: #e2e4e8;
	--tfl-bg: #ffffff;
	--tfl-bg-soft: #f7f8fa;
	--tfl-text: #23282d;
	--tfl-text-muted: #6b7280;
	--tfl-accent: #00a389;
	--tfl-accent-dark: #00806c;
	--tfl-danger: #d63638;
	--tfl-radius: 6px;
	--tfl-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

	box-sizing: border-box;
	background: var(--tfl-bg);
	border: 1px solid var(--tfl-border);
	border-radius: var(--tfl-radius);
	color: var(--tfl-text);
	font-size: 14px;
	line-height: 1.5;
	max-width: 100%;
	overflow: hidden;
	position: relative;
}

.tfl-app *,
.tfl-app *::before,
.tfl-app *::after {
	box-sizing: border-box;
}

.tfl-app[hidden],
.tfl-app [hidden] {
	display: none !important;
}

.tfl-header {
	align-items: center;
	background: var(--tfl-bg);
	border-bottom: 1px solid var(--tfl-border);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	padding: 20px 24px;
}

.tfl-title {
	color: var(--tfl-text);
	font-size: 20px;
	font-weight: 600;
	margin: 0;
}

.tfl-header-actions {
	align-items: center;
	display: flex;
	gap: 12px;
}

.tfl-search-box {
	align-items: center;
	background: var(--tfl-bg-soft);
	border: 1px solid var(--tfl-border);
	border-radius: 999px;
	display: flex;
	gap: 6px;
	padding: 6px 14px;
	min-width: 220px;
}

.tfl-search-icon {
	color: var(--tfl-text-muted);
}

.tfl-search-input {
	background: transparent;
	border: 0;
	box-shadow: none;
	flex: 1;
	font-size: 13px;
	outline: none;
	padding: 2px 0;
}

.tfl-toolbar {
	align-items: center;
	background: var(--tfl-bg-soft);
	border-bottom: 1px solid var(--tfl-border);
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: space-between;
	padding: 12px 24px;
}

.tfl-breadcrumb {
	align-items: center;
	color: var(--tfl-text-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 13px;
	gap: 4px;
}

.tfl-breadcrumb button {
	background: none;
	border: 0;
	color: var(--tfl-text-muted);
	cursor: pointer;
	font-size: 13px;
	padding: 2px 4px;
}

.tfl-breadcrumb button:hover,
.tfl-breadcrumb .tfl-breadcrumb-current {
	color: var(--tfl-accent-dark);
	font-weight: 600;
}

.tfl-breadcrumb .tfl-breadcrumb-sep {
	color: var(--tfl-border);
}

.tfl-toolbar-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tfl-app .button {
	align-items: center;
	display: inline-flex;
	gap: 6px;
}

.tfl-bulk-actions {
	align-items: center;
	display: flex;
	gap: 8px;
}

.tfl-bulk-actions[hidden] {
	display: none;
}

.tfl-selected-count {
	color: var(--tfl-text-muted);
	font-size: 13px;
	margin-right: 4px;
}

.tfl-dropzone {
	align-items: center;
	background: rgba(0, 163, 137, 0.06);
	border: 2px dashed var(--tfl-accent);
	display: flex;
	justify-content: center;
	margin: 16px 24px;
	border-radius: var(--tfl-radius);
	padding: 30px;
}

.tfl-dropzone[hidden] {
	display: none;
}

.tfl-dropzone-message {
	color: var(--tfl-accent-dark);
	text-align: center;
}

.tfl-dropzone-message .dashicons {
	font-size: 28px;
	height: 28px;
	width: 28px;
}

.tfl-upload-queue {
	border-bottom: 1px solid var(--tfl-border);
	padding: 8px 24px;
}

.tfl-upload-queue[hidden] {
	display: none;
}

.tfl-upload-item {
	align-items: center;
	display: flex;
	font-size: 13px;
	gap: 10px;
	padding: 6px 0;
}

.tfl-upload-item-name {
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tfl-upload-progress {
	background: var(--tfl-border);
	border-radius: 999px;
	flex: 0 0 120px;
	height: 6px;
	overflow: hidden;
}

.tfl-upload-progress-bar {
	background: var(--tfl-accent);
	height: 100%;
	transition: width 0.2s ease;
	width: 0;
}

.tfl-upload-item.is-error .tfl-upload-progress-bar {
	background: var(--tfl-danger);
}

.tfl-upload-item-status {
	color: var(--tfl-text-muted);
	flex: 0 0 90px;
	font-size: 12px;
	text-align: right;
}

.tfl-table-wrapper {
	position: relative;
}

.tfl-table {
	border-collapse: collapse;
	width: 100%;
}

.tfl-table thead th {
	background: var(--tfl-bg);
	border-bottom: 1px solid var(--tfl-border);
	color: var(--tfl-text-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 12px 16px;
	position: sticky;
	text-align: left;
	text-transform: uppercase;
	top: 0;
	z-index: 1;
}

.tfl-col-check {
	width: 44px;
}

.tfl-col-actions {
	width: 44px;
}

.tfl-col-updated {
	white-space: nowrap;
	width: 220px;
}

.tfl-col-downloads {
	white-space: nowrap;
	width: 120px;
}

.tfl-col-downloads-value {
	color: var(--tfl-text-muted);
	font-size: 13px;
}

.tfl-sortable {
	cursor: pointer;
	user-select: none;
}

.tfl-sortable span:first-child {
	vertical-align: middle;
}

.tfl-sort-arrow {
	display: inline-block;
	margin-left: 4px;
	vertical-align: middle;
}

.tfl-sort-arrow::before {
	color: var(--tfl-text-muted);
	content: "\2195";
}

.tfl-sortable[data-order="asc"] .tfl-sort-arrow::before {
	color: var(--tfl-accent-dark);
	content: "\2191";
}

.tfl-sortable[data-order="desc"] .tfl-sort-arrow::before {
	color: var(--tfl-accent-dark);
	content: "\2193";
}

.tfl-table tbody td {
	border-bottom: 1px solid var(--tfl-border);
	padding: 10px 16px;
	vertical-align: middle;
}

.tfl-table tbody tr:hover {
	background: var(--tfl-bg-soft);
}

.tfl-table tbody tr.is-selected {
	background: rgba(0, 163, 137, 0.08);
}

.tfl-row-loading td,
.tfl-row-message td {
	color: var(--tfl-text-muted);
	padding: 40px 16px;
	text-align: center;
}

.tfl-item-name-cell {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 12px;
}

.tfl-item-icon {
	flex: 0 0 32px;
	height: 32px;
	object-fit: contain;
	width: 32px;
}

.tfl-item-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tfl-item-name {
	color: var(--tfl-accent-dark);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tfl-item-sub {
	color: var(--tfl-text-muted);
	font-size: 12px;
}

.tfl-item-name-cell.is-renaming .tfl-item-name {
	display: none;
}

.tfl-rename-input {
	font-size: 13px;
	padding: 3px 6px;
	width: 100%;
}

.tfl-col-updated-value {
	color: var(--tfl-text-muted);
	font-size: 13px;
}

.tfl-actions-menu-wrapper {
	position: relative;
}

.tfl-btn-row-menu {
	background: none;
	border: 0;
	border-radius: 4px;
	color: var(--tfl-text-muted);
	cursor: pointer;
	padding: 6px;
}

.tfl-btn-row-menu:hover {
	background: var(--tfl-border);
}

/*
 * position: fixed kullanılır; çünkü .tfl-app kapsayıcısı `overflow: hidden`
 * uyguluyor ve tablo son satırlarında açılan menü, `position: absolute`
 * olsaydı bu taşma sınırının dışına çıkamayıp kırpılırdı. Konum (top/left),
 * her açılışta JavaScript (positionRowMenu) tarafından düğmenin ekran
 * koordinatlarına göre hesaplanır.
 */
.tfl-row-menu {
	background: var(--tfl-bg);
	border: 1px solid var(--tfl-border);
	border-radius: var(--tfl-radius);
	box-shadow: var(--tfl-shadow);
	min-width: 160px;
	position: fixed;
	z-index: 100000;
}

.tfl-row-menu[hidden] {
	display: none;
}

.tfl-row-menu button {
	background: none;
	border: 0;
	color: var(--tfl-text);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	padding: 8px 14px;
	text-align: left;
	width: 100%;
}

.tfl-row-menu button:hover {
	background: var(--tfl-bg-soft);
}

.tfl-row-menu button.is-danger {
	color: var(--tfl-danger);
}

.tfl-empty-state {
	color: var(--tfl-text-muted);
	padding: 60px 20px;
	text-align: center;
}

.tfl-empty-state[hidden] {
	display: none;
}

.tfl-empty-state .dashicons {
	font-size: 40px;
	height: 40px;
	width: 40px;
}

.tfl-pagination {
	align-items: center;
	border-top: 1px solid var(--tfl-border);
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding: 12px 24px;
}

.tfl-page-info {
	color: var(--tfl-text-muted);
	font-size: 13px;
}

.tfl-modal-overlay {
	align-items: center;
	background: rgba(15, 23, 42, 0.5);
	display: flex;
	inset: 0;
	justify-content: center;
	position: fixed;
	z-index: 100000;
}

.tfl-modal-overlay[hidden] {
	display: none;
}

.tfl-modal {
	background: var(--tfl-bg);
	border-radius: var(--tfl-radius);
	box-shadow: var(--tfl-shadow);
	max-width: 480px;
	width: 92%;
}

.tfl-modal-header {
	align-items: center;
	border-bottom: 1px solid var(--tfl-border);
	display: flex;
	justify-content: space-between;
	padding: 16px 20px;
}

.tfl-modal-title {
	font-size: 16px;
	margin: 0;
}

.tfl-modal-close {
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}

.tfl-modal-body {
	max-height: 60vh;
	overflow-y: auto;
	padding: 20px;
}

.tfl-modal-body input[type="text"],
.tfl-modal-body input[type="number"] {
	width: 100%;
}

.tfl-modal-field-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
}

.tfl-modal-help {
	color: var(--tfl-text-muted);
	font-size: 12px;
	margin: 0 0 10px;
}

.tfl-modal-footer {
	border-top: 1px solid var(--tfl-border);
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 20px;
}

.tfl-modal-error {
	color: var(--tfl-danger);
	font-size: 13px;
	margin-top: 8px;
}

.tfl-picker-tree {
	border: 1px solid var(--tfl-border);
	border-radius: var(--tfl-radius);
	max-height: 260px;
	overflow-y: auto;
}

.tfl-picker-item {
	align-items: center;
	border-bottom: 1px solid var(--tfl-border);
	cursor: pointer;
	display: flex;
	gap: 8px;
	padding: 8px 12px;
}

.tfl-picker-item:last-child {
	border-bottom: 0;
}

.tfl-picker-item:hover,
.tfl-picker-item.is-active {
	background: var(--tfl-bg-soft);
}

.tfl-toast-container {
	bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	position: fixed;
	right: 20px;
	z-index: 100001;
}

.tfl-toast {
	background: var(--tfl-text);
	border-radius: var(--tfl-radius);
	color: #fff;
	font-size: 13px;
	padding: 10px 16px;
	box-shadow: var(--tfl-shadow);
}

.tfl-toast.is-error {
	background: var(--tfl-danger);
}

.tfl-toast.is-success {
	background: var(--tfl-accent-dark);
}

@media (max-width: 640px) {
	.tfl-col-updated,
	.tfl-col-updated-value {
		display: none;
	}

	.tfl-header,
	.tfl-toolbar {
		padding: 14px;
	}
}
