/* =========================================================
   DAYS BETWEEN DATES CALCULATOR
   Specific styles only for calculators/days-between-dates.tpl
   ========================================================= */

.days-between-calculator,
.days-between-calculator *,
.days-between-calculator *::before,
.days-between-calculator *::after {
	box-sizing: border-box;
}

.days-between-calculator {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	overflow: hidden;
}

.days-between-layout {
	display: grid;
	grid-template-columns: minmax(0, 520px) minmax(340px, 520px);
	gap: 24px;
	align-items: start;
	justify-content: center;
}

.days-between-layout > * {
	min-width: 0;
}

.days-between-card {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	padding: 22px;
	border: 1px solid #e1e5ee;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.05);
}

.days-between-card-title {
	margin: 0 0 18px;
	color: #111827;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	text-transform: none;
}

.days-between-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.days-between-field {
	min-width: 0;
}

.days-between-field label,
.days-between-unit label,
.days-between-link-box label {
	display: block;
	margin-bottom: 6px;
	color: #374151;
	font-weight: 700;
}

.days-between-field input,
.days-between-unit select,
.days-between-link-row input {
	width: 100%;
	max-width: 100%;
	height: 44px;
	box-sizing: border-box;
	border-radius: 8px;
}

.days-between-hint {
	min-height: 18px;
	margin-top: 6px;
	color: #6b7280;
	font-size: 13px;
	line-height: 1.35;
}

.days-between-unit {
	margin-top: 16px;
}

.days-between-options {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.days-between-check {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #e1e5ee;
	border-radius: 10px;
	background: #f8fafc;
	cursor: pointer;
	user-select: none;
}

.days-between-check input {
	margin: 0;
}

.days-between-check span {
	color: #374151;
	font-size: 14px;
	line-height: 1.35;
}

.days-between-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.days-between-actions .btn {
	min-height: 40px;
	border-radius: 10px;
}

.days-between-error {
	min-height: 20px;
	margin-top: 12px;
	color: #dc2626;
	font-size: 14px;
	font-weight: 600;
}


/* =========================================================
   RESULT CARD
   ========================================================= */

.days-between-main-result {
	margin-bottom: 14px;
	padding: 16px;
	border-radius: 12px;
	background: #f8fafc;
	color: #111827;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.35;
	word-break: break-word;
}

.days-between-result-list {
	overflow: hidden;
	border: 1px solid #edf0f3;
	border-radius: 12px;
}

.days-between-result-row {
	display: grid;
	grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.2fr);
	gap: 14px;
	align-items: center;
	padding: 12px 14px;
	border-bottom: 1px solid #edf0f3;
	background: #fff;
}

.days-between-result-row:last-child {
	border-bottom: 0;
}

.days-between-result-row span {
	color: #6b7280;
	font-size: 14px;
	line-height: 1.35;
}

.days-between-result-row strong {
	color: #111827;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.35;
	text-align: right;
	word-break: break-word;
}

.days-between-result-row-main {
	background: #f8fafc;
}

.days-between-result-row-main strong {
	font-size: 18px;
}

.days-between-formula {
	margin-top: 14px;
	padding: 13px 14px;
	border-radius: 12px;
	background: #f8fafc;
	color: #4b5563;
	font-size: 14px;
	line-height: 1.5;
}

.days-between-link-box {
	margin-top: 16px;
}

.days-between-link-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 10px;
}

.days-between-link-row .btn {
	border-radius: 10px;
	white-space: nowrap;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media only screen and (max-width: 991px) {
	.days-between-calculator {
		max-width: 720px;
	}

	.days-between-layout {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}

@media only screen and (max-width: 767px) {
	.days-between-fields {
		grid-template-columns: 1fr;
	}

	.days-between-result-row {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.days-between-result-row strong {
		text-align: left;
	}
}

@media only screen and (max-width: 575px) {
	.days-between-card {
		padding: 15px;
		border-radius: 12px;
	}

	.days-between-card-title {
		margin-bottom: 14px;
		font-size: 16px;
	}

	.days-between-main-result {
		padding: 12px;
		font-size: 20px;
	}

	.days-between-actions {
		display: grid;
		grid-template-columns: 1fr;
	}

	.days-between-actions .btn {
		width: 100%;
	}

	.days-between-link-row {
		grid-template-columns: 1fr;
	}

	.days-between-link-row .btn {
		width: 100%;
	}
}

@media only screen and (max-width: 420px) {
	.days-between-card {
		padding: 13px;
	}
}