/* tabimile-campaigns front-end styles. すべて .tmc- プレフィックス */

.tmc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
	margin: 20px 0;
}

.tmc-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tmc-card--ended {
	background: #f3f3f3;
	opacity: 0.75;
}

.tmc-card--ending_soon {
	border-color: #f5a623;
}

.tmc-card--featured {
	border-width: 2px;
	border-color: #d4af37;
}

.tmc-card__labels {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tmc-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: bold;
	color: #fff;
	background: #999;
}

.tmc-badge--upcoming {
	background: #4a90d9;
}

.tmc-badge--active {
	background: #4caf50;
}

.tmc-badge--ending_soon {
	background: #e05a2b;
}

.tmc-badge--ended {
	background: #9e9e9e;
}

.tmc-badge--undated {
	background: #7e7e7e;
}

.tmc-badge--featured {
	background: #d4af37;
	color: #3a2c00;
}

.tmc-card__title {
	margin: 4px 0;
	font-size: 17px;
	line-height: 1.4;
}

.tmc-card__title a {
	color: inherit;
	text-decoration: none;
}

.tmc-card__meta {
	margin: 0;
	font-size: 13px;
	color: #666;
}

.tmc-card__excerpt {
	margin: 0;
	font-size: 14px;
	color: #333;
	flex-grow: 1;
}

.tmc-card__deadline {
	margin: 0;
	font-size: 13px;
	font-weight: bold;
	color: #444;
}

.tmc-card--ending_soon .tmc-card__deadline {
	color: #e05a2b;
}

.tmc-card__actions {
	display: flex;
	gap: 8px;
	margin-top: 8px;
}

.tmc-btn {
	/* display:inline-block必須: aタグはデフォルトinlineのため、これが無いとpaddingが
	   行の高さに反映されず、概要ボックスのように.tmc-card__actions(display:flex)の外で
	   単独使用したとき上下の行のテキストとボタンが視覚的に重なる。
	   flex(カード内で.tmc-card__actionsの子になったとき用)はinline-blockでも効く。 */
	display: inline-block;
	flex: 1;
	text-align: center;
	padding: 8px 12px;
	border-radius: 4px;
	font-size: 14px;
	text-decoration: none;
	box-sizing: border-box;
}

.tmc-btn--detail {
	background: #f0f0f0;
	color: #333;
}

.tmc-btn--cta {
	background: #e05a2b;
	color: #fff;
}

.tmc-empty {
	color: #888;
	font-size: 14px;
}

.tmc-filter-panel {
	margin: 12px 0 24px;
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}

.tmc-filter-group {
	margin-bottom: 14px;
}

.tmc-filter-group:last-child {
	margin-bottom: 0;
}

.tmc-filter-group__title {
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: bold;
	color: #666;
}

.tmc-filter-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tmc-filter-btn {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	text-decoration: none;
	font-size: 13px;
}

.tmc-filter-btn.is-active {
	background: #333;
	border-color: #333;
	color: #fff;
}

.tmc-filter-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.tmc-filter-select {
	padding: 6px 10px;
	border-radius: 4px;
	border: 1px solid #ccc;
	background: #fff;
	font-size: 13px;
	max-width: 100%;
}

.tmc-filter-result-title {
	margin: 16px 0 8px;
	font-size: 15px;
	color: #666;
}

.tmc-section-title {
	margin: 32px 0 12px;
	font-size: 20px;
}

.tmc-ended-section {
	margin: 32px 0 12px;
}

.tmc-ended-section summary {
	cursor: pointer;
	font-size: 20px;
	padding: 4px 0;
}

.tmc-ended-section summary:hover {
	color: #e05a2b;
}

.tmc-ended-section .tmc-grid {
	margin-top: 12px;
}

.tmc-overview-box,
.tmc-related-campaigns {
	margin: 20px 0;
	padding: 16px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fafafa;
}

.tmc-overview-box__row {
	margin: 4px 0;
	font-size: 14px;
}

.tmc-overview-box__notice {
	margin-top: 10px;
	padding: 10px;
	background: #fff3e0;
	border-radius: 4px;
	font-size: 13px;
	color: #7a4a00;
}

@media (max-width: 480px) {
	.tmc-grid {
		grid-template-columns: 1fr;
	}

	.tmc-card__actions {
		flex-direction: column;
	}

	.tmc-filter-select {
		width: 100%;
	}
}
