/* Grúas Torres — Datepicker personalizado (sin dependencias) */

.gt-dp {
	position: relative;
	width: 100%;
}

/* Campo visible que reemplaza al input[type=date] nativo */
.gt-dp-input {
	width: 100%;
	padding: 12px 42px 12px 14px;
	border: 1px solid #d8d8d8;
	border-radius: 4px;
	font-family: inherit;
	font-size: 14px;
	color: var(--color-text);
	background: var(--color-white);
	cursor: pointer;
	text-align: left;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gt-dp-input.is-placeholder { color: #9aa0a0; }
.gt-dp-input:hover { border-color: var(--color-green); }
/* Con el calendario abierto, el campo se eleva sobre secciones siguientes. */
.gt-dp.is-open { position: relative; z-index: 9999; }
.gt-dp.is-open .gt-dp-input,
.gt-dp-input:focus {
	outline: none;
	border-color: var(--color-green);
	box-shadow: 0 0 0 3px rgba(30, 122, 70, 0.15);
}

/* Icono de calendario */
.gt-dp-icon {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: var(--color-green);
	pointer-events: none;
}

/* Popup del calendario */
.gt-dp-pop {
	position: absolute;
	z-index: 9999;
	top: calc(100% + 8px);
	left: 0;
	width: 300px;
	max-width: calc(100vw - 32px);
	background: var(--color-white);
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(16, 32, 27, 0.18), 0 2px 6px rgba(16, 32, 27, 0.08);
	border: 1px solid #ececec;
	padding: 14px;
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease;
}
.gt-dp.is-open .gt-dp-pop {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}
.gt-dp.is-up .gt-dp-pop {
	top: auto;
	bottom: calc(100% + 8px);
}

/* Cabecera: mes/año + navegación */
.gt-dp-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}
.gt-dp-title {
	font-weight: 800;
	font-size: 15px;
	color: var(--color-dark);
	text-transform: capitalize;
	letter-spacing: 0.01em;
}
.gt-dp-nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 8px;
	background: var(--color-light);
	color: var(--color-dark);
	font-size: 16px;
	line-height: 1;
	transition: background 0.15s ease, color 0.15s ease;
}
.gt-dp-nav:hover { background: var(--color-green); color: var(--color-white); }
.gt-dp-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.gt-dp-nav:disabled:hover { background: var(--color-light); color: var(--color-dark); }

/* Días de la semana */
.gt-dp-week {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
	margin-bottom: 4px;
}
.gt-dp-week span {
	text-align: center;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #9aa0a0;
	padding: 4px 0;
}

/* Cuadrícula de días */
.gt-dp-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}
.gt-dp-day {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	border: none;
	border-radius: 8px;
	background: transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-text);
	transition: background 0.12s ease, color 0.12s ease;
}
.gt-dp-day.is-empty { visibility: hidden; }
.gt-dp-day:not(:disabled):hover {
	background: rgba(30, 122, 70, 0.12);
	color: var(--color-green);
}
.gt-dp-day.is-today {
	box-shadow: inset 0 0 0 1.5px var(--color-green);
	color: var(--color-green);
}
.gt-dp-day.is-selected,
.gt-dp-day.is-selected:hover {
	background: var(--color-gold);
	color: var(--color-dark);
	box-shadow: none;
}
.gt-dp-day:disabled {
	color: #cfd3d2;
	cursor: not-allowed;
}

/* Pie: acciones rápidas */
.gt-dp-foot {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
}
.gt-dp-action {
	border: none;
	background: transparent;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 6px;
	transition: background 0.15s ease, color 0.15s ease;
}
.gt-dp-action--today { color: var(--color-green); }
.gt-dp-action--today:hover { background: rgba(30, 122, 70, 0.12); }
.gt-dp-action--clear { color: #8a8f8e; }
.gt-dp-action--clear:hover { background: var(--color-light); color: var(--color-text); }

@media (max-width: 640px) {
	.gt-dp-pop { width: 280px; }
}
