/* gmailtheme — flight / package cards above a message's body (js/cards.js) */
#mail-message .gm-card {
	margin: 12px 16px 4px 72px;
	padding: 16px;
	max-width: 620px;
	box-sizing: border-box;
	border: 1px solid #dadce0;
	border-radius: 16px;
	background: var(--gm-surface, #fff);
	color: var(--gm-text, #1f1f1f);
	font-family: var(--gm-font-text, sans-serif);
	font-size: 14px;
	line-height: 20px;
}
#mail-message .gm-card:has(+ .mail-message-body[style*="display: none"]),
#mail-message .gm-card:has(+ .gm-otp + .mail-message-body[style*="display: none"]) { display: none; }
#mail-message .gm-card--past { background: var(--gm-bg, #f6f8fc); }

.gm-card__head { display: flex; align-items: center; gap: 12px; }
.gm-card__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	flex: none;
	border-radius: 50%;
	background: var(--gm-blue-light, #d3e3fd);
	color: var(--gm-on-blue-light, #001d35);
}
.gm-card--package .gm-card__badge { background: #c4eed0; color: #072711; }
.gm-card__titles { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.gm-card__title { font-family: var(--gm-font, sans-serif); font-size: 18px; line-height: 24px; font-weight: 400; }
.gm-card__title--warn { color: #b3261e; }
.gm-card__sub { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 13px; color: var(--gm-text-2, #444746); }
.gm-card__chip {
	flex: none;
	padding: 2px 10px;
	border-radius: 8px;
	background: var(--gm-search, #eaf1fb);
	font-size: 12px;
	font-weight: 500;
}
.gm-card__chip--warn { background: #fce8e6; color: #b3261e; }

.gm-card__val { display: inline-flex; align-items: center; gap: 2px; }
.gm-card__mono { font-weight: 500; letter-spacing: .04em; color: var(--gm-text, #1f1f1f); user-select: all; }
#mail-message button.gm-card__copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--gm-text-2, #444746);
	cursor: pointer;
}
#mail-message button.gm-card__copy:hover { background: var(--gm-hover, rgba(68, 71, 70, .08)); }
#mail-message button.gm-card__copy--done { color: #146c2e; }
.gm-card__copy .gm-ic { width: 16px; height: 16px; }

/* flight legs */
.gm-card__legs { display: flex; flex-direction: column; margin-top: 12px; }
.gm-card__leg { padding: 12px 0; border-top: 1px solid var(--gm-line, rgba(100, 121, 143, .12)); }
.gm-card__meta { font-size: 13px; color: var(--gm-text-2, #444746); margin-bottom: 8px; }
.gm-card__route { display: flex; align-items: flex-start; gap: 12px; }
.gm-card__end { display: flex; flex-direction: column; min-width: 0; flex: 0 1 auto; }
.gm-card__end:last-child { text-align: right; align-items: flex-end; }
.gm-card__code { font-family: var(--gm-font, sans-serif); font-size: 24px; line-height: 30px; font-weight: 400; }
.gm-card__time { font-size: 14px; font-weight: 500; }
.gm-card__plus { margin-left: 2px; font-size: 11px; color: #b3261e; }
.gm-card__city { font-size: 12px; line-height: 16px; color: var(--gm-text-2, #444746); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.gm-card__path { display: flex; align-items: center; flex: 1 1 auto; min-width: 40px; margin-top: 7px; color: var(--gm-text-3, #5e5e5e); }
.gm-card__path > span:not(.gm-ic) { flex: 1; height: 0; border-top: 2px dotted #c4c7c5; }
.gm-card__path .gm-ic { transform: rotate(90deg); width: 18px; height: 18px; margin: 0 4px; }
.gm-card__people, .gm-card__items { font-size: 13px; color: var(--gm-text-2, #444746); margin-top: 4px; }
.gm-card__items { color: var(--gm-text, #1f1f1f); margin-top: 12px; }

/* package progress */
.gm-card__steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 16px 0 4px;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.gm-card__steps li {
	position: relative;
	padding-top: 18px;
	font-size: 12px;
	line-height: 16px;
	color: var(--gm-text-3, #5e5e5e);
	text-align: center;
}
.gm-card__steps li:first-child { text-align: left; }
.gm-card__steps li:last-child { text-align: right; }
.gm-card__steps li::before { /* track */
	content: '';
	position: absolute;
	top: 5px;
	left: 0;
	right: 0;
	height: 4px;
	background: #e3e3e3;
}
.gm-card__steps li:first-child::before { left: 5px; border-radius: 2px 0 0 2px; }
.gm-card__steps li:last-child::before { right: 5px; border-radius: 0 2px 2px 0; }
.gm-card__steps li::after { /* dot */
	content: '';
	position: absolute;
	top: 1px;
	left: calc(50% - 6px);
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #c4c7c5;
	box-sizing: border-box;
}
.gm-card__steps li:first-child::after { left: 0; }
.gm-card__steps li:last-child::after { left: auto; right: 0; }
.gm-card__steps li.is-done::before { background: #146c2e; }
.gm-card__steps li.is-now::before { background: linear-gradient(to right, #146c2e 50%, #e3e3e3 50%); }
.gm-card__steps li.is-now:first-child::before { background: #e3e3e3; }
.gm-card__steps li.is-now:last-child::before { background: #146c2e; }
.gm-card__steps li.is-done::after, .gm-card__steps li.is-now::after { background: #146c2e; }
.gm-card__steps--warn li.is-now::before { background: linear-gradient(to right, #b3261e 50%, #e3e3e3 50%); }
.gm-card__steps--warn li.is-now:last-child::before { background: #b3261e; }
.gm-card__steps li.is-now::after { box-shadow: 0 0 0 4px #c4eed0; }
.gm-card__steps li.is-now { color: var(--gm-text, #1f1f1f); font-weight: 500; }
.gm-card__steps--warn li.is-done::before,
.gm-card__steps--warn li.is-done::after, .gm-card__steps--warn li.is-now::after { background: #b3261e; }
.gm-card__steps--warn li.is-now::after { box-shadow: 0 0 0 4px #fce8e6; }

.gm-card__track { display: flex; align-items: center; flex-wrap: wrap; gap: 0 6px; margin-top: 8px; font-size: 13px; color: var(--gm-text-2, #444746); }

/* actions */
.gm-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#mail-message a.gm-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 16px;
	box-sizing: border-box;
	border: 1px solid #747775;
	border-radius: 18px;
	background: var(--gm-surface, #fff);
	color: var(--gm-blue, #0b57d0);
	font-family: var(--gm-font, sans-serif);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}
#mail-message a.gm-card__btn:hover { background: #f1f4f9; }
#mail-message a.gm-card__btn--primary { border-color: var(--gm-blue, #0b57d0); background: var(--gm-blue, #0b57d0); color: #fff; }
#mail-message a.gm-card__btn--primary:hover { background: #0842a0; box-shadow: var(--gm-shadow-1); }

@media (max-width: 600px) {
	#mail-message .gm-card { margin: 12px 16px 4px; padding: 12px; }
	.gm-card__code { font-size: 20px; line-height: 26px; }
	.gm-card__city { max-width: 110px; }
}
