/* Cookie preference banner + manager modal.
 * Shared across trackaplane.com and parts.trackaplane.com (loaded cross-origin
 * on the Parts Exchange). Keeps its own small stylesheet rather than growing
 * style.css, since this is an independent, self-contained UI feature. */

.tap-cc-banner {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 10000;
	background: var(--tap-navy-deep, #101d33); color: #fff;
	border-top: 1px solid var(--tap-navy-line, rgba(255,255,255,0.10));
	padding: 1rem 1.25rem; display: none;
	box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
}
.tap-cc-banner.tap-cc-visible { display: block; }
.tap-cc-banner-inner {
	max-width: 1100px; margin: 0 auto; display: flex; align-items: center;
	gap: 1.5rem; flex-wrap: wrap;
}
.tap-cc-text { flex: 1 1 360px; font-size: 0.88rem; line-height: 1.5; color: rgba(255,255,255,0.88); margin: 0; }
.tap-cc-text a { color: var(--tap-gold-light, #d3b46a); text-decoration: underline; }
.tap-cc-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.tap-cc-btn {
	font-size: 0.82rem; font-weight: 600; padding: 0.55rem 1.1rem; border-radius: 4px;
	border: 1px solid rgba(255,255,255,0.25); background: transparent; color: #fff;
	cursor: pointer; white-space: nowrap;
}
.tap-cc-btn:hover { border-color: rgba(255,255,255,0.55); }
.tap-cc-btn--primary { background: var(--tap-gold, #b08d3f); color: var(--tap-navy-deep, #101d33); border-color: var(--tap-gold, #b08d3f); }
.tap-cc-btn--primary:hover { background: var(--tap-gold-light, #d3b46a); }

.tap-cc-modal-overlay {
	position: fixed; inset: 0; background: rgba(16,29,51, 0.72);
	display: none; align-items: center; justify-content: center; z-index: 10001; padding: 1.5rem;
}
.tap-cc-modal-overlay.tap-cc-visible { display: flex; }
.tap-cc-modal {
	background: var(--tap-panel, #fff); color: var(--tap-ink, #191f2b);
	max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto;
	border-radius: 6px; padding: 1.75rem;
}
.tap-cc-modal h3 { margin: 0 0 0.5rem; font-family: var(--tap-font-display, serif); font-size: 1.3rem; }
.tap-cc-modal p { font-size: 0.88rem; line-height: 1.55; color: var(--tap-muted, #6b6459); }
.tap-cc-category { border: 1px solid var(--tap-line, #e6e0d2); border-radius: 4px; padding: 1rem; margin: 1rem 0; }
.tap-cc-category-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.tap-cc-category-head strong { font-size: 0.92rem; }
.tap-cc-toggle { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.tap-cc-toggle input { opacity: 0; width: 0; height: 0; }
.tap-cc-toggle-track {
	position: absolute; inset: 0; background: var(--tap-line, #d8d2c2); border-radius: 24px; cursor: pointer; transition: background 0.15s;
}
.tap-cc-toggle-track:before {
	content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
	background: #fff; border-radius: 50%; transition: transform 0.15s;
}
.tap-cc-toggle input:checked + .tap-cc-toggle-track { background: var(--tap-gold, #b08d3f); }
.tap-cc-toggle input:checked + .tap-cc-toggle-track:before { transform: translateX(18px); }
.tap-cc-toggle input:disabled + .tap-cc-toggle-track { background: var(--tap-muted, #6b6459); cursor: not-allowed; opacity: 0.6; }
.tap-cc-category p { margin: 0.5rem 0 0; }
.tap-cc-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 1.5rem; }
.tap-cc-gpc-note {
	font-size: 0.8rem; background: var(--tap-panel-alt, #f5f1e6); border-radius: 4px;
	padding: 0.65rem 0.85rem; margin-top: 0.25rem;
}

/* Third-party video facade shown until the visitor consents (or clicks to load one-off) */
.tap-video-facade {
	background: var(--tap-panel-alt, #f5f1e6); border: 1px solid var(--tap-line, #e6e0d2);
	border-radius: 4px; padding: 2.5rem 1.5rem; text-align: center;
}
.tap-video-facade-text { font-size: 0.85rem; color: var(--tap-muted, #6b6459); max-width: 420px; margin: 0 auto 1rem; }

/* Cookie inventory table on the Cookie Policy page */
.tap-cookie-table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.84rem; }
.tap-cookie-table th, .tap-cookie-table td { border: 1px solid var(--tap-line, #e6e0d2); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.tap-cookie-table th { background: var(--tap-panel-alt, #f5f1e6); font-weight: 600; }
.tap-cookie-table code { font-size: 0.82em; background: var(--tap-panel-alt, #f5f1e6); padding: 0.1rem 0.35rem; border-radius: 2px; }

@media (max-width: 640px) {
	.tap-cc-banner-inner { flex-direction: column; align-items: stretch; }
	.tap-cc-actions { justify-content: stretch; }
	.tap-cc-btn { flex: 1; }
	.tap-cookie-table { display: block; overflow-x: auto; white-space: nowrap; }
}
