/* ============================================================
   Exchanged Timeline — Frontend styles
   ============================================================ */

/* ---- Wrapper ------------------------------------------------ */
#et-timeline-wrap {
	font-family: inherit;
	box-sizing: border-box;
}
#et-timeline-wrap *,
#et-timeline-wrap *::before,
#et-timeline-wrap *::after {
	box-sizing: inherit;
}

/* ---- Controls bar ------------------------------------------ */
.et-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	padding: .5rem 0 .75rem;
}

.et-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .3rem .65rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	font-size: .875rem;
	line-height: 1.4;
	cursor: pointer;
	transition: background .15s, border-color .15s;
}
.et-btn:hover  { background: #f0f0f1; border-color: #8c8f94; }
.et-btn:active { background: #e5e5e5; }

.et-btn-sm {
	padding: .2rem .5rem;
	font-size: .8rem;
}

.et-zoom-group  { display: flex; gap: .25rem; }
.et-filter-group { display: flex; gap: .25rem; }

.et-filter-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .3rem .75rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
	color: #1d2327;
	font-size: .875rem;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.et-filter-btn:hover  { background: #f0f0f1; border-color: #8c8f94; }
.et-filter-btn.active {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
}

.et-search-group {
	flex: 1;
	min-width: 160px;
	max-width: 320px;
}

.et-search-input {
	width: 100%;
	padding: .3rem .65rem;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	font-size: .875rem;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.et-search-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px rgba(34,113,177,.2);
}

/* ---- Timeline canvas container ----------------------------- */
#et-timeline-container {
	position: relative;
	width: 100%;
	overflow: hidden;     /* canvas handles all panning internally via panX/panY */
	background: #fafafa;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}
#et-timeline-container:active { cursor: grabbing; }

#et-timeline-container canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* Loading indicator */
.et-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
	color: #646970;
	pointer-events: none;
}
.et-loading.et-hidden { display: none; }

/* ---- Tooltip ----------------------------------------------- */
.et-tooltip {
	position: absolute;
	z-index: 100;
	pointer-events: none;
	background: rgba(0,0,0,.82);
	color: #fff;
	font-size: .8rem;
	line-height: 1.5;
	padding: .45rem .65rem;
	border-radius: 5px;
	max-width: 240px;
	white-space: normal;
	box-shadow: 0 2px 8px rgba(0,0,0,.25);
	transform: translate(10px, -50%);
}
.et-tooltip .et-tt-title  { font-weight: 600; }
.et-tooltip .et-tt-meta   { opacity: .85; font-size: .75rem; }

/* ---- Cards section ----------------------------------------- */
.et-cards-section {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-top: 1rem;
}

@media ( max-width: 600px ) {
	.et-cards-section { grid-template-columns: 1fr; }
}

.et-col {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	overflow: hidden;
}

.et-col-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .5rem .75rem;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
}

.et-col-title {
	font-weight: 600;
	font-size: .9rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #3c434a;
}

.et-cards-list {
	padding: .5rem;
	min-height: 60px;
	max-height: 420px;
	overflow-y: auto;
}

/* ---- Individual cards -------------------------------------- */
.et-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	padding: .6rem .75rem;
	margin-bottom: .5rem;
	font-size: .875rem;
	line-height: 1.5;
	transition: box-shadow .15s;
}
.et-card:last-child { margin-bottom: 0; }
.et-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,.1); }

.et-card-name,
.et-card-title {
	font-weight: 600;
	font-size: .9rem;
}

.et-card-name a,
.et-card-title a {
	color: #2271b1;
	text-decoration: none;
}
.et-card-name a:hover,
.et-card-title a:hover { text-decoration: underline; }

.et-card-meta {
	color: #646970;
	font-size: .8rem;
}

.et-card-type {
	display: inline-block;
	padding: .1rem .4rem;
	border-radius: 3px;
	background: #f0f0f1;
	font-size: .75rem;
	color: #3c434a;
	text-transform: capitalize;
	margin-top: .25rem;
}

/* Author card accent */
.et-author-card { border-left: 3px solid var(--et-author-color, #3b82f6); }

/* Work card accent */
.et-work-card   { border-left: 3px solid var(--et-work-color, #f59e0b); }

/* Work card action links */
.et-card-actions {
	display: flex;
	gap: .5rem;
	margin-top: .4rem;
}
.et-work-action-link {
	display: inline-block;
	padding: .2rem .55rem;
	border-radius: 3px;
	border: 1px solid #c3c4c7;
	font-size: .78rem;
	text-decoration: none;
	color: #2271b1;
	background: #fff;
	transition: background .12s, border-color .12s;
}
a.et-work-action-link:hover {
	background: #f0f6fc;
	border-color: #2271b1;
}
.et-link-unavailable {
	color: #b0b0b0;
	border-color: #e0e0e0;
	background: #fafafa;
	cursor: default;
}

/* Add to Cart tooltip — appended to body, positioned via JS */
.et-cart-tooltip {
	position: absolute;
	z-index: 9999;
	background: rgba(0,0,0,.85);
	color: #fff;
	font-size: .8rem;
	line-height: 1.7;
	padding: .45rem .7rem;
	border-radius: 5px;
	white-space: nowrap;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.et-cart-tooltip span {
	display: block;
}


/* ---- Version list (work cards, v1.9+) ---------------------- */
.et-version-list {
	display: flex;
	flex-direction: column;
	gap: .45rem;
	margin-top: .4rem;
}

.et-version-entry {
	display: flex;
	flex-direction: column;
	gap: .15rem;
	padding: .35rem .5rem;
	background: #f6f7f7;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
}

.et-ver-head {
	display: flex;
	align-items: baseline;
	gap: .4rem;
}

.et-ver-format {
	display: inline-block;
	padding: .05rem .35rem;
	border-radius: 3px;
	background: #e5e5e5;
	font-size: .7rem;
	color: #3c434a;
	text-transform: uppercase;
	letter-spacing: .03em;
	flex-shrink: 0;
}

.et-ver-title {
	font-size: .82rem;
	font-weight: 600;
	color: #1d2327;
}

.et-ver-lineage {
	font-size: .75rem;
	color: #646970;
}

.et-ver-acquire {
	margin-top: .1rem;
}

/* ---- External link indicator -------------------------------- */
.et-ext-indicator {
	display: inline-block;
	font-size: .75em;
	vertical-align: super;
	opacity: .75;
	margin-left: .15em;
	line-height: 1;
}
