/* gmailtheme — Contacts inside Mail (js/contacts.js). Lives in Mail's content card, Yahoo tokens from yahoo.css. */
#app-content-vue { position: relative; }
body.gm-ct-open #app-content-vue > .app-content-wrapper { visibility: hidden; }

/* nav: Contacts is the current entry while open, Mail's folder isn't */
body.gm-ct-open .app-navigation .app-navigation-entry.active:not(#gm-nav-contacts *) .app-navigation-entry-link,
body.gm-ct-open .app-navigation .app-navigation-entry.active:not(#gm-nav-contacts *) .app-navigation-entry__name,
body.gm-ct-open .app-navigation .app-navigation-entry.active:not(#gm-nav-contacts *) .app-navigation-entry-icon { font-weight: 400 !important; color: var(--gm-text-2) !important; }
body.gm-ct-open #gm-nav-contacts .app-navigation-entry-link,
body.gm-ct-open #gm-nav-contacts .app-navigation-entry__name { font-weight: 700 !important; color: var(--gm-text) !important; }
body.gm-ct-open #gm-nav-contacts .app-navigation-entry-icon { --gm-nav-icon: var(--gm-n-contacts_on) !important; color: var(--gm-text) !important; }

.gm-ct {
	position: absolute;
	inset: 0;
	z-index: 40;
	display: flex;
	flex-direction: column;
	background: var(--gm-surface, #fff);
	border-radius: inherit;
	overflow: hidden;
	font-family: var(--gm-font);
	color: var(--gm-text);
	font-size: 14px;
	container-type: inline-size;
}
.gm-ct[hidden] { display: none; }

/* ------------------------------------------------------------------ top bar */
.gm-ct-bar {
	flex: none;
	display: flex;
	align-items: center;
	gap: 8px;
	height: 64px;
	padding: 0 20px 0 12px;
	border-bottom: 1px solid var(--gm-line);
}
.gm-ct-title { margin: 0 0 0 4px; font: 700 20px/1 var(--gm-font); color: var(--gm-text); }
.gm-ct-count { color: var(--gm-text-3); font-size: 14px; margin-inline-end: auto; padding-inline-start: 2px; }
.gm-ct-search {
	display: flex;
	align-items: center;
	gap: 8px;
	width: min(360px, 40%);
	height: 40px;
	padding: 0 14px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--gm-search, #ededed);
	color: var(--gm-text-3);
	cursor: text;
}
.gm-ct-search:focus-within { background: #fff; box-shadow: inset 0 0 0 1.5px var(--y-purple, #7d2eff); }
.gm-ct input.gm-ct-search__input {
	all: unset;
	flex: 1;
	min-width: 0;
	height: 100%;
	font: 400 14px var(--gm-font);
	color: var(--gm-text);
}
.gm-ct-search__input::-webkit-search-cancel-button { cursor: pointer; }

/* pills */
.gm-ct button.gm-ct-pill {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 16px;
	border-radius: 999px;
	border: .8px solid var(--y-pill-border, rgba(0, 0, 0, .15));
	background: #fff;
	color: var(--gm-text);
	font: 600 13px/1 var(--gm-font);
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--y-out, .1s) var(--y-ease, ease), transform var(--y-out, .1s);
}
.gm-ct button.gm-ct-pill:has(.gm-ic) { padding-inline-start: 12px; }
.gm-ct button.gm-ct-pill:hover { background: #fafafa; }
.gm-ct button.gm-ct-pill:active { transform: scale(.97); }
.gm-ct button.gm-ct-pill--primary { background: var(--y-purple, #7d2eff); border-color: transparent; color: #fff; }
.gm-ct button.gm-ct-pill--primary:hover { background: var(--y-purple-dark, #1234a8); }
.gm-ct button.gm-ct-pill:disabled { opacity: .55; pointer-events: none; }
.gm-ct-bar .gm-ct-pill { margin-inline-start: 8px; }

/* ------------------------------------------------------------------ body: list | detail */
.gm-ct-body { flex: 1; min-height: 0; display: flex; }
.gm-ct-list {
	flex: none;
	width: clamp(260px, 38%, 340px);
	display: flex;
	flex-direction: column;
	border-inline-end: 1px solid var(--gm-line);
}
.gm-ct-chips { display: flex; gap: 8px; padding: 12px 16px 6px; }
.gm-ct button.gm-ct-chip {
	all: unset;
	height: 30px;
	padding: 0 12px;
	border-radius: 999px;
	border: .8px solid var(--y-pill-border, rgba(0, 0, 0, .15));
	font: 500 13px/30px var(--gm-font);
	color: var(--gm-text-2);
	cursor: pointer;
}
.gm-ct button.gm-ct-chip:hover { background: var(--gm-hover); }
.gm-ct button.gm-ct-chip.is-on { background: var(--y-purple-light, #f1e9ff); border-color: transparent; color: var(--y-purple-ink, #39007d); font-weight: 600; }
.gm-ct-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 16px; overscroll-behavior: contain; }
.gm-ct-letter {
	position: sticky;
	top: 0;
	z-index: 1;
	padding: 10px 12px 4px;
	background: var(--gm-surface, #fff);
	color: var(--y-purple, #7d2eff);
	font: 700 12px/1 var(--gm-font);
}
.gm-ct button.gm-ct-row {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 56px;
	padding: 8px 12px;
	border-radius: 10px;
	cursor: pointer;
}
.gm-ct button.gm-ct-row:hover { background: var(--y-hover-pill, #ededed); }
.gm-ct button.gm-ct-row.is-sel { background: var(--y-purple-light, #f1e9ff); }
.gm-ct button.gm-ct-row:focus-visible { outline: 2px solid var(--y-purple, #7d2eff); outline-offset: -2px; }
.gm-ct-row__txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gm-ct-row__name { font: 600 14px/1.3 var(--gm-font); color: var(--gm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ct-row__sub { font: 400 12.5px/1.3 var(--gm-font); color: var(--gm-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ct-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 24px; color: var(--gm-text-3); text-align: center; }
.gm-ct-empty p { margin: 0; }

/* avatar */
.gm-ct-av {
	position: relative;
	flex: none;
	width: var(--s);
	height: var(--s);
	border-radius: 50%;
	overflow: hidden;
	display: grid;
	place-items: center;
	background: hsl(var(--h) 60% 92%);
	color: hsl(var(--h) 45% 35%);
	font: 600 calc(var(--s) * .38) / 1 var(--gm-font);
}
.gm-ct-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ detail */
.gm-ct-detail { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; }
.gm-ct-card { max-width: 760px; padding: 28px clamp(20px, 4%, 40px) 48px; box-sizing: border-box; }
.gm-ct-none { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; color: var(--gm-text-3); text-align: center; }
.gm-ct-none .gm-ic { width: 48px; height: 48px; opacity: .35; margin-bottom: 8px; }
.gm-ct-none p { margin: 0; max-width: 360px; }
.gm-ct-none__t { font: 600 16px var(--gm-font); color: var(--gm-text-2); }
.gm-ct-hero { display: flex; align-items: center; gap: 20px; }
.gm-ct-hero__txt { min-width: 0; }
.gm-ct .gm-ct-name { margin: 0; font: 700 26px/1.2 var(--gm-font); color: var(--gm-text); overflow-wrap: anywhere; }
.gm-ct .gm-ct-name--addr { font-size: 20px; }
.gm-ct-sub { margin: 4px 0 0; color: var(--gm-text-2); font-size: 14px; }
.gm-ct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 8px; }
.gm-ct-sect { border-top: 1px solid var(--gm-line); margin-top: 16px; padding-top: 14px; }
.gm-ct .gm-ct-sect h2 { margin: 0 0 6px; font: 700 14px/1.4 var(--gm-font); color: var(--gm-text); }
.gm-ct-line { display: flex; align-items: center; gap: 16px; min-height: 48px; padding: 4px 0; color: var(--gm-text-3); }
.gm-ct-line__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-ct-val { color: var(--gm-text); font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; text-decoration: none; }
a.gm-ct-val:hover { color: var(--y-purple, #7d2eff); text-decoration: underline; }
.gm-ct-lbl { font-size: 12px; color: var(--gm-text-3); }
.gm-ct-line .gm-btn { width: 32px; height: 32px; min-width: 32px; opacity: 0; }
.gm-ct-line:hover .gm-btn, .gm-ct-line .gm-btn:focus-visible { opacity: 1; }
.gm-ct-line .gm-btn .gm-ic { width: 18px; height: 18px; }
.gm-ct-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--gm-text); }
.gm-ct-muted, .gm-ct-hist__wait { margin: 0 0 6px; color: var(--gm-text-3); font-size: 13px; }
.gm-ct button.gm-ct-mail {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	height: 40px;
	padding: 0 10px;
	margin: 0 -10px;
	border-radius: 8px;
	color: var(--gm-text-3);
	cursor: pointer;
}
.gm-ct button.gm-ct-mail:hover { background: var(--y-hover-pill, #ededed); }
.gm-ct-mail .gm-ic { width: 18px; height: 18px; }
.gm-ct-mail__s { flex: 1; min-width: 0; color: var(--gm-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ct-mail__d { flex: none; font-size: 12.5px; }
.gm-ct-back { margin: -16px 0 8px -12px; }

/* ------------------------------------------------------------------ edit form */
.gm-ct-form { display: flex; flex-direction: column; gap: 4px; }
.gm-ct-form__head { margin-bottom: 12px; }
.gm-ct-photo { display: flex; align-items: center; gap: 20px; margin: 0 0 16px 40px; }
.gm-ct-photo__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gm-ct-fr { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto; align-items: start; gap: 8px 16px; margin: 4px 0; color: var(--gm-text-3); }
.gm-ct-fr > .gm-ic { margin-top: 12px; }
.gm-ct-sp { display: block; width: 24px; }
.gm-ct-fr--2 { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr); }
.gm-ct-fr--3 { grid-template-columns: 24px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.gm-ct-fr:not(.gm-ct-fr--2):not(.gm-ct-fr--3):has(> .gm-ct-f:only-of-type):not(:has(select)) { grid-template-columns: 24px minmax(0, 1fr); }
.gm-ct-fr .gm-btn { margin-top: 2px; }
.gm-ct-fs { display: flex; flex-direction: column; }
.gm-ct-f { position: relative; display: block; min-width: 0; }
.gm-ct .gm-ct-in {
	all: unset;
	box-sizing: border-box;
	display: block;
	width: 100%;
	min-height: 46px;
	padding: 20px 12px 6px;
	border: 1px solid #c4c8cc;
	border-radius: 8px;
	background: #fff;
	font: 400 14px/1.35 var(--gm-font);
	color: var(--gm-text);
	transition: border-color var(--y-out, .1s);
}
.gm-ct textarea.gm-ct-in { resize: vertical; white-space: pre-wrap; }
.gm-ct .gm-ct-in:hover { border-color: #8a8f94; }
.gm-ct .gm-ct-in:focus { border-color: var(--y-purple, #7d2eff); box-shadow: inset 0 0 0 1px var(--y-purple, #7d2eff); }
.gm-ct-f__l {
	position: absolute;
	left: 13px;
	top: 14px;
	color: var(--gm-text-3);
	font: 400 14px/18px var(--gm-font);
	pointer-events: none;
	transform-origin: left top;
	transition: transform .12s var(--y-ease, ease), color .12s;
}
.gm-ct-in:focus + .gm-ct-f__l,
.gm-ct-in:not(:placeholder-shown) + .gm-ct-f__l,
.gm-ct-f--date .gm-ct-f__l { transform: translateY(-8px) scale(.8); }
.gm-ct-in:focus + .gm-ct-f__l { color: var(--y-purple, #7d2eff); }
.gm-ct .gm-ct-type {
	height: 46px;
	min-width: 96px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid #c4c8cc;
	border-radius: 8px;
	background-color: #fff;
	font: 400 14px var(--gm-font);
	color: var(--gm-text);
	cursor: pointer;
}
.gm-ct .gm-ct-type:focus { border-color: var(--y-purple, #7d2eff); outline: none; }
.gm-ct button.gm-ct-add {
	all: unset;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	align-self: flex-start;
	height: 32px;
	margin: 0 0 6px 40px;
	padding: 0 10px;
	border-radius: 999px;
	color: var(--y-purple, #7d2eff);
	font: 600 13px var(--gm-font);
	cursor: pointer;
}
.gm-ct button.gm-ct-add:hover { background: var(--y-purple-light, #f1e9ff); }
.gm-ct-err { margin: 6px 0 0 40px; color: #c5221f; font-size: 13px; min-height: 0; }
.gm-ct-err:empty { display: none; }
.gm-ct-form__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--gm-line); }

/* address suggestions (Yahoo-style dropdown under the street field) */
.gm-ct-ac {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 5;
	padding: 6px;
	background: #fff;
	border-radius: 12px;
	box-shadow: var(--gm-shadow-2, 0 4px 12px rgba(0, 0, 0, .12));
	border: 1px solid var(--gm-line);
}
.gm-ct-ac[hidden] { display: none; }
.gm-ct button.gm-ct-ac__it {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 48px;
	padding: 6px 10px;
	border-radius: 8px;
	color: var(--gm-text-3);
	cursor: pointer;
}
.gm-ct button.gm-ct-ac__it:hover, .gm-ct button.gm-ct-ac__it.is-on { background: var(--y-purple-light, #f1e9ff); }
.gm-ct-ac__t { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gm-ct-ac__l { color: var(--gm-text); font: 600 14px/1.3 var(--gm-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ct-ac__s { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gm-ct-ac__attr { padding: 6px 10px 2px; font-size: 11px; color: var(--gm-text-3); text-align: end; }

/* editing: the form gets the whole card */
.gm-ct.is-editing .gm-ct-list { display: none; }
.gm-ct.is-editing .gm-ct-card { max-width: 720px; margin: 0 auto; }

/* ------------------------------------------------------------------ narrow card: list, then the contact over it */
@container (max-width: 639px) {
	.gm-ct-bar { padding: 0 8px; gap: 4px; }
	.gm-ct-title, .gm-ct-count { display: none; }
	.gm-ct-search { flex: 1; width: auto; }
	.gm-ct-bar .gm-ct-pill span:not(.gm-ic) { display: none; }
	.gm-ct-bar .gm-ct-pill { padding: 0 10px; }
	.gm-ct-list { width: 100%; border: 0; }
	.gm-ct-detail { display: none; }
	.gm-ct.has-sel .gm-ct-list { display: none; }
	.gm-ct.has-sel .gm-ct-detail { display: block; }
	.gm-ct-card { padding: 24px 16px 40px; }
	.gm-ct-photo, .gm-ct-add, .gm-ct-err { margin-inline-start: 0; }
	.gm-ct-fr, .gm-ct-fr--2, .gm-ct-fr--3 { grid-template-columns: minmax(0, 1fr) auto auto; }
	.gm-ct-fr--2, .gm-ct-fr--3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.gm-ct-fr > .gm-ic, .gm-ct-fr > .gm-ct-sp { display: none; }
}
