.ui-datepicker-inline.gform-theme-datepicker {
	box-shadow: none;
}

.ui-datepicker-inline.gform-legacy-datepicker {
	width: 216px;
}

/**
 * Responsive styles for Inline Datepickers.
 *
 * These styles cap the datepicker at it's native max-width of 398px. Would love to explore responsive styles for much
 * larger datepickers in the future.
 */

.gpld-inline-datepicker {
	max-width: 398px;
	width: 100%;
}

.gpld-inline-datepicker .ui-datepicker-inline .ui-datepicker-calendar {
	width: 100%;
}

.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) .ui-datepicker-calendar td,
.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) th {
	width: 14.28%;
	height: auto;
	position: relative;
	padding: 0;
}

.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) td:before,
.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) th:before {
	content: '';
	display: block;
	padding-top: 100%;
}

.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) .ui-datepicker-calendar .ui-state-default,
.gpld-inline-datepicker .gform-theme-datepicker:not(.gform-legacy-datepicker) .ui-datepicker-calendar th span {
	width: auto !important;
	height: auto !important;
	position: absolute;
	/* Goal here is to more aggressively reduce the "padding" as the width decreases. The 3px reduction achieves this
	   as the static reduction is more impactful as the value of the 15% decreases with the width. */
	top: calc( 15% - 3px );
	right: calc( 15% - 3px );
	bottom: calc( 15% - 3px );
	left: calc( 15% - 3px );
	line-height: 1;
}

/**
 * Inline datepickers on Gravity Forms 3.0+.
 */

.gpld-inline-datepicker.gpld-inline-datepicker .gform-datepicker-calendar {
	position: static;
	inset-block-start: auto;
	margin-top: 0;
	box-shadow: none;
	z-index: auto;
}

/**
 * The selected date.
 *
 * Gravity Forms styles the calendar's `dayToday` cell as a filled chip and leaves the chosen day with
 * no styling of its own. That works for a popup, which closes the moment a date is picked, but leaves
 * an inline calendar looking permanently stuck on today. The perk marks the chosen day with WhatSock's
 * `dayMarked` state instead, and gives it the appearance a selection should have.
 *
 * The repeated class outranks GF's own `.dayToday` rule, so a chosen date that happens to be today
 * reads as chosen.
 */

.gpld-inline-datepicker.gpld-inline-datepicker .gform-datepicker-calendar table.calendar .dayMarked span,
.gpld-inline-datepicker.gpld-inline-datepicker .gform-datepicker-calendar table.calendar .dayMarked span:hover {
	background: var( --gform-theme-color-primary, #204ce5 );
	border-color: var( --gform-theme-color-primary, #204ce5 );
	color: var( --gform-theme-color-inside-control, #fff );
}
