/**
 * Styling for the jQuery UI datepicker used in the admin donor edit popup
 * (#datebirthedit). WordPress ships the jQuery UI datepicker script but no
 * theme CSS, so without this the calendar renders unstyled/broken.
 */

.ui-datepicker {
	width: 18em;
	padding: 8px;
	margin: 4px 0 0;
	background: #fff;
	border: 1px solid #c9c9c9;
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	font-size: 13px;
	display: none;
	z-index: 100001 !important; /* above the donor popup overlay */
}

.ui-datepicker .ui-datepicker-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px 0 10px;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	width: 26px;
	height: 26px;
	cursor: pointer;
	border-radius: 4px;
	text-indent: -9999px;
	position: relative;
	overflow: hidden;
	flex: 0 0 auto;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
	background: #f3f3f3;
}

.ui-datepicker .ui-datepicker-prev::before,
.ui-datepicker .ui-datepicker-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	border-top: 2px solid #555;
	border-right: 2px solid #555;
}

.ui-datepicker .ui-datepicker-prev::before {
	transform: translate(-30%, -50%) rotate(-135deg);
}

.ui-datepicker .ui-datepicker-next::before {
	transform: translate(-70%, -50%) rotate(45deg);
}

/* Hide the default jQuery UI icon spans (we draw arrows via ::before) */
.ui-datepicker .ui-datepicker-prev span,
.ui-datepicker .ui-datepicker-next span {
	display: none;
}

.ui-datepicker .ui-datepicker-title {
	flex: 1 1 auto;
	display: flex;
	gap: 6px;
	justify-content: center;
	margin: 0 4px;
	font-weight: 600;
	line-height: 26px;
}

.ui-datepicker .ui-datepicker-title select {
	padding: 2px 4px;
	border: 1px solid #c9c9c9;
	border-radius: 4px;
	background: #fff;
	font-size: 13px;
	max-width: 48%;
}

.ui-datepicker table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	border: 0;
}

.ui-datepicker th {
	padding: 6px 0;
	text-align: center;
	font-weight: 600;
	color: #777;
	border: 0;
	background: transparent;
}

.ui-datepicker td {
	padding: 1px;
	text-align: center;
	border: 0;
	background: transparent;
}

.ui-datepicker td a,
.ui-datepicker td span {
	display: block;
	padding: 6px 0;
	text-decoration: none;
	color: #333;
	border-radius: 4px;
	text-align: center;
	line-height: 1;
}

.ui-datepicker td a:hover {
	background: #fde3e3;
	color: #ef1414;
}

.ui-datepicker td a.ui-state-active,
.ui-datepicker td a.ui-state-highlight {
	background: #ef1414;
	color: #fff;
}

.ui-datepicker td span.ui-state-disabled,
.ui-datepicker td .ui-priority-secondary {
	opacity: 0.45;
	cursor: default;
}

.ui-datepicker .ui-datepicker-buttonpane {
	margin-top: 8px;
	padding-top: 8px;
	border-top: 1px solid #eee;
	display: flex;
	justify-content: space-between;
}

.ui-datepicker .ui-datepicker-buttonpane button {
	padding: 4px 10px;
	border: 1px solid #c9c9c9;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 12px;
}
