/* 광고 리포트: 기간 프리셋 + 날짜 — 가로폭에 맞춰 유동 배치 */
.report-period-toolbar {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	gap: 0.35rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	overflow: visible;
}

@media (min-width: 640px) {
	.report-period-toolbar {
		gap: 0.5rem 0.75rem;
	}
}

/* 프리셋(셀렉트) 영역 — 모바일: 비율, PC: 너비 제한으로 날짜에 여유 */
.report-period-toolbar__group:not(.report-period-toolbar__dates) {
	display: flex;
	flex: 0 1 42%;
	min-width: 0;
	max-width: min(14rem, 46%);
	align-items: center;
}

/* 시작일 ~ 종료일 — 모바일: 남는 폭 균등 분할 */
.report-period-toolbar__dates {
	display: flex;
	flex: 1 1 0;
	min-width: 0;
	align-items: center;
	gap: 0.2rem;
	flex-wrap: nowrap;
}

@media (min-width: 640px) {
	.report-period-toolbar__group:not(.report-period-toolbar__dates) {
		flex: 0 0 auto;
		flex-basis: auto;
		width: auto;
		min-width: 8.75rem;
		max-width: 12.5rem;
	}

	.report-period-toolbar__dates {
		flex: 1 1 auto;
		min-width: 0;
		justify-content: flex-start;
	}

	/* PC: 기존과 동일하게 날짜칸 충분한 고정 폭 */
	.report-period-toolbar__dates input[type="date"].report-period-field {
		flex: 0 0 auto;
		width: 9.5rem;
		min-width: 9.5rem;
		max-width: 9.5rem;
	}
}

.report-period-toolbar__divider {
	display: none;
	width: 1px;
	min-height: 1.75rem;
	align-self: center;
	background: #e2e8f0;
	flex-shrink: 0;
}

@media (min-width: 640px) {
	.report-period-toolbar__divider {
		display: block;
	}
}

.report-period-toolbar__tilde {
	flex-shrink: 0;
	font-size: 0.875rem;
	color: #94a3b8;
	padding: 0 0.05rem;
	user-select: none;
	align-self: center;
	line-height: 2.125rem;
}

.report-period-toolbar .report-period-field,
.report-period-toolbar select.report-period-field,
.report-period-toolbar input[type="date"].report-period-field {
	box-sizing: border-box;
	min-height: 2.125rem;
	padding: 0.35rem 0.5rem;
	font-size: 0.875rem;
	line-height: 1.35rem;
	color: #1e293b;
	background-color: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 0.375rem;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.report-period-toolbar__group:not(.report-period-toolbar__dates) select.report-period-field {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.45rem center;
	padding-right: 1.625rem;
}

@media (max-width: 639.98px) {
	.report-period-toolbar__group:not(.report-period-toolbar__dates) {
		flex-basis: 36%;
		max-width: min(12rem, 44%);
	}

	/* 모바일만: 날짜 두 칸이 남은 폭을 반반 사용 */
	.report-period-toolbar__dates input[type="date"].report-period-field {
		flex: 1 1 0;
		min-width: 4.25rem;
		width: 0;
		max-width: none;
		padding-left: 0.25rem;
		padding-right: 0.25rem;
	}

	.report-period-toolbar .report-period-field,
	.report-period-toolbar select.report-period-field,
	.report-period-toolbar input[type="date"].report-period-field {
		font-size: 0.8125rem;
		padding-top: 0.28rem;
		padding-bottom: 0.28rem;
	}

	.report-period-toolbar__group:not(.report-period-toolbar__dates) select.report-period-field {
		padding-left: 0.35rem;
		padding-right: 1.35rem;
	}
}

.report-period-toolbar .report-period-field:hover {
	border-color: #94a3b8;
}

.report-period-toolbar .report-period-field:focus {
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.22);
}
