/* 写真・動画の添付 — フロント
   テーマが body { color:#FFFFFF } を指定しているため、文字色は必ず明示する。
   配色は既存フォームに合わせる（#009ec0 / 淡色 #e7f6f8 / 文字用の濃い #00647a）。 */

.tka {
	box-sizing: border-box;
	color: #1a1a1a;
}

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

.tka__note {
	margin: 0 0 14px;
	padding: 12px 14px;
	background: #f4fbfc;
	border-left: 3px solid #009ec0;
	color: #333;
	font-size: 14px;
	line-height: 1.8;
}

.tka__group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
}

/* 実物のファイル入力は隠し、ラベルをボタンとして見せる。 */
.tka__input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0 0 0 0 );
	white-space: nowrap;
	border: 0;
}

.tka__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 10px 22px;
	background: #fff;
	color: #00647a;
	border: 2px solid #00647a;
	border-radius: 26px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.tka__button:hover {
	background: #00647a;
	color: #fff;
}

/* キーボード操作でも、どこに居るか分かるようにする。 */
.tka__input:focus-visible + .tka__hint,
.tka__input:focus-visible ~ .tka__button,
.tka__button:focus-within {
	outline: 2px solid #00647a;
	outline-offset: 2px;
}

.tka__button-icon {
	font-size: 18px;
	line-height: 1;
}

.tka__hint {
	color: #555;
	font-size: 13px;
	line-height: 1.6;
}

.tka__list {
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}

.tka-item {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #d9e6ea;
	border-radius: 4px;
	color: #1a1a1a;
}

.tka-item.is-failed {
	background: #fdecea;
	border-color: #c0392b;
}

.tka-item__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	overflow: hidden;
	background: #e7f6f8;
	border-radius: 3px;
	color: #00647a;
	font-size: 22px;
}

.tka-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tka-item__meta {
	flex: 1 1 auto;
	min-width: 0;
}

.tka-item__meta strong {
	display: block;
	overflow: hidden;
	color: #1a1a1a;
	font-size: 14px;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tka-item__size {
	display: block;
	margin-top: 2px;
	color: #555;
	font-size: 12px;
}

.tka-item.is-failed .tka-item__size {
	color: #8c1d18;
	font-weight: 700;
}

.tka-item__bar {
	display: block;
	height: 4px;
	margin-top: 6px;
	overflow: hidden;
	background: #e7f6f8;
	border-radius: 2px;
}

.tka-item__fill {
	display: block;
	width: 0;
	height: 100%;
	background: #009ec0;
	transition: width 0.2s ease;
}

.tka-item__remove {
	flex: 0 0 auto;
	min-height: 36px;
	padding: 6px 14px;
	background: #fff;
	color: #6b6b6b;
	border: 1px solid #c9c9c9;
	border-radius: 18px;
	font-size: 13px;
	cursor: pointer;
}

.tka-item__remove:hover {
	background: #6b6b6b;
	color: #fff;
	border-color: #6b6b6b;
}

.tka__error {
	margin: 12px 0 0;
	padding: 12px 14px;
	background: #fdecea;
	border: 1px solid #c0392b;
	color: #8c1d18;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.7;
}

@media screen and (max-width: 767px) {
	.tka__group {
		gap: 8px;
	}

	.tka__button {
		width: 100%;
		justify-content: center;
	}

	.tka__hint {
		flex: 1 1 100%;
		font-size: 12px;
	}

	.tka-item__thumb {
		width: 48px;
		height: 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tka-item__fill {
		transition: none;
	}
}
